lsst.pipe.drivers  17.0.1-10-g87f9f3f+15
Public Member Functions | Static Public Attributes | List of all members
lsst.pipe.drivers.constructCalibs.FringeTask Class Reference
Inheritance diagram for lsst.pipe.drivers.constructCalibs.FringeTask:
lsst.pipe.drivers.constructCalibs.CalibTask lsst::ctrl::pool::parallel::BatchPoolTask lsst::ctrl::pool::parallel::BatchCmdLineTask

Public Member Functions

def applyOverrides (cls, config)
 
def __init__ (self, args, kwargs)
 
def processSingle (self, sensorRef)
 
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 scatterProcess (self, pool, ccdIdLists)
 Scatter the processing among the nodes. More...
 
def process (self, cache, ccdId, outputName="postISRCCD", kwargs)
 Process a CCD, specified by a data identifier. More...
 
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 combine (self, cache, struct, outputId)
 Combine multiple exposures of a particular CCD and write the output. More...
 
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 = FringeConfig
 
string calibName = "fringe"
 
 RunnerClass = CalibTaskRunner
 
 filterName = None
 
float exposureTime = 1.0
 

Detailed Description

Fringe construction task

The principal change from the base class is that the images are
background-subtracted and rescaled by the background.

XXX This is probably not right for a straight-up combination, as we
are currently doing, since the fringe amplitudes need not scale with
the continuum.

XXX Would like to have this do PCA and generate multiple images, but
that will take a bit of work with the persistence code.

Definition at line 1127 of file constructCalibs.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 1149 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 553 of file constructCalibs.py.

◆ applyOverrides()

def lsst.pipe.drivers.constructCalibs.FringeTask.applyOverrides (   cls,
  config 
)
Overrides for fringe construction

Definition at line 1145 of file constructCalibs.py.

◆ batchWallTime()

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

Definition at line 414 of file constructCalibs.py.

◆ calculateOutputHeaderFromRaws()

def lsst.pipe.drivers.constructCalibs.CalibTask.calculateOutputHeaderFromRaws (   self,
  butler,
  calib,
  dataIdList,
  outputId 
)
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.

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

Definition at line 770 of file constructCalibs.py.

◆ checkCcdIdLists()

def lsst.pipe.drivers.constructCalibs.CalibTask.checkCcdIdLists (   self,
  ccdIdLists 
)
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 890 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)
Returns
binned calib image

Definition at line 730 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 548 of file constructCalibs.py.

◆ getFullyQualifiedOutputId()

def lsst.pipe.drivers.constructCalibs.CalibTask.getFullyQualifiedOutputId (   self,
  ccdName,
  butler,
  outputId 
)
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 714 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 535 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 500 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 851 of file constructCalibs.py.

◆ makeCameraImage()

def lsst.pipe.drivers.constructCalibs.CalibTask.makeCameraImage (   self,
  camera,
  dataId,
  calibs 
)
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.

Parameters
cameraCamera object
dataIdData identifier for output
calibsDict mapping CCD detector ID to calib image

Definition at line 878 of file constructCalibs.py.

◆ process()

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

◆ processResult()

def lsst.pipe.drivers.constructCalibs.CalibTask.processResult (   self,
  exposure 
)
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.

Definition at line 664 of file constructCalibs.py.

◆ processSingle()

def lsst.pipe.drivers.constructCalibs.FringeTask.processSingle (   self,
  sensorRef 
)
Subtract the background and normalise by the background level

Definition at line 1155 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 650 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 823 of file constructCalibs.py.

◆ runDataRef()

def lsst.pipe.drivers.constructCalibs.CalibTask.runDataRef (   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 426 of file constructCalibs.py.

◆ scale()

def lsst.pipe.drivers.constructCalibs.CalibTask.scale (   self,
  ccdIdLists,
  data 
)
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.

Parameters
ccdIdListsDict of data identifier lists for each CCD tuple
dataDict of lists of returned data for each CCD tuple
Returns
dict of Struct(ccdScale: scaling for CCD, expScales: scaling for each exposure ) for each CCD tuple

Definition at line 675 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
dictof binned images

Definition at line 694 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 590 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 574 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 866 of file constructCalibs.py.

Member Data Documentation

◆ calibName

string lsst.pipe.drivers.constructCalibs.FringeTask.calibName = "fringe"
static

Definition at line 1142 of file constructCalibs.py.

◆ ConfigClass

lsst.pipe.drivers.constructCalibs.FringeTask.ConfigClass = FringeConfig
static

Definition at line 1140 of file constructCalibs.py.

◆ exposureTime

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

Definition at line 405 of file constructCalibs.py.

◆ filterName

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

Definition at line 403 of file constructCalibs.py.

◆ RunnerClass

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

Definition at line 402 of file constructCalibs.py.


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