| |
- dumpXYlist(filename, list)
- write a list of (x,y) tuples out in a space delimited format for
gnuplot to read
- get_2lists_from_db_cu(cu, key1, key2)
- Return a list of items from a database cursor that has a select on it
cu - sqlite cursor after a SELECT
key1 - string of the key you want the first list of
key2 - string of the key you want the 2nd list of
FIX: make it n keys
- get_list_from_db_cu(cu, key)
- Return a list of items from a database cursor that has a select on it
cu - sqlite cursor after a SELECT
key - string of the key you want a list of
- gnuplot_from_list_of_lists(gnuplot_object, list)
- I could not figure out how to do this cleanly in a pythonic type
way, so here is a hack to be replaced with better code in the
future.
gnuplot_object --- What you get from Gnuplot.Gnuplot()
list --- list of Gnuplot.Data() items
- loadXYlist(filename)
- read a file of x y pairs with one per line
- plotAgainstDepthFromDB(db_cx, table, field_x, where='', pdf=False, outFilename='none', forceXRange=False, xRange=None, yRange=None)
- Plot some attribute from a table using the sample name to depth
lookup for the y axis.
PARAMETERS:
db_cx --- pysqlite database connection
table --- which table in the database to plot
field_x --- the field in the table to use for the X axis
where --- SQL where string ( WHERE corenum=2 )
pdf --- set to true to write out a pdf instead of showing the display
outFilename --- file to write out the plot to if terminal is pdf
forceXRange --- plot in -180 to 180 degrees and do a mod to force angles to be in that range
xRange --- force the x range to be in a certain range. e.g. '[-90:90]'
yRange --- force the y range to be in a certain range. e.g. '[0:2000]'
- plotFromDB(db_cx, table, field_x, field_y, where='', pdf=False, outFilename='none', reverse=False, forceXRange=False, yRange=None)
- Go into the database and plot two fields from the same sample
PARAMETERS:
db_cx --- pysqlite database connection
table --- which table in the database to plot
field_x --- the field in the table to use for the X axis
field_y --- the field in the table to use for the Y axis
where --- SQL where string ( WHERE corenum=2 )
pdf --- set to true to write out a pdf instead of showing the display
FIX: should pdf be terminal?
outFilename --- file to write out the plot to if terminal is pdf
forceXRange --- plot in -180 to 180 degrees and do a mod to force angles to be in that range
yRange --- force the y range to be in a certain range. e.g. '[0:2000]'
- plot_2_arm_int(db_cx, outFilename, corenum1, corenum2, treatment=0.0, table='mag_geo', maxdepth=200)
- Plot a graph with an ARM treatment for two
different cores in the same graph. Writes a png image
db_cx --- sqlite database connection
outFilename --- file to write out the image to.
corenum1 --- integer for the first core to plot (e.g. 1)
corenum2 --- integer for the 2nd core to plot (e.g. 1)
treatment --- AF or NRM treatment (mT) to use
table --- which sqlite table to use. mag or mag_geo
mag_geo has the geographic corrected coord frame
maxdepth --- limit for the y access in cm
FIX: why no key? Is it too narrow?
- plot_2_nrm_int(db_cx, outFilename, corenum1, corenum2, treatment=0.0, table='mag_geo', maxdepth=200)
- Plot a graph with an NRM or AF Demag treatment for two
different cores in the same graph. Writes a png image
db_cx --- sqlite database connection
outFilename --- file to write out the image to.
corenum1 --- integer for the first core to plot (e.g. 1)
corenum2 --- integer for the 2nd core to plot (e.g. 1)
treatment --- AF or NRM treatment (mT) to use
table --- which sqlite table to use. mag or mag_geo
mag_geo has the geographic corrected coord frame
maxdepth --- limit for the y access in cm
FIX: why no key? Is it too narrow?
- plot_ams_v_dec_Ftest(db_cx, outFilename, coreList, field='dec1', table='ams_geo', fold=False, center=0, maxdepth=200)
- Plot ams V1, but samples have to pass the F-Test
db_cx - database connection
outFilename - where to write the png image
field - which database field to plot against depth
table - use the ams geographic table by default
fold - wrap into a +/-180 orietation
center - where to center the plot - declination in degrees
maxdepth - how far down core to plot
- plot_declination(db_cx, outFilename, coreList, treatment=0.0, field='dec', table='mag_geo', restriction=None, maxdepth=200, center=0, fold=False)
- Plot declination down core of some parameter specified by dec
db_cx --- sqlite database connection
outFilename --- file to write out the image to.
coreList --- List of integers for the core numbers. e.g. [1,5,6]
treatment --- AF or NRM treatment (mT) to use. e.g 5 for 5 mT
Set treatment to None if treatment is irrelevant
field --- Which field from the database to use for decl.
e.g. dec for mag_geo
or
sqlite db '.schema ams_geo'
e.g. dec1 or dec2 or dec3
table --- which sqlite table to use. mag or mag_geo
mag_geo has the geographic corrected coord frame
restriction --- SQL to restricture the search. e.g.
"AND type='afdemag'"
maxdepth --- limit for the y access in cm
center --- Angle in degrees that should be the center of the plot
fold --- For AMS where the direction is aribrary which way it fits
- plot_susc(db_cx, filename, table, corenum, maxdepth)
- Plot tau123 downcore
PARAMTERS:
db_cx - sqlite database connection
table - either ams or ams-geo
maxdepth - plot from 0 down to this depth in cm
- plot_water_weight_percent(db_cx, outFileName, corenum, maxdepth=200, xrange=None)
- Track the different between wet and dry cube material to see what
% of the weight is water
db_cx - sqlite database connection
outFileName - where to write the file
xrange - force the xaxis range: '[.30:.60]
|