IsrMockLSST#

class lsst.ip.isr.IsrMockLSST(**kwargs)#

Bases: IsrMock

Class to generate consistent mock images for ISR testing.

Methods Summary

addBiasLevel(ampData, biasLevel)

Add bias level to an amplifier's image data.

amplifierAddBrighterFatter(ampImageData, ...)

Add brighter fatter effect and/or diffusion to the image. Parameters ---------- ampImageData : lsst.afw.image.ImageF Amplifier image to operate on. rng : galsim.BaseDeviate Random number generator. bfStrength : float Scaling parameter of the brighter fatter effect (nominally = 1) nRecalc: 'int' The number of electrons to accumulate before recalculating the distortion of the pixel shapes.

amplifierAddDeferredCharge(exposure, amp)

Add serial CTI to the amplifier data.

amplifierAddNonlinearity(ampData, centers, ...)

Add non-linearity to amplifier data.

amplifierAddXGradient(ampData, start, end)

Add a x-axis linear gradient to an amplifier's image data.

amplifierMultiplyFlat(amp, ampData, fracDrop)

Multiply an amplifier's image data by a flat-like pattern.

applyGain(ampData, gain)

Apply gain to the amplifier's data.

getFullSerialOverscanBBox(amp)

Get the full serial overscan bounding box from an amplifier.

makeBfKernel()

Generate a simple simulated brighter-fatter kernel. Returns ------- kernel : lsst.ip.isr.BrighterFatterKernel Simulated brighter-fatter kernel.

makeDefectList([isTrimmed])

Generate a simple defect list.

makeDeferredChargeCalib()

Generate a CTI calibration.

makeElectrostaticBf()

Generate a simple simulated electrostatic brighter-fatter calibration.

makeImage()

Generate a simulated ISR LSST image.

makeLinearizer()

roundADU(ampData)

Round adu to nearest integer.

run()

Generate a mock ISR product following LSSTCam ISR, and return it.

Methods Documentation

addBiasLevel(ampData, biasLevel)#

Add bias level to an amplifier’s image data.

Parameters#

ampDatalsst.afw.image.ImageF

Amplifier image to operate on.

biasLevelfloat

Bias level to be added to the image.

amplifierAddBrighterFatter(ampImageData, rng, bfStrength, nRecalc)#

Add brighter fatter effect and/or diffusion to the image. Parameters ———- ampImageData : lsst.afw.image.ImageF

Amplifier image to operate on.

rnggalsim.BaseDeviate

Random number generator.

bfStrengthfloat

Scaling parameter of the brighter fatter effect (nominally = 1)

nRecalc: ‘int’

The number of electrons to accumulate before recalculating the distortion of the pixel shapes.

amplifierAddDeferredCharge(exposure, amp)#

Add serial CTI to the amplifier data.

Parameters#

exposurelsst.afw.image.ExposureF

The exposure object containing the amplifier to apply deferred charge to.

amplsst.afw.image.Amplifier

The amplifier object (contains geometry info).

amplifierAddNonlinearity(ampData, centers, values, offset)#

Add non-linearity to amplifier data.

Parameters#

ampDatalsst.afw.image.ImageF

Amplifier image to operate on.

centersnp.ndarray

Spline nodes.

valuesnp.ndarray

Spline values.

offsetfloat

Offset zero-point between linearizer (internal vs external).

amplifierAddXGradient(ampData, start, end)#

Add a x-axis linear gradient to an amplifier’s image data.

This method operates in the amplifier coordinate frame.

Parameters#

ampDatalsst.afw.image.ImageF

Amplifier image to operate on.

startfloat

Start value of the gradient (at x=0).

endfloat

End value of the gradient (at x=xmax).

amplifierMultiplyFlat(amp, ampData, fracDrop, u0=100.0, v0=100.0)#

Multiply an amplifier’s image data by a flat-like pattern.

Parameters#

amplsst.afw.ampInfo.AmpInfoRecord

Amplifier to operate on. Needed for amp<->exp coordinate transforms.

ampDatalsst.afw.image.ImageF

Amplifier image to operate on.

fracDropfloat

Fractional drop from center to edge of detector along x-axis.

u0float

Peak location in detector coordinates.

v0float

Peak location in detector coordinates.

applyGain(ampData, gain)#

Apply gain to the amplifier’s data. This method divides the data by the gain because the mocks need to convert the data in electron to adu, so it does the inverse operation to applyGains in isrFunctions.

Parameters#

ampDatalsst.afw.image.ImageF

Amplifier image to operate on.

gainfloat

Gain value in electron/adu.

getFullSerialOverscanBBox(amp)#

Get the full serial overscan bounding box from an amplifier.

This includes the serial/parallel overscan region.

Parameters#

amplsst.afw.ampInfo.AmpInfoRecord

Amplifier to operate on.

Returns#

bbox : lsst.geom.Box2I

makeBfKernel()#

Generate a simple simulated brighter-fatter kernel. Returns ——- kernel : lsst.ip.isr.BrighterFatterKernel

Simulated brighter-fatter kernel.

makeDefectList(isTrimmed=True)#

Generate a simple defect list.

Parameters#

isTrimmedbool, optional

Return defects in trimmed coordinates?

Returns#

defectListlsst.meas.algorithms.Defects

Simulated defect list

makeDeferredChargeCalib()#

Generate a CTI calibration.

Returns#

ctilsst.ip.isr.deferredCharge.DeferredChargeCalib

Simulated deferred charge calibration.

makeElectrostaticBf()#

Generate a simple simulated electrostatic brighter-fatter calibration.

Returns#

kernellsst.ip.isr.ElectrostaticBrighterFatterDistortionMatrix

Simulated brighter-fatter kernel.

makeImage()#

Generate a simulated ISR LSST image.

Returns#

exposurelsst.afw.image.Exposure or dict

Simulated ISR image data.

Notes#

This method constructs a “raw” data image.

makeLinearizer()#
roundADU(ampData)#

Round adu to nearest integer.

Parameters#

ampDatalsst.afw.image.ImageF

Amplifier image to operate on.

run()#

Generate a mock ISR product following LSSTCam ISR, and return it.

Returns#

imagelsst.afw.image.Exposure

Simulated ISR image with signals added.

dataProduct :

Simulated ISR data products.

None :

Returned if no valid configuration was found.

Raises#

RuntimeError

Raised if both doGenerateImage and doGenerateData are specified.