IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24069


Ignore:
Timestamp:
May 5, 2009, 9:33:27 AM (17 years ago)
Author:
Sebastian Jester
Message:

Add parameter help text to compIPPphoto() and more help text and
comments elsewhere in compIPPphoto.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sj_branches/sj_ippTests_branch_20080929/ippTests/compIPPphoto.py

    r23263 r24069  
    5252#   ranges are the same.
    5353#
    54 # - second tlist for summary plots (same or different plot routine?)
    55 #
    5654# - towards generality, want to read these things and colname_hash and
    5755#   label_l from config files
    5856#
    59 # Convention: for scatter, plot second against first; for histogram, plot both histograms
     57# - perhaps via the RO package and RO.DS9, add diagnostic features via
     58#   its ability to talk to ds9. E.g. load the fpC image in ds9,
     59#   overlay SDSS objects in one colour, psphot in another, have
     60#   different symbols for point vs extended source, etc. Maybe also
     61#   use the CDS Aladin API (if one is available) to be able to click
     62#   on object in image to pull up photometry. In fact, stilts should
     63#   be able to talk to the aladin tool via PLASTIC. See "Starlink User
     64#   Note 253" - somewhere on the web as sun253.html
     65#
    6066
    6167
     
    6773# (and that's probably quite enough anyway).
    6874
    69 # Look at extended flag in PS1 vs. SDSS!!!
     75# Looking at the extended flag in PS1 vs. SDSS is done via d_pointsource.
    7076
    7177# os.chdir('/disk1/jester/IPP/data/SDSS/stripe82/coadd/compare')
     
    7379# h1,h2=compIPPphoto('test.fits','new',workdir='/IPP/data/SDSS/stripe82/coadd/compare',runlist=[1056,1755])
    7480
     81# Here follow two specially formatted lists governing which plots are
     82# made. The first is for plots being done on a field-by-field basis,
     83# giving [x vector(s)],[y vector(s)], 'scatter' plot or
     84# 'histogram. The second is for "summary" plots that plot aggregate
     85# statistics for the entire list of fields supplied, e.g. the number
     86# of PS1 sources in a field vs. the number of SDSS sources in a field.
     87#
     88# Some columns come from copyfields_list; which columns get d_
     89# difference columns is set by colname_hash ( see help text for
     90# compIPPphoto() )
     91#
     92# The convention is: for scatter, plot second against first; for
     93# histogram, plot both histograms
    7594plotcol_1frame_tlist = [
    7695    (['x_psf','objc_colc'],['y_psf','objc_rowc'],'scatter')
     
    127146                     runlist=[1056,1755,3388,3434,3465,4145,4192,4203,4247,4263,5052],\
    128147                     copyfields_list = ['RUN','RERUN','CAMCOL','FIELD','FILTER','FWHM_MAJ','FWHM_MIN'],\
    129                      skip=True):
    130     """summaryTable: .fits table for output
    131     mode: new or append for creating summaryTable new or appending current run's output to it.
    132 
     148                     skipMatch=True):
     149    """Match a .cmf file against the corresponding fpObjc file,
     150    compute statistics (e.g. median difference of some pair of
     151    columns), plot these statistics field-by-field or aggregate
     152    basis. Which columns are subtracted from each other is hardcoded
     153    into colname_hash in computeStatistics(); the todo list for this
     154    source file includes passing colname_hash around as parameter and
     155    allowing it to be read from a config file.
     156
     157    summaryTable: .fits table for output
     158
     159    mode: new or append for creating summaryTable new or appending
     160    current run's output to it.
     161
     162    plotcol_1frame_tlist: list specifying which plots should be made
     163    frame-by-frame (see top of source file)
     164
     165    plotcol_summary_tlist: which plots should be made for aggregate
     166    quantities for the entire list of fields
     167
     168    cmfDir: where psphot output is found; location of SDSS files is
     169    currently hardcoded in makePlan
     170
     171    workdir: where results are stored (matched-up fits tables, plots)
     172
     173    runlist: which SDSS runs to look at
     174
     175    copyfields_list: which header fields to copy from the input tables
     176       (via the match table) to the output fields, so that we can plot
     177       them in the aggregate output. CAUTION: the corresponding fields
     178       need to be copied from the input cmf / fpObjc files in
     179       matchSdssPs1() - search for ps1copyfields_hash in the source -
     180       should probably split this into PS1copyfields and
     181       SDSScopyfields and then pass these down to matchSdssPs1()
     182
     183    skipMatch: if True, assume cmf / fpObjc matching has already been
     184    done, don't repeat it, and only produce statistics and plots
     185   
    133186    Steps:
    134187
     
    159212    bandindex_hash = {}
    160213    for chipfile,fpObjc in zip(chipfile_l,fpObjc_l):
    161         matchtable,filter_name,bandindex = matchSdssPs1(fpObjc,chipfile,skip=skip)
     214        matchtable,filter_name,bandindex = matchSdssPs1(fpObjc,chipfile,skipMatch=skipMatch)
    162215        if filter_name not in filters:
    163216            filters.append(filter_name)
     
    614667    return array(good1_l),array(good2_l),array(good3_l)
    615668   
    616 def matchSdssPs1(SDSSfpObjc,PS1cmf,xoff=0.5,yoff=0.5,matchrad=0.7,skip=False):
     669def matchSdssPs1(SDSSfpObjc,PS1cmf,xoff=0.5,yoff=0.5,matchrad=0.7,skipMatch=False):
    617670    """Call matchByPos to match an SDSS fpObjc.fits and a PS1 bla.cmf
    618671    file."""
     
    645698    bandindex = filters.index(sdssbandstr)
    646699    outname = getOutname(SDSSfpObjc,PS1cmf,sdssbandstr)
    647     if skip:
     700    if skipMatch:
    648701        return outname,sdssbandstr,bandindex
    649702       
Note: See TracChangeset for help on using the changeset viewer.