lsst.pipe.tasks  13.0-37-g58c8d4e+4
 All Classes Namespaces Files Functions Variables Groups Pages
Public Member Functions | Static Public Attributes | List of all members
lsst.pipe.tasks.makeCoaddTempExp.MakeCoaddTempExpTask Class Reference

Warp and optionally PSF-Match calexps onto an a common projection. More...

Inheritance diagram for lsst.pipe.tasks.makeCoaddTempExp.MakeCoaddTempExpTask:

Public Member Functions

def __init__
 
def run
 Produce <coaddName>Coadd_<warpType>Warp images by warping and optionally PSF-matching. More...
 
def createTempExp
 

Static Public Attributes

 ConfigClass = MakeCoaddTempExpConfig
 

Detailed Description

Warp and optionally PSF-Match calexps onto an a common projection.

Contents

Description

Warp and optionally PSF-Match calexps onto a common projection, by performing the following operations:

The result is a directWarp (and/or optionally a psfMatchedWarp).

Task Initialization

This task has no special keyword arguments.

Invoking the Task

This task is primarily designed to be run from the command line.

The main method is run, which takes a single butler data reference for the patch(es) to process.

Produce <coaddName>Coadd_<warpType>Warp images by warping and optionally PSF-matching.

Parameters
[in]patchRef,:data reference for sky map patch. Must include keys "tract", "patch", plus the camera-specific filter key (e.g. "filter" or "band")
Returns
: dataRefList: a list of data references for the new <coaddName>Coadd_directWarps if direct or both warp types are requested and <coaddName>Coadd_psfMatchedWarps if only psfMatched warps are requested.
Warning
: this task assumes that all exposures in a warp (coaddTempExp) have the same filter.
: this task sets the Calib of the coaddTempExp to the Calib of the first calexp with any good pixels in the patch. For a mosaic camera the resulting Calib should be ignored (assembleCoadd should determine zeropoint scaling without referring to it).

WarpType identifies the types of convolutions applied to Warps (previously CoaddTempExps). Only two types are available: direct (for regular Warps/Coadds) and psfMatched (for Warps/Coadds with homogenized PSFs). We expect to add a third type, likelihood, for generating likelihood Coadds with Warps that have been correlated with their own PSF.

Configuration parameters

See MakeCoaddTempExpConfig and parameters inherited from CoaddBaseConfig

Guide to PSF-Matching Configs

To make psfMatchedWarps, select config.makePsfMatched=True. The subtask ModelPsfMatchTask is responsible for the PSF-Matching, and its config is accessed via config.warpAndPsfMatch.psfMatch. The optimal configuration depends on aspects of dataset: the pixel scale, average PSF FWHM and dimensions of the PSF kernel. These configs include the requested model PSF, the matching kernel size, padding of the science PSF thumbnail and spatial sampling frequency of the PSF.

Config Guidelines: The user must specify the size of the model PSF to which to match by setting config.modelPsf.defaultFwhm in units of pixels. The appropriate values depends on science case. In general, for a set of input images, this config should equal the FWHM of the visit with the worst seeing. The smallest it should be set to is the median FWHM. The defaults of the other config options offer a reasonable starting point. The following list presents the most common problems that arise from a misconfigured ModelPsfMatchTask and corresponding solutions. All assume the default Alard-Lupton kernel, with configs accessed via config.warpAndPsfMatch.psfMatch.kernel['AL']. Each item in the list is formatted as: Problem: Explanation. Solution

Troublshooting PSF-Matching Configuration:

Debug variables

MakeCoaddTempExpTask has no debug output, but its subtasks do.

A complete example of using MakeCoaddTempExpTask

This example uses the package ci_hsc to show how MakeCoaddTempExp fits into the larger Data Release Processing. Set up by running:

setup ci_hsc
cd $CI_HSC_DIR
# if not built already:
python $(which scons)  # this will take a while

The following assumes that processCcd.py and makeSkyMap.py have previously been run (e.g. by building ci_hsc above) to generate a repository of calexps and an output respository with the desired SkyMap. The command,

makeCoaddTempExp.py $CI_HSC_DIR/DATA --rerun ci_hsc \
 --id patch=5,4 tract=0 filter=HSC-I \
 --selectId visit=903988 ccd=16 --selectId visit=903988 ccd=17 \
 --selectId visit=903988 ccd=23 --selectId visit=903988 ccd=24 \
 --config doApplyUberCal=False makePsfMatched=True modelPsf.defaultFwhm=11

writes a direct and PSF-Matched Warp to

Note
PSF-Matching in this particular dataset would benefit from adding --configfile ./matchingConfig.py to the command line arguments where matchingConfig.py is defined by:
echo "
config.warpAndPsfMatch.psfMatch.kernel['AL'].kernelSize=27
config.warpAndPsfMatch.psfMatch.kernel['AL'].alardSigGauss=[1.5, 3.0, 6.0]" > matchingConfig.py

Add the option --help to see more options.

Definition at line 69 of file makeCoaddTempExp.py.

Constructor & Destructor Documentation

def lsst.pipe.tasks.makeCoaddTempExp.MakeCoaddTempExpTask.__init__ (   self,
  args,
  kwargs 
)

Definition at line 224 of file makeCoaddTempExp.py.

Member Function Documentation

def lsst.pipe.tasks.makeCoaddTempExp.MakeCoaddTempExpTask.createTempExp (   self,
  calexpRefList,
  skyInfo,
  visitId = 0 
)
Create a Warp from inputs

We iterate over the multiple calexps in a single exposure to construct
the warp (previously called a coaddTempExp) of that exposure to the
supplied tract/patch.

Pixels that receive no pixels are set to NAN; this is not correct
(violates LSST algorithms group policy), but will be fixed up by
interpolating after the coaddition.

@param calexpRefList: List of data references for calexps that (may)
    overlap the patch of interest
@param skyInfo: Struct from CoaddBaseTask.getSkyInfo() with geometric
    information about the patch
@param visitId: integer identifier for visit, for the table that will
    produce the CoaddPsf
@return a pipeBase Struct containing:
  - exposures: a dictionary containing the warps requested:
"direct": direct warp if config.makeDirect
"psfMatched": PSF-matched warp if config.makePsfMatched

Definition at line 297 of file makeCoaddTempExp.py.

def lsst.pipe.tasks.makeCoaddTempExp.MakeCoaddTempExpTask.run (   self,
  patchRef,
  selectDataList = [] 
)

Produce <coaddName>Coadd_<warpType>Warp images by warping and optionally PSF-matching.

Parameters
[in]patchRef,:data reference for sky map patch. Must include keys "tract", "patch", plus the camera-specific filter key (e.g. "filter" or "band")
Returns
: dataRefList: a list of data references for the new <coaddName>Coadd_directWarps if direct or both warp types are requested and <coaddName>Coadd_psfMatchedWarps if only psfMatched warps are requested.
Warning
: this task assumes that all exposures in a warp (coaddTempExp) have the same filter.
: this task sets the Calib of the coaddTempExp to the Calib of the first calexp with any good pixels in the patch. For a mosaic camera the resulting Calib should be ignored (assembleCoadd should determine zeropoint scaling without referring to it).

Definition at line 229 of file makeCoaddTempExp.py.

Member Data Documentation

lsst.pipe.tasks.makeCoaddTempExp.MakeCoaddTempExpTask.ConfigClass = MakeCoaddTempExpConfig
static

Definition at line 221 of file makeCoaddTempExp.py.


The documentation for this class was generated from the following file: