IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changes between Initial Version and Version 1 of EssenceTest_IPP_2.0


Ignore:
Timestamp:
Feb 24, 2009, 4:23:55 PM (17 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • EssenceTest_IPP_2.0

    v1 v1  
     1=== Summary ===
     2The ESSENCE survey from the CTIO 4m telescope in Chile provides a good dataset for testing the IPP. This page details the steps required to run the ESSENCE data through the IPP.
     3
     4----
     5=== Annotated ESSENCE test walkthrough ===
     6
     7==== Configuration: ====
     8 * Check ~/.ipprc (or $PS_SITE) for:
     9  * DATAPATH for DATA,WORK
     10   * use DATA to specify where your raw data is. When making program calls on the command line, refer to this directory as path://DATA/
     11
     12  * DBSERVER, DBNAME, DBUSER, DBPASSWORD
     13
     14 * Check ~/.ptolemyrc for:
     15  * CONFDIR
     16
     17 * If you are making config tweaks for the ctio mosaic2 camera, make a configuration directory for them. 
     18  * in this ctio_mosaic2 config directory, you should have a camera.config file
     19  * Point to that dir in your .ipprc file. e.g.:
     20  ### Setups for each camera system
     21  CAMERAS               METADATA       
     22      MOSAIC2                   STR     /home/panstarrs/rodney/ctio_mosaic2/camera.config
     23  * in that camera.config file you can set up the parameters that ipp uses to recognize and interact with files originating on the ctio_mosaic2 camera. In camera.config you must point to a format.config file, which tells the IPP what your camera's fits file format looks like. These formats must match up with what ppImage.config is
     24
     25
     26
     27 
     28==== Initiating a database. ====
     29
     30Create an empty database: the dbadmin tool is a shell script that creates an SQL database and populates it with the tables needed by ippMonitor for user administration. The dbadmin script is probably not in your path, so find it in the ippMonitor source code directory and link to it or copy it somewhere.  Call dbadmin with no options for syntax help.
     31
     32 > dbadmin project alala ipp sress1
     33
     34Then initiate the new database
     35 > pxadmin -create -dbname sress1
     36
     37See [wiki:Simtest#Initiating_a_database Simtest#Initiating_a_database] for alternate methods.
     38
     39==== Injecting data ====
     40
     41First test: inject a single file into the db:
     42 > ipp_serial_inject.pl --workdir path://WORK/ --dbname sress1 /data/ipp003.0/SM_W/SM_SN03/sm030927/dflat021.fits
     43
     44You should see the newly injected file on the ippMonitor under "New Exp."  Then do the whole set:
     45 > ipp_serial_inject.pl --workdir path://WORK/ --dbname sress1 /data/ipp003.0/SM_W/SM_SN03/sm030927/[dflat,w,zero]*.fits
     46
     47(You may want to erase the previously injected file from the database, or else you will get multiple copies)
     48
     49==== Start pantasks ====
     50
     51See [wiki:Simtest#Start_pantasks Simtest#Start_pantasks] for details.
     52
     53==== Registration ====
     54
     55Follow the steps in [wiki:Simtest#Registration Simtest#Registration].
     56
     57==== Detrend Construction ====
     58
     59The procedure here is essentially the same as for the [wiki:Simtest Simtest] walkthrough. You must substitute the appropriate path and database names in your calls to dettool, and we want to pay more attention to the final products.
     60
     61When you create a detrend run using the dettool commands given below, the ipp by default sets it up in the "master" mode. It is trying to make a master bias frame using the set of input bias frames you have specified (with, e.g., the "-select_exp_type zero" option).  It will go through the input bias frames and iteratively reject some of them based on criteria set out in the rejections.config file. The base version of rejections.config is kept in the recipes directory.  You may specify a camera-level rejections.config file in your ctio_mosaic2/ directory that will override the recipes/ version.
     62
     63===== Bias =====
     64
     65 dettool -definebyquery -det_type BIAS -filelevel FPA -workdir path://SRESSWORK -inst MOSAIC2 -telescope BLANCO -select_exp_type zero
     66
     67 pantasks: run
     68
     69===== Dark =====
     70
     71 dettool -definebyquery -det_type DARK -filelevel FPA -workdir path://SRESSWORK/ -inst MOSAIC2 -telescope BLANCO -filter NONE -select_exp_type dark
     72
     73'''Note:''' most nights of essence data do not have dark frames. See, e.g., sm031026 for a handful of dark frames taken on a cloudy night.
     74
     75===== Flats =====
     76
     77 dettool -definebyquery -det_type FLAT -filelevel FPA -workdir path://SRESSWORK/ -inst MOSAIC2 -telescope BLANCO -filter "R Harris c6004" -select_exp_type "dome flat" -select_filter "R Harris c6004"
     78
     79 dettool -definebyquery -det_type FLAT -filelevel FPA -workdir path://SRESSWORK/ -inst MOSAIC2 -telescope BLANCO -filter "I c6028" -select_exp_type "dome flat" -select_filter "I c6028"
     80
     81'''NOTE:''' Make sure the -filter you give it here matches up with the filter name in the database entries for your science exposures. (i.e. don't do "-filter I" if your science exposures have "I c6028" as their filter name).
     82
     83==== Detrend Analysis ====
     84
     85After creating a first master bias, you will want to examine the residuals from the component bias images used as input. In ippMonitor, go to Detrend Steps - Detrend Frames and click on the 'resid' link next to the bias you've just created. This will show you the residuals from the component images. Check out the jpeg images and the reported stats: background, stdev of components, stdev of image, stdev of binned image, S/N, etc.   
     86
     87You might want to make some plots of the statistics shown in this - or some other - ippMonitor table. For this we use the '''dvo''' program. '''dvo''' is a mongo-like plotting program that can also access SQL databases to ingest data. Within dvo, you connect to a database with 'dbconnect', and you can issue sql commands with 'dbselect {sql command}'.  (Useful SQL queries can be grabbed from the bottom of the ippMonitor pages.) The results of the sql command are returned as dvo vectors (but all values are floats, so you can't retrieve string-valued data cells). Use 'help {cmd}' to get some command help.  In particular, try 'help style' for plotting style parameters. Here is an example of how to plot the raw detrend image backgrounds against their exposure times:
     88
     89 > dvo
     90 dvo: dbconnect (hostname) (username) (database)
     91 dvo: dbselect exp_time,bg FROM rawExp WHERE rawExp.exp_type != 'OBJECT'
     92 dvo: vectors
     93    N       name      size
     94    0   exp_time         60
     95    1         bg         60
     96 dvo: limits bg exp_time
     97 dvo: box
     98 dvo: plot bg exp_time -x 2 -pt 7 -sz 2
     99
     100If you pick out some bad images that are degrading your master bias, you will want to make a new detrun that excludes those bad eggs. There are a ton of dettool modes and options available to pick out your desired subset of images.  Call dettool with no options to get a list of major modes. You can only run dettool with one of these major modes at a time.  Use "dettool -(major_mode)" to get a list of the options for the mode you are interested in. Some are required, others optional.  Here is an example that makes a master bias by calling out a couple of input frames explicitly using their exposure tags:
     101
     102 dettool -definebytag -det_type BIAS -workdir path://SRESSWORK/ -exptag zero001.53 -exptag zero010.62 -exptag zero018.70
     103
     104(I grabbed the exposure tags from the ippMonitor tables)
     105
     106
     107==== Chip and camera processing ====
     108
     109The next step is to apply the detrending to the science images. The available detrend steps are:
     110 * overscan subtraction
     111 * bias subtraction
     112 * dark subtraction
     113 * flat field normalization
     114 * mask bad pixels
     115 * fringe subtraction
     116 * source identification and photometry
     117 * astrometry on each chip
     118 * astrometry for a mosaic of multiple chips
     119 * save detrended image(s)
     120
     121All of these steps can be turned on or off by editing this camera's version of ppImage.config, which should contain switches for the various steps used in the creation of detrend images as well as in the creation of detrended science images. Remember to point to the modified version of ppImage.config in your .ipprc and camera.config files!
     122From within pantasks, starting the chip and camera level processing is simple:
     123 
     124 pantasks: chip.on
     125 pantasks: camera.on
     126 pantasks: detrend.off
     127 pantasks: run