lsst.pipe.drivers
20.0.0+0f1288e849
|
Public Member Functions | |
def | __init__ (self, *args, **kwargs) |
def | scatterProcess (self, pool, ccdIdLists) |
Scatter the processing among the nodes. More... | |
def | measureBackground (self, cache, dataId) |
Measure background model for CCD. More... | |
def | processSingleBackground (self, dataRef) |
Process a single CCD for the background. More... | |
def | processSingle (self, dataRef, backgrounds, scales) |
def | combine (self, cache, struct, outputId) |
Combine multiple background models of a particular CCD and write the output. More... | |
def | batchWallTime (cls, time, parsedCmd, numCores) |
def | batchWallTime (cls, time, parsedCmd, numCores) |
def | runDataRef (self, expRefList, butler, calibId) |
Construct a calib from a list of exposure references. More... | |
def | getOutputId (self, expRefList, calibId) |
Generate the data identifier for the output calib. More... | |
def | getMjd (self, butler, dataId, timescale=dafBase.DateTime.UTC) |
def | getFilter (self, butler, dataId) |
def | addMissingKeys (self, dataId, butler, missingKeys=None, calibName=None) |
def | updateMetadata (self, calibImage, exposureTime, darkTime=None, **kwargs) |
Update the metadata from the VisitInfo. More... | |
def | process (self, cache, ccdId, outputName="postISRCCD", **kwargs) |
Process a CCD, specified by a data identifier. More... | |
def | processSingle (self, dataRef) |
def | processWrite (self, dataRef, exposure, outputName="postISRCCD") |
Write the processed CCD. More... | |
def | processResult (self, exposure) |
def | scale (self, ccdIdLists, data) |
Determine scaling across CCDs and exposures. More... | |
def | scatterCombine (self, pool, outputId, ccdIdLists, scales) |
Scatter the combination of exposures across multiple nodes. More... | |
def | getFullyQualifiedOutputId (self, ccdName, butler, outputId) |
def | calculateOutputHeaderFromRaws (self, butler, calib, dataIdList, outputId) |
Calculate the output header from the raw headers. More... | |
def | recordCalibInputs (self, butler, calib, dataIdList, outputId) |
Record metadata including the inputs and creation details. More... | |
def | interpolateNans (self, image) |
def | write (self, butler, exposure, dataId) |
Write the final combined calib. More... | |
def | makeCameraImage (self, camera, dataId, calibs) |
Create and write an image of the entire camera. More... | |
def | checkCcdIdLists (self, ccdIdLists) |
def | parseAndRun (cls, *args, **kwargs) |
def | parseAndSubmit (cls, args=None, **kwargs) |
def | batchCommand (cls, args) |
def | logOperation (self, operation, catch=False, trace=True) |
Static Public Attributes | |
ConfigClass = SkyConfig | |
string | calibName = "sky" |
RunnerClass = CalibTaskRunner | |
filterName = None | |
float | exposureTime = 1.0 |
Task for sky frame construction The sky frame is a (relatively) small-scale background model, the response of the camera to the sky. To construct, we first remove a large-scale background (e.g., caused by moonlight) which may vary from image to image. Then we construct a model of the sky, which is essentially a binned version of the image (important configuration parameters: sky.background.[xy]BinSize). It is these models which are coadded to yield the sky frame.
Definition at line 1182 of file constructCalibs.py.
def lsst.pipe.drivers.constructCalibs.SkyTask.__init__ | ( | self, | |
* | args, | ||
** | kwargs | ||
) |
Constructor
Reimplemented from lsst.pipe.drivers.constructCalibs.CalibTask.
Definition at line 1198 of file constructCalibs.py.
|
inherited |
Definition at line 549 of file constructCalibs.py.
|
inherited |
Definition at line 410 of file constructCalibs.py.
|
inherited |
Calculate the output header from the raw headers.
This metadata will go into the output FITS header. It will include all headers that are identical in all inputs.
butler | Data butler |
calib | Combined calib exposure. |
dataIdList | List of data identifiers for calibration inputs |
outputId | Data identifier for output |
Definition at line 766 of file constructCalibs.py.
|
inherited |
Check that the list of CCD dataIds is consistent @param ccdIdLists Dict of data identifier lists for each CCD name @return Number of exposures, number of CCDs
Definition at line 886 of file constructCalibs.py.
def lsst.pipe.drivers.constructCalibs.SkyTask.combine | ( | self, | |
cache, | |||
struct, | |||
outputId | |||
) |
Combine multiple background models of a particular CCD and write the output.
Only the slave nodes execute this method.
cache | Process pool cache |
struct | Parameters for the combination, which has the following components:
|
outputId | Data identifier for combined image (exposure part only) |
Reimplemented from lsst.pipe.drivers.constructCalibs.CalibTask.
Definition at line 1316 of file constructCalibs.py.
|
inherited |
Determine the filter from a data identifier
Definition at line 544 of file constructCalibs.py.
|
inherited |
Get fully-qualified output data identifier We may need to look up keys that aren't in the output dataId. @param ccdName Name tuple for CCD @param butler Data butler @param outputId Data identifier for combined image (exposure part only) @return fully-qualified output dataId
Definition at line 710 of file constructCalibs.py.
|
inherited |
Determine the Modified Julian Date (MJD; in TAI) from a data identifier
Definition at line 531 of file constructCalibs.py.
|
inherited |
Generate the data identifier for the output calib.
The mean date and the common filter are included, using keywords from the configuration. The CCD-specific part is not included in the data identifier.
expRefList | List of data references at exposure level |
calibId | Data identifier elements for the calib provided by the user |
Definition at line 496 of file constructCalibs.py.
|
inherited |
Interpolate over NANs in the combined image NANs can result from masked areas on the CCD. We don't want them getting into our science images, so we replace them with the median of the image.
Definition at line 847 of file constructCalibs.py.
|
inherited |
Create and write an image of the entire camera.
This is useful for judging the quality or getting an overview of the features of the calib.
camera | Camera object |
dataId | Data identifier for output |
calibs | Dict mapping CCD detector ID to calib image |
Definition at line 874 of file constructCalibs.py.
def lsst.pipe.drivers.constructCalibs.SkyTask.measureBackground | ( | self, | |
cache, | |||
dataId | |||
) |
Measure background model for CCD.
This method is executed by the slaves.
The background models for all CCDs in an exposure will be combined to form a full focal-plane background model.
cache | Process pool cache |
dataId | Data identifier |
Definition at line 1246 of file constructCalibs.py.
|
inherited |
Process a CCD, specified by a data identifier.
After processing, optionally returns a result (produced by the 'processResult' method) calculated from the processed exposure. These results will be gathered by the master node, and is a means for coordinated scaling of all CCDs for flats, etc.
Only slave nodes execute this method.
cache | Process pool cache |
ccdId | Data identifier for CCD |
outputName | Output dataset name for butler |
Definition at line 602 of file constructCalibs.py.
|
inherited |
Extract processing results from a processed exposure This method generates what is gathered by the master node. This can be a background measurement or similar for scaling flat-fields. It must be picklable! Only slave nodes execute this method.
Reimplemented in lsst.pipe.drivers.constructCalibs.FlatTask.
Definition at line 660 of file constructCalibs.py.
|
inherited |
Process a single CCD, specified by a data reference Generally, this simply means doing ISR. Only slave nodes execute this method.
Reimplemented in lsst.pipe.drivers.constructCalibs.FringeTask, and lsst.pipe.drivers.constructCalibs.DarkTask.
Definition at line 637 of file constructCalibs.py.
def lsst.pipe.drivers.constructCalibs.SkyTask.processSingle | ( | self, | |
dataRef, | |||
backgrounds, | |||
scales | |||
) |
Process a single CCD, specified by a data reference We subtract the appropriate focal plane background model, divide by the appropriate scale and measure the background. Only slave nodes execute this method. @param dataRef Data reference for single CCD @param backgrounds Background model for each visit @param scales Scales for each visit @return Processed exposure
Definition at line 1288 of file constructCalibs.py.
def lsst.pipe.drivers.constructCalibs.SkyTask.processSingleBackground | ( | self, | |
dataRef | |||
) |
Process a single CCD for the background.
This method is executed by the slaves.
Because we're interested in the background, we detect and mask astrophysical sources, and pixels above the noise level.
dataRef | Data reference for CCD. |
Definition at line 1269 of file constructCalibs.py.
|
inherited |
Write the processed CCD.
We need to write these out because we can't hold them all in memory at once.
Only slave nodes execute this method.
dataRef | Data reference |
exposure | CCD exposure to write |
outputName | Output dataset name for butler. |
Definition at line 646 of file constructCalibs.py.
|
inherited |
Record metadata including the inputs and creation details.
This metadata will go into the FITS header.
butler | Data butler |
calib | Combined calib exposure. |
dataIdList | List of data identifiers for calibration inputs |
outputId | Data identifier for output |
Definition at line 819 of file constructCalibs.py.
|
inherited |
Construct a calib from a list of exposure references.
This is the entry point, called by the TaskRunner.__call__
Only the master node executes this method.
expRefList | List of data references at the exposure level |
butler | Data butler |
calibId | Identifier dict for calib |
Definition at line 422 of file constructCalibs.py.
|
inherited |
Determine scaling across CCDs and exposures.
This is necessary mainly for flats, so as to determine a consistent scaling across the entire focal plane. This implementation is simply a placeholder.
Only the master node executes this method.
ccdIdLists | Dict of data identifier lists for each CCD tuple |
data | Dict of lists of returned data for each CCD tuple |
Reimplemented in lsst.pipe.drivers.constructCalibs.FlatTask.
Definition at line 671 of file constructCalibs.py.
|
inherited |
Scatter the combination of exposures across multiple nodes.
In this case, we can only scatter across as many nodes as there are CCDs.
Only the master node executes this method.
pool | Process pool |
outputId | Output identifier (exposure part only) |
ccdIdLists | Dict of data identifier lists for each CCD name |
scales | Dict of structs with scales, for each CCD name |
dict | of binned images |
Definition at line 690 of file constructCalibs.py.
def lsst.pipe.drivers.constructCalibs.SkyTask.scatterProcess | ( | self, | |
pool, | |||
ccdIdLists | |||
) |
Scatter the processing among the nodes.
Only the master node executes this method, assigning work to the slaves.
We measure and subtract off a large-scale background model across all CCDs, which requires a scatter/gather. Then we process the individual CCDs, subtracting the large-scale background model and the residual background model measured. These residuals will be combined for the sky frame.
pool | Process pool |
ccdIdLists | Dict of data identifier lists for each CCD name |
Reimplemented from lsst.pipe.drivers.constructCalibs.CalibTask.
Definition at line 1203 of file constructCalibs.py.
|
inherited |
Update the metadata from the VisitInfo.
calibImage | The image whose metadata is to be set |
exposureTime | The exposure time for the image |
darkTime | The time since the last read (default: exposureTime) |
Definition at line 570 of file constructCalibs.py.
|
inherited |
Write the final combined calib.
Only the slave nodes execute this method
butler | Data butler |
exposure | CCD exposure to write |
dataId | Data identifier for output |
Definition at line 862 of file constructCalibs.py.
|
static |
Definition at line 1196 of file constructCalibs.py.
|
static |
Definition at line 1194 of file constructCalibs.py.
|
staticinherited |
Definition at line 401 of file constructCalibs.py.
|
staticinherited |
Definition at line 399 of file constructCalibs.py.
|
staticinherited |
Definition at line 398 of file constructCalibs.py.