CutOutDonutsScienceSensorTask#

class lsst.ts.wep.task.CutOutDonutsScienceSensorTask(**kwargs)#

Bases: CutOutDonutsBaseTask

Run Zernike Estimation in full-array mode (FAM)

Parameters:

kwargs (Any)

Methods Summary

assignExtraIntraIdx(focusZVal0, focusZVal1, ...)

Identify which exposure in the list is the extra-focal and which is the intra-focal based upon FOCUSZ parameter in header.

run(exposures, donutCatalog, camera)

Run task algorithm on in-memory data.

runQuantum(butlerQC, inputRefs, outputRefs)

We need to be able to take pairs of detectors from the full set of detector exposures and run the task.

Methods Documentation

assignExtraIntraIdx(focusZVal0, focusZVal1, cameraName)#

Identify which exposure in the list is the extra-focal and which is the intra-focal based upon FOCUSZ parameter in header.

Parameters:
  • focusZVal0 (float) – The FOCUSZ parameter from the first exposure.

  • focusZVal1 (float) – The FOCUSZ parameter from the second exposure.

  • cameraName (str) – Name of camera for the exposure. Can accept “LSSTCam”, “LSSTComCam”, “LSSTComCamSim”, “LATISS”.

Return type:

tuple[int, int]

Returns:

  • int – Index in list which is extra-focal image.

  • int – Index in list which is intra-focal image.

Raises:
  • ValueError – Exposures must be a pair with one intra-focal and one extra-focal image.

  • ValueError – Invalid cameraName variable.

run(exposures, donutCatalog, camera)#

Run task algorithm on in-memory data.

This method should be implemented in a subclass. This method will receive keyword-only arguments whose names will be the same as names of connection fields describing input dataset types. Argument values will be data objects retrieved from data butler. If a dataset type is configured with multiple field set to True then the argument value will be a list of objects, otherwise it will be a single object.

If the task needs to know its input or output DataIds then it also has to override the runQuantum method.

This method should return a Struct whose attributes share the same name as the connection fields describing output dataset types.

Parameters:

**kwargs (Any) – Arbitrary parameters accepted by subclasses.

Returns:

struct – Struct with attribute names corresponding to output connection fields.

Return type:

Struct

Examples

Typical implementation of this method may look like:

def run(self, *, input, calib):
    # "input", "calib", and "output" are the names of the
    # connection fields.

    # Assuming that input/calib datasets are `scalar` they are
    # simple objects, do something with inputs and calibs, produce
    # output image.
    image = self.makeImage(input, calib)

    # If output dataset is `scalar` then return object, not list
    return Struct(output=image)
Parameters:
  • exposures (list[Exposure])

  • donutCatalog (list[QTable])

  • camera (Camera)

runQuantum(butlerQC, inputRefs, outputRefs)#

We need to be able to take pairs of detectors from the full set of detector exposures and run the task. Then we need to put the outputs back into the butler repository with the appropriate butler dataIds.

For the outputZernikesRaw and outputZernikesAvg we only have one set of values per pair of wavefront detectors so we put this in the dataId associated with the extra-focal detector.

Parameters:
  • butlerQC (QuantumContext)

  • inputRefs (InputQuantizedConnection)

  • outputRefs (OutputQuantizedConnection)

Return type:

None