== pswarp == (Up to the [wiki:IPP_Description IPP Description Page]) pswarp invocation (single input exposure set): {{{ pswarp -file input.fits output skycell : input.fits must define the astrometry of the input pixels, skycell defines target astrometry. pswarp -file input.fits -astrom astrom.cmf output skycell : astrom.cmf defines astrometry for input.fits }}} pswarp invocation (multiple inputs): {{{ pswarp -input file.mcd output skycell : input files are defined in the file.mdc }}} Example of input.mdc: {{{ INPUT MULTI INPUT METADATA INPUT STR RINGS.V3.skycell.1314.011.stk.1033022.fits # signal image filename MASK STR RINGS.V3.skycell.1314.011.stk.1033022.mask.fits # signal image filename VARIANCE STR RINGS.V3.skycell.1314.011.stk.1033022.wt.fits # signal image filename END INPUT METADATA INPUT STR RINGS.V3.skycell.1314.012.stk.1033023.fits # signal image filename MASK STR RINGS.V3.skycell.1314.012.stk.1033023.mask.fits # signal image filename VARIANCE STR RINGS.V3.skycell.1314.012.stk.1033023.wt.fits # signal image filename END }}} pswarp outline * generic initializations * pswarpArguments : parse the command line arguments * pswarpParseCamera : examine the input files and skycell, construct containers for the outputs (do not yet generate pixels) * pswarpOptions : set various options which may depend on the camera and command line arguments * pswarpDefineLayout : load astrometry information (headers only), determine the overlaps between the inputs and the outputs, generate the output pixels * pswarpLoop : loop over inputs & outputs, warp the inputs into the outputs, transform the input sources (if any), measure the new PSF model, convert input metadata to output metadata values * pswarpLoopBackground : equivalent to pswarpLoop, transform the background models * pswarpCleanup : write the outputs to disk, free memory NOTE: as of 2013.05.09 there has been a substantial re-work of pswarp to enable 'inverse warping', that is to say warping from skycells to the original focal plane. This modification drove a few specific changes: * the output format may now represent a full FPA output file (with chips and cells, etc). * there may now be multiple input 'exposures' (more accurately: file sets) so that a group of skycells can be warped to a single output image * the astrometric relationships / overlaps are calculated up front (in pswarpDefineLayout) before any pixels are loaded. This is necessary to avoid generating the output pixels in (for example) a full GPC1 FPA if only a few of the output pixels are needed. * the input files may now be specified in a metadata config file as illustrated above (similar to the inputs to ppStack & psphotStack). There are effectively 3 modes of operation : chip-to-warp (the traditional mode), chip-to-chip, and warp-to-chip.