IsrMockLSST#
- class lsst.ip.isr.IsrMockLSST(**kwargs)#
Bases:
IsrMockClass 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.ImageFAmplifier image to operate on. rng :galsim.BaseDeviateRandom number generator. bfStrength :floatScaling 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.
Get the full serial overscan bounding box from an amplifier.
Generate a simple simulated brighter-fatter kernel. Returns ------- kernel :
lsst.ip.isr.BrighterFatterKernelSimulated brighter-fatter kernel.makeDefectList([isTrimmed])Generate a simple defect list.
Generate a CTI calibration.
Generate a simple simulated electrostatic brighter-fatter calibration.
Generate a simulated ISR LSST image.
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#
- ampData
lsst.afw.image.ImageF Amplifier image to operate on.
- biasLevel
float Bias level to be added to the image.
- ampData
- amplifierAddBrighterFatter(ampImageData, rng, bfStrength, nRecalc)#
Add brighter fatter effect and/or diffusion to the image. Parameters ———- ampImageData :
lsst.afw.image.ImageFAmplifier 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.
- rng
- amplifierAddDeferredCharge(exposure, amp)#
Add serial CTI to the amplifier data.
Parameters#
- exposure
lsst.afw.image.ExposureF The exposure object containing the amplifier to apply deferred charge to.
- amp
lsst.afw.image.Amplifier The amplifier object (contains geometry info).
- exposure
- amplifierAddNonlinearity(ampData, centers, values, offset)#
Add non-linearity to amplifier data.
Parameters#
- ampData
lsst.afw.image.ImageF Amplifier image to operate on.
- centers
np.ndarray Spline nodes.
- values
np.ndarray Spline values.
- offset
float Offset zero-point between linearizer (internal vs external).
- ampData
- 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#
- ampData
lsst.afw.image.ImageF Amplifier image to operate on.
- start
float Start value of the gradient (at x=0).
- end
float End value of the gradient (at x=xmax).
- ampData
- amplifierMultiplyFlat(amp, ampData, fracDrop, u0=100.0, v0=100.0)#
Multiply an amplifier’s image data by a flat-like pattern.
Parameters#
- amp
lsst.afw.ampInfo.AmpInfoRecord Amplifier to operate on. Needed for amp<->exp coordinate transforms.
- ampData
lsst.afw.image.ImageF Amplifier image to operate on.
- fracDrop
float Fractional drop from center to edge of detector along x-axis.
- u0
float Peak location in detector coordinates.
- v0
float Peak location in detector coordinates.
- amp
- 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#
- ampData
lsst.afw.image.ImageF Amplifier image to operate on.
- gain
float Gain value in electron/adu.
- ampData
- getFullSerialOverscanBBox(amp)#
Get the full serial overscan bounding box from an amplifier.
This includes the serial/parallel overscan region.
Parameters#
- amp
lsst.afw.ampInfo.AmpInfoRecord Amplifier to operate on.
Returns#
bbox :
lsst.geom.Box2I- amp
- makeBfKernel()#
Generate a simple simulated brighter-fatter kernel. Returns ——- kernel :
lsst.ip.isr.BrighterFatterKernelSimulated brighter-fatter kernel.
- makeDefectList(isTrimmed=True)#
Generate a simple defect list.
Parameters#
- isTrimmed
bool, optional Return defects in trimmed coordinates?
Returns#
- defectList
lsst.meas.algorithms.Defects Simulated defect list
- isTrimmed
- makeDeferredChargeCalib()#
Generate a CTI calibration.
Returns#
- cti
lsst.ip.isr.deferredCharge.DeferredChargeCalib Simulated deferred charge calibration.
- cti
- makeElectrostaticBf()#
Generate a simple simulated electrostatic brighter-fatter calibration.
Returns#
- kernel
lsst.ip.isr.ElectrostaticBrighterFatterDistortionMatrix Simulated brighter-fatter kernel.
- kernel
- makeImage()#
Generate a simulated ISR LSST image.
Returns#
- exposure
lsst.afw.image.Exposureordict Simulated ISR image data.
Notes#
This method constructs a “raw” data image.
- exposure
- makeLinearizer()#
- roundADU(ampData)#
Round adu to nearest integer.
Parameters#
- ampData
lsst.afw.image.ImageF Amplifier image to operate on.
- ampData
- run()#
Generate a mock ISR product following LSSTCam ISR, and return it.
Returns#
- image
lsst.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.
- image