lsst.pipe.drivers  13.0-19-g8a3047b+11
Public Member Functions | Static Public Attributes | List of all members
lsst.pipe.drivers.constructCalibs.FlatTask Class Reference
Inheritance diagram for lsst.pipe.drivers.constructCalibs.FlatTask:
lsst.pipe.drivers.constructCalibs.CalibTask

Public Member Functions

def applyOverrides (cls, config)
 
def __init__ (self, args, kwargs)
 
def processResult (self, exposure)
 
def scale (self, ccdIdLists, data)
 
def batchWallTime (cls, time, parsedCmd, numCores)
 
def run (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 scatterProcess (self, pool, ccdIdLists)
 Scatter the processing among the nodes. More...
 
def process (self, cache, ccdId, outputName="postISRCCD")
 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 scatterCombine (self, pool, outputId, ccdIdLists, scales)
 Scatter the combination of exposures across multiple nodes. More...
 
def combine (self, cache, struct, outputId)
 Combine multiple exposures of a particular CCD and write the output. 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...
 

Static Public Attributes

 ConfigClass = FlatConfig
 
string calibName = "flat"
 
 RunnerClass = CalibTaskRunner
 
 filterName = None
 
float exposureTime = 1.0
 

Detailed Description

Flat construction

The principal change from the base class involves gathering the background
values from each image and using them to determine the scalings for the final
combination.

Definition at line 850 of file constructCalibs.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.pipe.drivers.constructCalibs.FlatTask.__init__ (   self,
  args,
  kwargs 
)

Definition at line 867 of file constructCalibs.py.

Member Function Documentation

◆ addMissingKeys()

def lsst.pipe.drivers.constructCalibs.CalibTask.addMissingKeys (   self,
  dataId,
  butler,
  missingKeys = None,
  calibName = None 
)
inherited

Definition at line 470 of file constructCalibs.py.

◆ applyOverrides()

def lsst.pipe.drivers.constructCalibs.FlatTask.applyOverrides (   cls,
  config 
)
Overrides for flat construction

Definition at line 862 of file constructCalibs.py.

◆ batchWallTime()

def lsst.pipe.drivers.constructCalibs.CalibTask.batchWallTime (   cls,
  time,
  parsedCmd,
  numCores 
)
inherited

Definition at line 360 of file constructCalibs.py.

◆ combine()

def lsst.pipe.drivers.constructCalibs.CalibTask.combine (   self,
  cache,
  struct,
  outputId 
)
inherited

Combine multiple exposures of a particular CCD and write the output.

Only the slave nodes execute this method.

Parameters
cacheProcess pool cache
structParameters for the combination, which has the following components:
  • ccdName Name tuple for CCD
  • ccdIdList List of data identifiers for combination
  • scales Scales to apply (expScales are scalings for each exposure, ccdScale is final scale for combined image)
outputIdData identifier for combined image (exposure part only)

Definition at line 645 of file constructCalibs.py.

◆ getFilter()

def lsst.pipe.drivers.constructCalibs.CalibTask.getFilter (   self,
  butler,
  dataId 
)
inherited
Determine the filter from a data identifier

Definition at line 465 of file constructCalibs.py.

◆ getMjd()

def lsst.pipe.drivers.constructCalibs.CalibTask.getMjd (   self,
  butler,
  dataId,
  timescale = dafBase.DateTime.UTC 
)
inherited
Determine the Modified Julian Date (MJD; in TAI) from a data identifier

Definition at line 452 of file constructCalibs.py.

◆ getOutputId()

def lsst.pipe.drivers.constructCalibs.CalibTask.getOutputId (   self,
  expRefList,
  calibId 
)
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.

Parameters
expRefListList of data references at exposure level
calibIdData identifier elements for the calib provided by the user
Returns
data identifier

Definition at line 417 of file constructCalibs.py.

◆ interpolateNans()

def lsst.pipe.drivers.constructCalibs.CalibTask.interpolateNans (   self,
  image 
)
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 717 of file constructCalibs.py.

◆ process()

def lsst.pipe.drivers.constructCalibs.CalibTask.process (   self,
  cache,
  ccdId,
  outputName = "postISRCCD" 
)
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.

Parameters
cacheProcess pool cache
ccdIdData identifier for CCD
outputNameOutput dataset name for butler
Returns
result from 'processResult'

Definition at line 539 of file constructCalibs.py.

◆ processResult()

def lsst.pipe.drivers.constructCalibs.FlatTask.processResult (   self,
  exposure 
)

Definition at line 871 of file constructCalibs.py.

◆ processSingle()

def lsst.pipe.drivers.constructCalibs.CalibTask.processSingle (   self,
  dataRef 
)
inherited
Process a single CCD, specified by a data reference

Generally, this simply means doing ISR.

Only slave nodes execute this method.

Definition at line 574 of file constructCalibs.py.

◆ processWrite()

def lsst.pipe.drivers.constructCalibs.CalibTask.processWrite (   self,
  dataRef,
  exposure,
  outputName = "postISRCCD" 
)
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.

Parameters
dataRefData reference
exposureCCD exposure to write
outputNameOutput dataset name for butler.

Definition at line 583 of file constructCalibs.py.

◆ recordCalibInputs()

def lsst.pipe.drivers.constructCalibs.CalibTask.recordCalibInputs (   self,
  butler,
  calib,
  dataIdList,
  outputId 
)
inherited

Record metadata including the inputs and creation details.

This metadata will go into the FITS header.

Parameters
butlerData butler
calibCombined calib exposure.
dataIdListList of data identifiers for calibration inputs
outputIdData identifier for output

Definition at line 687 of file constructCalibs.py.

◆ run()

def lsst.pipe.drivers.constructCalibs.CalibTask.run (   self,
  expRefList,
  butler,
  calibId 
)
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.

Parameters
expRefListList of data references at the exposure level
butlerData butler
calibIdIdentifier dict for calib

Definition at line 372 of file constructCalibs.py.

◆ scale()

def lsst.pipe.drivers.constructCalibs.FlatTask.scale (   self,
  ccdIdLists,
  data 
)
Determine the scalings for the final combination

We have a matrix B_ij = C_i E_j, where C_i is the relative scaling
of one CCD to all the others in an exposure, and E_j is the scaling
of the exposure.  We convert everything to logarithms so we can work
with a linear system.  We determine the C_i and E_j from B_ij by iteration,
under the additional constraint that the average CCD scale is unity.

This algorithm comes from Eugene Magnier and Pan-STARRS.

Definition at line 874 of file constructCalibs.py.

◆ scatterCombine()

def lsst.pipe.drivers.constructCalibs.CalibTask.scatterCombine (   self,
  pool,
  outputId,
  ccdIdLists,
  scales 
)
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.

Parameters
poolProcess pool
outputIdOutput identifier (exposure part only)
ccdIdListsDict of data identifier lists for each CCD name
scalesDict of structs with scales, for each CCD name

Definition at line 627 of file constructCalibs.py.

◆ scatterProcess()

def lsst.pipe.drivers.constructCalibs.CalibTask.scatterProcess (   self,
  pool,
  ccdIdLists 
)
inherited

Scatter the processing among the nodes.

We scatter each CCD independently (exposures aren't grouped together), to make full use of all available processors. This necessitates piecing everything back together in the same format as ccdIdLists afterwards.

Only the master node executes this method.

Parameters
poolProcess pool
ccdIdListsDict of data identifier lists for each CCD name
Returns
Dict of lists of returned data for each CCD name

Definition at line 507 of file constructCalibs.py.

◆ updateMetadata()

def lsst.pipe.drivers.constructCalibs.CalibTask.updateMetadata (   self,
  calibImage,
  exposureTime,
  darkTime = None,
  kwargs 
)
inherited

Update the metadata from the VisitInfo.

Parameters
calibImageThe image whose metadata is to be set
exposureTimeThe exposure time for the image
darkTimeThe time since the last read (default: exposureTime)

Definition at line 491 of file constructCalibs.py.

◆ write()

def lsst.pipe.drivers.constructCalibs.CalibTask.write (   self,
  butler,
  exposure,
  dataId 
)
inherited

Write the final combined calib.

Only the slave nodes execute this method

Parameters
butlerData butler
exposureCCD exposure to write
dataIdData identifier for output

Definition at line 732 of file constructCalibs.py.

Member Data Documentation

◆ calibName

string lsst.pipe.drivers.constructCalibs.FlatTask.calibName = "flat"
static

Definition at line 859 of file constructCalibs.py.

◆ ConfigClass

lsst.pipe.drivers.constructCalibs.FlatTask.ConfigClass = FlatConfig
static

Definition at line 857 of file constructCalibs.py.

◆ exposureTime

float lsst.pipe.drivers.constructCalibs.CalibTask.exposureTime = 1.0
staticinherited

Definition at line 351 of file constructCalibs.py.

◆ filterName

lsst.pipe.drivers.constructCalibs.CalibTask.filterName = None
staticinherited

Definition at line 349 of file constructCalibs.py.

◆ RunnerClass

lsst.pipe.drivers.constructCalibs.CalibTask.RunnerClass = CalibTaskRunner
staticinherited

Definition at line 348 of file constructCalibs.py.


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