This would be a good place to put info on using the ippTools.

Links to all FAQ pages : FAQ

skycells

(not technically an ippTool... perhaps this should be filed somewhere else?)

After the astrometric solution has been applied to a set of images, you are ready to warp those images onto the sky. To do that, you first must subdivide the sky into skycells. Each skycell is simply a rectangular projection of some fraction of the sky onto a flat plane. The IPP defines skycells using a tesselation of triangles with common bases. The center of each triangle defines the center of a skycell. To create a more finely spaced grid of skycells, one can divide a triangle into three new triangles with interior lines extending from the vertices to the center. With each level of triangle division, your skycells get smaller and the planar approximation of a spherical surface gets a little better. Once you have defined a rectangular patch of sky with a suitable number of triangle divisions, you may chop that rectangle into smaller rectangles with divisions in the x and y directions.

To define your tessellation of the sky, use the skycells program. Type skycells -h to get a list of options. The -level option sets the number of triangular subdivisions to use in the tessellation. If this option is omitted, skycells will use the SKY_DEPTH parameter from your .ptolemyrc file. Here is an example that was used to define the FIXNS tessellation pattern, intended for the GPC1 MD field data:

skycells -level 5 -scale 0.2 -nx 8 -ny 8 -fix-ns -padding 0.05

Here we have done 5 iterations of triangle divisions and we have set the pixel scale of the resulting cells to 0.2 arcsec/pixel. Each rectangular patch of sky is then divided into 64 skycells, with 8 divisions in x and y. The fix-ns command indicates that the y axis of every cell is oriented with Dec, and there is a 5% padding of each skycell to ensure sufficient overlap with neighbors. The result is a catalog that defines all the skycells necessary for filling the sky, stored in the files Images.dat and Photcodes.dat. Use the "-D CATDIR" option to specify the directory where Images.dat and Photcodes.dat should be written. The default is to make a subdirectoy called "default" in your cwd.

After you've created the Images.dat and Photcodes.dat catalogs, be sure to point to them in your camera.config file:

 TESSELLATIONS   METADATA
       # Tessellation name with corresponding DVO catdir
      MYSKYCELLS        STR     /path/to/catdir
 END 

Here are a few more examples of skycells commands from elsewhere on the wiki:

  • tessalations for PR images: skycells -D CATDIR skycells.4n.M31 4 -fix-ns -euler 1.5 1.8 -nx 6 -ny 6 -scale 0.333 skycells -D CATDIR skycells.4n.Holmes 4 -fix-ns -euler -0.1 -0.5 -nx 6 -ny 6 -scale 0.333

*Sebastian's LBC reductions skycells 6 -scale 0.2 -fix-ns -D CATDIR /disk1/jester/data/LBT/z7qso/sci/skycells

  • ESSENCE testing skycells -D CATDIR skycells 8 -scale 0.2

Labels

setting

With any of the ippTools, you can (and should!) use labels to separate your data into processing groups. When you define a chipRun, camRun, or any other run, the <code>-set_label</code> option allows you to provide a string to label all the processes that your ippTool creates. The label is then carried along to child processes as you step through subsequent stages of the IPP. For stages that are downstream of your initial labeled process, you may select the labeled outputs using the <code>-label</code> option.

For example, you can set up a chipRun with just the g-band MD01 exposures:

chiptool -set_label MD01.g -set_workdir /data/ipp004.0/gpc1/MD.SR -dbname PS1MD -definebyquery -ra_min 0.6 
-ra_max 0.645 -decl_min -0.08 -decl_max -0.07 -exp_time_min 200 -filter g.00000 -simple

and then later on (after initiating several other chipRuns for other fields and filters) you want to make a stack from all those exposures that you labeled with MD01.g:

stacktool -workdir MD.SR -dbname PS1MD -definebyquery<font color=green>-select_label MD01.g -simple

blocking

If you have been consistently applying labels as you inject your data or as you start your chip processes, then you can efficiently use the ippTools label-blocking feature to select out just a particular subset that you do (or don't) want to process right away. In any ippTool, use the -block option to set a block on a particular label. Use -unblock to remove that block. The -masked and -unmasked options will print out a list showing which exposures are carrying what labels, and whether or not they are currently being blocked from processing.

chiptool


camtool


warptool


stacktool

Stacktool is used to set up a stackRun, which creates a stack of overlapping images and sums them together. A single stackRun can create multiple stacked skycell images, by selecting the warped images that meet your specified criteria, finding all the skycells that those warps contribute to, and summing up each pile of skycell images individually. If you specify a skycell_id, of course, you will only stack on that skycell.

Most of the major modes are similar to modes from other ippTools. The most commonly used modes are discussed here.

-definebyquery

You must define a workdir with -workdir. It is recommended to use -label to keep things organized.

use the -select_ options to pick out the warped skyfiles you want to combine. The select_good_frac_min option requires that each contributing skyfile has to have that fraction of its area with good pixels.

-random : if your select settings return a large number of skyfiles, then you may not want to stack them all together. The random flag allows you to pick out a random subset from the collection of all matching skyfiles.

-min_num : you may only want to execute the stack when it has a certain number of contributing skyfiles. Specifying the -min_num option tells stacktool to return an empty set unless it has at least min_num skyfiles.

-min_new : ??

-min_frac : ??

-updaterun

As of 2008-09-18 on ipp-2.6.1 this can only change the state. Use 'new' to make it a pending job in the pantasks queue. Use 'full' to indicate successful completion. Any string is valid.

-revertsumskyfile

As described above, each stackRun may create multiple summed skyfiles. Use this mode to revert and restart any problemative summed skyfiles.


difftool

Set up a diffRun to create difference images by subtracting warped and/or summed skyfiles. Each subtraction defines one image as the "template" and the other as the "input". The difference image is (input - template).

-definepoprun

Use this option to set up a pop run (populated? popular? popsicle?) where you can explicitly specify the ID of both your template and input images. Each may be either a warped skyfile (use -input_warp_id or -template_warp_id) or a summed skyfile produced by a previous stackRun (use -input_stack_id or -template_stack_id).

-definebyquery

This mode searches for any possible difference matching the given criteria. It is designed to subtract a stack (summed skyfile) from a warp (single image skyfile). You can specify selection criteria involving either the input (warp) image or the template (stack) image, or both.

flatcorr

The flat-field correction system uses 'flatcorr' to interact with the ippdb. A flat-field correction run is defined for a set of exposures which have been observed with sufficient dithering to usefully measure the flat-field errors as a function of position. A flatcorr run defines a group of exposures that are to be processed first through chip, then camera, then addstar. A flat-field correction run can be defined either with a -definebyquery, which selects the raw exposures that should be used for the analysis, or with a -definerun command. The latter sets up an empty run which must be populated with -addchip calls (one addchip per exposure to be defined). In this case, the exposures should already be defined in a chipRun, and they may have been either completed in the chip analysis or not.

The flatcorr tasks monitor the associated chipRuns and, when any are completed, migrates them to the table of associated cameraRuns. This is done with the flatcorr -advancecamera command. It is also possible to add existing cameraRuns to the flatcorrRun with -addcamera. The flatcorr tasks also monitor the cameraRuns and generate addstarRuns as they complete (using the -advanceaddstar command).

When using -definerun, the flatcorrRun is generated in a state of 'reg'. This must be changed to 'new' before the processing will operate on the flatcorrRun. this may be done with the -updaterun command