| |
- Tmatrix(X)
- FIX: Describe here
- angle(D1, D2)
- FIX: Describe here
- b_vdm(B, lat)
- Converts field values in tesla to v(a)dm in Am^2
- cart2dir(cart)
- FIX: Describe here
- cdfout(data, file)
- FIX: Describe here
- dia_vgp(dec, dip, a95, slat, slong)
- FIX: Describe here
- dir2cart(dir)
- Direction to cartesian xyz
PARAMTERS:
dir --- List containing dec, inc, and intensity(length) in degrees
RETURNS:
List of [x,y,z]
- docirceq(dec, dip, alpha)
- FIX: Describe here
- dogeo(dec, inc, az, pl)
- FIX: Describe here
- dolnp(data)
- Using method of mcfadden and mcelhinny '88 for lines and planes
Calculates Fisher mean from combined directed lines and great
circles using McFadden and McElhinny (1988).
ARGS:
data - A list of dictionaries with keys of dec and inc with values
in degrees and calculation type (p for planes [aka great circles],
l for lines)
FIX: check that this example is ok...
EXAMPLE:
import pmag
data = [{'dec':10, 'inc':5, 'calculation_type':'p'}, {'dec':280, 'inc':78, 'calculation_type':'l'}, {'dec':280, 'inc':79, 'calculation_type':'l'}, {'dec':70, 'inc':-41, 'calculation_type':'p'}, {'dec':71, 'inc':44.2, 'calculation_type':'p'} ]
fpars = pmag.dolnp(data)
print fpars
Which prints:
{'n_lines': '2 ', 'K': ' 4.7 ', 'n_planes': '3 ', 'R': '4.4646 ', 'a95': ' 43.7 ', 'n_total': '5 ', 'dec': ' 294.6 ', 'inc': ' 79.4 '}
RETURNS:
a dictionary of derived parameters with the following keys
n_total --- n_lines + n_planes
n_lines --- number of lines in the input data
n_planes --- number of planes in the input data
R --- FIX: describe this
K --- FIX: describe this
a95 --- Angular 95% confidence bounds in degrees for dec and inc
dec --- best fit direction declination (in degrees)
inc --- best fit direction inclination (in degrees)
- dopca(datablock, start, end, pca_type)
- Calculates best-fit line through specified data
PARAMETERS:
datablock --- List of list with treatment, dec,inc,intensity. dec, inc in degrees.
See find_dmag_rec() for how this list can be created.
start --- First index to begin using for fit, 0 is the first value
end --- Last index to using for fit. Clamped to len(datablock-1)
pca_type --- 'p' for best fit line or 'g' for best fit plane/great circle
RETURNS:
A list containing [direction, MAD, number_of_records, dang
direction = [dec, inc, length]
FIX: is length always one?
EXAMPLES:
# Fetch the data like this or use pysqlite
sqlite bpsio04.db "select treatment,dec,inc,intensity from mag_geo where samplename='bp04-1gw-s2-065';"
# Make a list of lists
data = [ [0.0,371.459574468,58.3,1.684e-05], [0.0,369.559574468,59.5,1.715e-05], [5.0,373.259574468,58.9,1.528e-05], [7.5,375.959574468,59.2,1.418e-05], [10.0,378.259574468,58.3,1.315e-05], [15.0,379.459574468,56.5,1.156e-05], [20.0,379.359574468,57.3,1.036e-05], [30.0,380.259574468,53.4,8.709e-06], [40.0,378.259574468,49.3,6.875e-06], [50.0,373.959574468,44.7,6.171e-06], [60.0,373.459574468,49.2,4.905e-06], [80.0,377.459574468,37.9,3.538e-06], [100.0,36.0595744681,35.3,2.095e-06] ]
# Get and print the pca for a direction/line fit:
pcaData = pmag.dopca(data,2,10,'p')
print pcaData
# Which gives:
[[15.701580966871566, 66.335123528356803, 1.0], 5.5388324192365515, 9, 10.677340547170644]
# Get and print the pca for a plane/great circle fit:
pcaData = pmag.dopca(data,2,10,'g')
print pcaData
# Which gives:
[[281.26857492440104, 4.0148388874666701, 1.0], 16.575560573890304, 9, 89.997434287256965]
- dosundec(sundata)
- FIX: Describe here
- dotilt(dec, inc, bed_az, bed_dip)
- FIX: Describe here
- dread(infile, cols)
- reads in specimen, tr, dec, inc int into data[]. position of
tr, dec, inc, int determined by cols[]
- fillkeys(Recs)
- FIX: Describe here
- find_dmag_rec(s, data)
- Take a list of MagIC dictionaries and a sample name and return a
list of [tr,dec,inc,int]
PARAMETERS:
s --- string containing the specimen name (aka er_specimen_name)
data --- list of dictionaries with keys:
magic_method_codes - used to figure out which type of data to fetch
FIX... doc the rest
RETURN:
List of lists which is [treatment, declination(degrees), inclination(degrees), intensity(FIX:someunit)
FIX: finish up and verify this
- find_samp_rec(s, data, az_type)
- FIX: Describe here
- findrec(s, data)
- FIX: Describe here
- first_rec(ofile, Rec, file_type)
- Setup a filename from a ofile name and write magic 2 line header
Rec is a list of dictionaries who has keys are the magic meta data
- first_up(ofile, Rec, file_type)
- FIX: Describe here
- fisher_mean(data)
- FIX: Describe here
- fshdev(k)
- FIX: Describe here
- gausspars(data)
- FIX: Describe here
- get_plate_data(plate)
- FIX: Describe here
- getkeys(table)
- FIX: Describe here
- getmeths(method_type)
- FIX: Describe here
- getnames()
- get mail names
- gha(julian_day, f)
- FIX: Describe here
- int_pars(x, y, vds)
- calculates York regression and Coe parameters (with Tauxe Fvds)
first do linear regression a la York
- julian(mon, day, year)
- FIX: Describe here
- lowes(infile, outfile)
- FIX: Describe here
- magic_help(keyhelp)
- FIX: Describe here
- magic_read(infile)
- reads a Magic template file,
puts data in a list of dictionaries
- magnetic_lat(inc)
- FIX: Describe here
- plotA(g, s, indata, b, e, plot)
- FIX: Describe here
- plotE(g, s, datablock, b, e, pole)
- collect the data for sample s
plot the outer circle
- plotZ(g, s, datablock, b, e, axis)
- pick out the data for sample s
- plotdi(g, data)
- FIX: Describe here
- plotlnp(g, s, datablock, fpars)
- plot the outer circle
args:
g --- Gnuplot.Gnuplot instance
s --- list of strings with the site names (er_site_name)
datablock --- LnpRec 'dec' 'inc' dictionary pairs?
fpars --- return from pmag.dolnp()
returns nothing
- putout(ofile, keylist, Rec)
- Write out one line of magic data to ofile
ofile - string filename
keylist - this is returned from first_rec
- vclose(L, V)
- FIX: Describe here
- vds(data)
- FIX: Describe here
- vector_mean(data)
- FIX: Describe here
- vfunc(pars_1, pars_2)
- FIX: Describe here
- vgp_di(plat, plong, slat, slong)
- FIX: Describe here
- vspec(data)
- FIX: Describe here
- watsonsV(Dir1, Dir2)
- FIX: Describe here
- xymap(D, I)
- FIX: Describe here
|