afdemag_poster
index
/Users/schwehr/projects/xcore/doc/BPSIO-04/work/afdemag_poster.py

# DESCRIPTION: Use pil and pdflib_py to build a poster

 
Modules
       
Image
ImageDraw
ImageFont
ams
bpsio
datetime
os
pseudot
sqlite
string
sys

 
Functions
       
PDF_add_bookmark(...)
PDF_add_launchlink(...)
PDF_add_locallink(...)
PDF_add_nameddest(...)
PDF_add_note(...)
PDF_add_pdflink(...)
PDF_add_thumbnail(...)
PDF_add_weblink(...)
PDF_arc(...)
PDF_arcn(...)
PDF_attach_file(...)
PDF_begin_font(...)
PDF_begin_glyph(...)
PDF_begin_page(...)
PDF_begin_pattern(...)
PDF_begin_template(...)
PDF_circle(...)
PDF_clip(...)
PDF_close(...)
PDF_close_image(...)
PDF_close_pdi(...)
PDF_close_pdi_page(...)
PDF_closepath(...)
PDF_closepath_fill_stroke(...)
PDF_closepath_stroke(...)
PDF_concat(...)
PDF_continue_text(...)
PDF_create_gstate(...)
PDF_create_pvf(...)
PDF_curveto(...)
PDF_delete(...)
PDF_delete_pvf(...)
PDF_encoding_set_char(...)
PDF_end_font(...)
PDF_end_glyph(...)
PDF_end_page(...)
PDF_end_pattern(...)
PDF_end_template(...)
PDF_endpath(...)
PDF_fill(...)
PDF_fill_imageblock(...)
PDF_fill_pdfblock(...)
PDF_fill_stroke(...)
PDF_fill_textblock(...)
PDF_findfont(...)
PDF_fit_image(...)
PDF_fit_pdi_page(...)
PDF_fit_textline(...)
PDF_get_apiname(...)
PDF_get_buffer(...)
PDF_get_errmsg(...)
PDF_get_errnum(...)
PDF_get_parameter(...)
PDF_get_pdi_parameter(...)
PDF_get_pdi_value(...)
PDF_get_value(...)
PDF_initgraphics(...)
PDF_lineto(...)
PDF_load_font(...)
PDF_load_iccprofile(...)
PDF_load_image(...)
PDF_makespotcolor(...)
PDF_moveto(...)
PDF_new(...)
PDF_open_CCITT(...)
PDF_open_file(...)
PDF_open_image(...)
PDF_open_image_file(...)
PDF_open_pdi(...)
PDF_open_pdi_page(...)
PDF_place_image(...)
PDF_place_pdi_page(...)
PDF_process_pdi(...)
PDF_rect(...)
PDF_restore(...)
PDF_rotate(...)
PDF_save(...)
PDF_scale(...)
PDF_set_border_color(...)
PDF_set_border_dash(...)
PDF_set_border_style(...)
PDF_set_gstate(...)
PDF_set_info(...)
PDF_set_parameter(...)
PDF_set_text_pos(...)
PDF_set_value(...)
PDF_setcolor(...)
PDF_setdash(...)
PDF_setdashpattern(...)
PDF_setflat(...)
PDF_setfont(...)
PDF_setgray(...)
PDF_setgray_fill(...)
PDF_setgray_stroke(...)
PDF_setlinecap(...)
PDF_setlinejoin(...)
PDF_setlinewidth(...)
PDF_setmatrix(...)
PDF_setmiterlimit(...)
PDF_setpolydash(...)
PDF_setrgbcolor(...)
PDF_setrgbcolor_fill(...)
PDF_setrgbcolor_stroke(...)
PDF_shading(...)
PDF_shading_pattern(...)
PDF_shfill(...)
PDF_show(...)
PDF_show_boxed(...)
PDF_show_xy(...)
PDF_skew(...)
PDF_stringwidth(...)
PDF_stroke(...)
PDF_translate(...)
fixList()
# FIX: make an inches to points function
getAFIntensity(db_cx, treatment, samplename)
Return the first record of intensity at a treatment level
getDepth(db_cx, samplename)
Lookup the depth of a sample from the mag table
getMaxAFStep(db_cx, samplename)
Return the max treatment mT for a samplename
mag_get_afdemag_list(db_cx, coreNum)
Return a list of the afdemag samples for that core from shallow to deep
make_af_poster(db_cx, pdfFileName, cores, pointsWide, pointsHigh)
Create the poster-sized PDF
 
Parameters:
db_cx --- sqlite database connection
pdfFileName -- what to call the resulting pdf file
cores --- List of cores to put on the poster.  e.g. [1,2,5]
pointsWide -- width of the poster in points
pointsHigh --- height of the poster in points
make_arm_poster(db_cx, pdfFileName, cores, pointsWide, pointsHigh)
Create the poster-sized PDF of the ARM treatment steps as if they
were demag steps.
 
Parameters:
db_cx --- sqlite database connection
pdfFileName -- what to call the resulting pdf file
cores --- List of cores to put on the poster.  e.g. [1,2,5]
pointsWide -- width of the poster in points
pointsHigh --- height of the poster in points
plotdmag_arm_lisa(db_cx, samplename)
Shell out to Lisa's plotdmag to make a postscript Zijderveld (sp?) demag plot
But for this one, use the ARM instead of the afdemag values
plotdmag_lisa(db_cx, samplename)
Shell out to Lisa's plotdmag to make a postscript Zijderveld (sp?) demag plot
total_samples(db_cx)
Return the total number of unique sample names in the mag and weight tables

 
Data
        magTable = 'mag_geo'
points32Inches = 2304
points36Inches = 2592
points60Inches = 4320
points72Inches = 5184