ScaleZeroPointTask#

class lsst.pipe.tasks.scaleZeroPoint.ScaleZeroPointTask(*args, **kwargs)#

Bases: Task

Compute scale factor to scale exposures to a desired photometric zero point.

This simple version assumes that the zero point is spatially invariant.

Methods Summary

computeImageScaler(exposure[, dataRef])

Compute image scaling object for a given exposure.

getPhotoCalib()

Get desired PhotoCalib.

run(exposure[, dataRef])

Scale the specified exposure to the desired photometric zeropoint.

scaleFromFluxMag0(fluxMag0)

Compute the scale for the specified fluxMag0.

scaleFromPhotoCalib(calib)

Compute the scale for the specified PhotoCalib.

Methods Documentation

computeImageScaler(exposure, dataRef=None)#

Compute image scaling object for a given exposure.

Parameters#

exposurelsst.afw.image.Exposure

Exposure for which scaling is desired.

dataRefUnknown, optional

Data reference for exposure. Not used, but in API so that users can switch between spatially variant and invariant tasks.

getPhotoCalib()#

Get desired PhotoCalib.

Returns#

calibrationlsst.afw.image.PhotoCalib

Calibration with fluxMag0 set appropriately for config.zeroPoint.

run(exposure, dataRef=None)#

Scale the specified exposure to the desired photometric zeropoint.

Parameters#

exposurelsst.afw.image.Exposure

Exposure to scale; masked image is scaled in place.

dataRefUnknown, optional

Data reference for exposure. Not used, but in API so that users can switch between spatially variant and invariant tasks.

Returns#

resultStruct

Results as a struct with attributes:

imageScaler

The image scaling object used to scale exposure.

scaleFromFluxMag0(fluxMag0)#

Compute the scale for the specified fluxMag0.

This is a wrapper around scaleFromPhotoCalib, which see for more information.

Parameters#

fluxMag0float

Flux at magnitude zero.

Returns#

resultlsst.pipe.base.Struct

Results as a struct with attributes:

scale

Scale, such that if pixelCalib describes the photometric zeropoint of a pixel then the following scales that pixel to the photometric zeropoint specified by config.zeroPoint:

scale = computeScale(pixelCalib) pixel *= scale

scaleFromPhotoCalib(calib)#

Compute the scale for the specified PhotoCalib.

Parameter#

caliblsst.afw.image.PhotoCalib

PhotoCalib object to compute the scale from.

Returns#

resultlsst.pipe.base.Struct

Results as a struct with attributes:

scale

Scale, such that if pixelCalib describes the photometric zeropoint of a pixel then the following scales that pixel to the photometric zeropoint specified by config.zeroPoint:

scale = computeScale(pixelCalib) pixel *= scale

Notes#

Returns a struct to leave room for scaleErr in a future implementation.