lsst.ip.isr gbffcd5fa91+39a08c657f
Loading...
Searching...
No Matches
lsst.ip.isr.isrMockLSST.CalibratedRawMockLSST Class Reference
Inheritance diagram for lsst.ip.isr.isrMockLSST.CalibratedRawMockLSST:
lsst.ip.isr.isrMockLSST.RawMockLSST lsst.ip.isr.isrMockLSST.IsrMockLSST lsst.ip.isr.isrMock.IsrMock

Public Member Functions

 __init__ (self, **kwargs)
 
 run (self)
 
 makeImage (self)
 
 addBiasLevel (self, ampData, biasLevel)
 
 makeDefectList (self, isTrimmed=True)
 
 makeBfKernel (self)
 
 makeElectrostaticBf (self)
 
 makeDeferredChargeCalib (self)
 
 amplifierAddBrighterFatter (self, ampImageData, rng, bfStrength, nRecalc)
 
 amplifierAddDeferredCharge (self, exposure, amp)
 
 makeLinearizer (self)
 
 amplifierAddNonlinearity (self, ampData, centers, values, offset)
 
 amplifierMultiplyFlat (self, amp, ampData, fracDrop, u0=100.0, v0=100.0)
 
 applyGain (self, ampData, gain)
 
 roundADU (self, ampData)
 
 amplifierAddXGradient (self, ampData, start, end)
 
 getFullSerialOverscanBBox (self, amp)
 
 makeData (self)
 
 makeCrosstalkCoeff (self)
 
 makeTransmissionCurve (self)
 
 makeLinearity (self)
 
 getCamera (self, isForAssembly=False)
 
 getExposure (self, isTrimmed=None)
 
 getWcs (self)
 
 localCoordToExpCoord (self, ampData, x, y)
 
 amplifierAddNoise (self, ampData, mean, sigma, rng=None)
 
 amplifierAddYGradient (self, ampData, start, end)
 
 amplifierAddSource (self, ampData, scale, x0, y0)
 
 amplifierAddFringe (self, amp, ampData, scale, x0=100, y0=0)
 

Public Attributes

 splineTrapCoeffs
 
dict ctiCalibDict
 
 deferredChargeCalib = self.makeDeferredChargeCalib()
 
 cti = deferredChargeCalib.fromDict(self.ctiCalibDict)
 
 rng = np.random.RandomState(self.config.rngSeed)
 
 crosstalkCoeffs
 
float bfKernel
 
int aN
 
int aE
 
int aS = self.aN
 
int aW = self.aE
 
tuple aVector = (self.aN, self.aS, self.aE, self.aW)
 

Static Public Attributes

 ConfigClass = IsrMockConfig
 

Protected Attributes

 _display
 

Static Protected Attributes

str _DefaultName = "isrMock"
 

Detailed Description

Generate a trimmed raw exposure.

This represents a "truth" image that can be compared to a
post-ISR cleaned image.

Definition at line 1416 of file isrMockLSST.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.ip.isr.isrMockLSST.CalibratedRawMockLSST.__init__ ( self,
** kwargs )

Definition at line 1422 of file isrMockLSST.py.

Member Function Documentation

◆ addBiasLevel()

lsst.ip.isr.isrMockLSST.IsrMockLSST.addBiasLevel ( self,
ampData,
biasLevel )
inherited
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.

Definition at line 972 of file isrMockLSST.py.

◆ amplifierAddBrighterFatter()

lsst.ip.isr.isrMockLSST.IsrMockLSST.amplifierAddBrighterFatter ( self,
ampImageData,
rng,
bfStrength,
nRecalc )
inherited
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.

Definition at line 1082 of file isrMockLSST.py.

◆ amplifierAddDeferredCharge()

lsst.ip.isr.isrMockLSST.IsrMockLSST.amplifierAddDeferredCharge ( self,
exposure,
amp )
inherited
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).

Definition at line 1117 of file isrMockLSST.py.

◆ amplifierAddFringe()

lsst.ip.isr.isrMock.IsrMock.amplifierAddFringe ( self,
amp,
ampData,
scale,
x0 = 100,
y0 = 0 )
inherited
Add a fringe-like ripple pattern to an amplifier's image data.

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.
scale : `numpy.array` or `float`
    Peak intensity scaling for the ripple.
x0 : `numpy.array` or `float`, optional
    Fringe center
y0 : `numpy.array` or `float`, optional
    Fringe center

Notes
-----
This uses an offset sinc function to generate a ripple
pattern. True fringes have much finer structure, but this
pattern should be visually identifiable. The (x, y)
coordinates are in the frame of the amplifier, and (u, v) in
the frame of the full trimmed image.

Definition at line 875 of file isrMock.py.

◆ amplifierAddNoise()

lsst.ip.isr.isrMock.IsrMock.amplifierAddNoise ( self,
ampData,
mean,
sigma,
rng = None )
inherited
Add Gaussian noise 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.
mean : `float`
    Mean value of the Gaussian noise.
sigma : `float`
    Sigma of the Gaussian noise.
rng : `np.random.RandomState`, optional
    Random state to use instead of self.rng.

Definition at line 809 of file isrMock.py.

◆ amplifierAddNonlinearity()

lsst.ip.isr.isrMockLSST.IsrMockLSST.amplifierAddNonlinearity ( self,
ampData,
centers,
values,
offset )
inherited
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).

Definition at line 1246 of file isrMockLSST.py.

◆ amplifierAddSource()

lsst.ip.isr.isrMock.IsrMock.amplifierAddSource ( self,
ampData,
scale,
x0,
y0 )
inherited
Add a single Gaussian source to an amplifier.

 This method operates in the amplifier coordinate frame.

Parameters
----------
ampData : `lsst.afw.image.ImageF`
    Amplifier image to operate on.
scale : `float`
    Peak flux of the source to add.
x0 : `float`
    X-coordinate of the source peak.
y0 : `float`
    Y-coordinate of the source peak.

Definition at line 853 of file isrMock.py.

◆ amplifierAddXGradient()

lsst.ip.isr.isrMockLSST.IsrMockLSST.amplifierAddXGradient ( self,
ampData,
start,
end )
inherited
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).

Definition at line 1330 of file isrMockLSST.py.

◆ amplifierAddYGradient()

lsst.ip.isr.isrMock.IsrMock.amplifierAddYGradient ( self,
ampData,
start,
end )
inherited
Add a y-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 y=0).
end : `float`
    End value of the gradient (at y=ymax).

Definition at line 834 of file isrMock.py.

◆ amplifierMultiplyFlat()

lsst.ip.isr.isrMockLSST.IsrMockLSST.amplifierMultiplyFlat ( self,
amp,
ampData,
fracDrop,
u0 = 100.0,
v0 = 100.0 )
inherited
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.

Reimplemented from lsst.ip.isr.isrMock.IsrMock.

Definition at line 1275 of file isrMockLSST.py.

◆ applyGain()

lsst.ip.isr.isrMockLSST.IsrMockLSST.applyGain ( self,
ampData,
gain )
inherited
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.

Definition at line 1303 of file isrMockLSST.py.

◆ getCamera()

lsst.ip.isr.isrMock.IsrMock.getCamera ( self,
isForAssembly = False )
inherited
Construct a test camera object.

Parameters
-------
isForAssembly : `bool`
    If True, construct a camera with "super raw"
    orientation (all amplifiers have LL readout
    corner but still contains the necessary flip
    and offset info needed for assembly. This is
    needed if isLsstLike is True. If False, return
    a camera with bboxes flipped and offset to the
    correct orientation given the readout corner.

Returns
-------
camera : `lsst.afw.cameraGeom.camera`
    Test camera.

Definition at line 596 of file isrMock.py.

◆ getExposure()

lsst.ip.isr.isrMock.IsrMock.getExposure ( self,
isTrimmed = None )
inherited
Construct a test exposure.

The test exposure has a simple WCS set, as well as a list of
unlikely header keywords that can be removed during ISR
processing to exercise that code.

Parameters
----------
isTrimmed : `bool` or `None`, optional
    Override the configuration isTrimmed?

Returns
-------
exposure : `lsst.afw.exposure.Exposure`
    Construct exposure containing masked image of the
    appropriate size.

Definition at line 623 of file isrMock.py.

◆ getFullSerialOverscanBBox()

lsst.ip.isr.isrMockLSST.IsrMockLSST.getFullSerialOverscanBBox ( self,
amp )
inherited
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`

Definition at line 1349 of file isrMockLSST.py.

◆ getWcs()

lsst.ip.isr.isrMock.IsrMock.getWcs ( self)
inherited
Construct a dummy WCS object.

Taken from the deprecated ip_isr/examples/exampleUtils.py.

This is not guaranteed, given the distortion and pixel scale
listed in the afwTestUtils camera definition.

Returns
-------
wcs : `lsst.afw.geom.SkyWcs`
    Test WCS transform.

Definition at line 761 of file isrMock.py.

◆ localCoordToExpCoord()

lsst.ip.isr.isrMock.IsrMock.localCoordToExpCoord ( self,
ampData,
x,
y )
inherited
Convert between a local amplifier coordinate and the full
exposure coordinate.

Parameters
----------
ampData : `lsst.afw.image.ImageF`
    Amplifier image to use for conversions.
x : `int`
    X-coordinate of the point to transform.
y : `int`
    Y-coordinate of the point to transform.

Returns
-------
u : `int`
    Transformed x-coordinate.
v : `int`
    Transformed y-coordinate.

Notes
-----
The output is transposed intentionally here, to match the
internal transpose between numpy and afw.image coordinates.

Definition at line 778 of file isrMock.py.

◆ makeBfKernel()

lsst.ip.isr.isrMockLSST.IsrMockLSST.makeBfKernel ( self)
inherited
Generate a simple simulated brighter-fatter kernel.
Returns
-------
kernel : `lsst.ip.isr.BrighterFatterKernel`
    Simulated brighter-fatter kernel.

Reimplemented from lsst.ip.isr.isrMock.IsrMock.

Definition at line 1022 of file isrMockLSST.py.

◆ makeCrosstalkCoeff()

lsst.ip.isr.isrMock.IsrMock.makeCrosstalkCoeff ( self)
inherited
Generate the simulated crosstalk coefficients.

Returns
-------
coeffs : `numpy.ndarray`
    Simulated crosstalk coefficients.

Definition at line 438 of file isrMock.py.

◆ makeData()

lsst.ip.isr.isrMock.IsrMock.makeData ( self)
inherited
Generate simulated ISR data.

Currently, only the class defined crosstalk coefficient
matrix, brighter-fatter kernel, a constant unity transmission
curve, or a simple single-entry defect list can be generated.

Returns
-------
dataProduct :
    Simulated ISR data product.

Definition at line 361 of file isrMock.py.

◆ makeDefectList()

lsst.ip.isr.isrMockLSST.IsrMockLSST.makeDefectList ( self,
isTrimmed = True )
inherited
Generate a simple defect list.

Parameters
----------
isTrimmed : `bool`, optional
    Return defects in trimmed coordinates?

Returns
-------
defectList : `lsst.meas.algorithms.Defects`
    Simulated defect list

Reimplemented from lsst.ip.isr.isrMock.IsrMock.

Definition at line 985 of file isrMockLSST.py.

◆ makeDeferredChargeCalib()

lsst.ip.isr.isrMockLSST.IsrMockLSST.makeDeferredChargeCalib ( self)
inherited
Generate a CTI calibration.

Returns
-------
cti : `lsst.ip.isr.deferredCharge.DeferredChargeCalib`
    Simulated deferred charge calibration.

Reimplemented from lsst.ip.isr.isrMock.IsrMock.

Definition at line 1063 of file isrMockLSST.py.

◆ makeElectrostaticBf()

lsst.ip.isr.isrMockLSST.IsrMockLSST.makeElectrostaticBf ( self)
inherited
Generate a simple simulated electrostatic
brighter-fatter calibration.

Returns
-------
kernel : `lsst.ip.isr.ElectrostaticBrighterFatterDistortionMatrix`
    Simulated brighter-fatter kernel.

Reimplemented from lsst.ip.isr.isrMock.IsrMock.

Definition at line 1041 of file isrMockLSST.py.

◆ makeImage()

lsst.ip.isr.isrMockLSST.IsrMockLSST.makeImage ( self)
inherited
Generate a simulated ISR LSST image.

Returns
-------
exposure : `lsst.afw.image.Exposure` or `dict`
    Simulated ISR image data.

Notes
-----
This method constructs a "raw" data image.

Reimplemented from lsst.ip.isr.isrMock.IsrMock.

Definition at line 645 of file isrMockLSST.py.

◆ makeLinearity()

lsst.ip.isr.isrMock.IsrMock.makeLinearity ( self)
inherited
Generate a linearity dataset.

Returns
-------
linearizer : `lsst.ip.isr.Linearizer`

Definition at line 460 of file isrMock.py.

◆ makeLinearizer()

lsst.ip.isr.isrMockLSST.IsrMockLSST.makeLinearizer ( self)
inherited

Definition at line 1203 of file isrMockLSST.py.

◆ makeTransmissionCurve()

lsst.ip.isr.isrMock.IsrMock.makeTransmissionCurve ( self)
inherited
Generate a simulated flat transmission curve.

Returns
-------
transmission : `lsst.afw.image.TransmissionCurve`
    Simulated transmission curve.

Definition at line 449 of file isrMock.py.

◆ roundADU()

lsst.ip.isr.isrMockLSST.IsrMockLSST.roundADU ( self,
ampData )
inherited
Round adu to nearest integer.

Parameters
----------
ampData : `lsst.afw.image.ImageF`
    Amplifier image to operate on.

Definition at line 1319 of file isrMockLSST.py.

◆ run()

lsst.ip.isr.isrMockLSST.IsrMockLSST.run ( self)
inherited
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.

Reimplemented from lsst.ip.isr.isrMock.IsrMock.

Definition at line 619 of file isrMockLSST.py.

Member Data Documentation

◆ _DefaultName

str lsst.ip.isr.isrMock.IsrMock._DefaultName = "isrMock"
staticprotectedinherited

Definition at line 292 of file isrMock.py.

◆ _display

lsst.ip.isr.isrMock.IsrMock._display
protectedinherited

Definition at line 307 of file isrMock.py.

◆ aE

int lsst.ip.isr.isrMock.IsrMock.aE
inherited
Initial value:
= np.array([[1., 0.5, 0.0125, 0., 0.],
[0.5, 0.010, 0., 0., 0.],
[0.0125, 0., 0., 0., 0.],
[0, 0., 0., 0., 0.]]) * -1e-7

Definition at line 327 of file isrMock.py.

◆ aN

int lsst.ip.isr.isrMock.IsrMock.aN
inherited
Initial value:
= np.array([[1., 0.5, 0.0125, 0., 0.],
[0.5, 0.010, 0., 0., 0.],
[0.0125, 0., 0., 0., 0.],
[0, 0., 0., 0., 0.]]) * -1e-7

Definition at line 323 of file isrMock.py.

◆ aS

int lsst.ip.isr.isrMock.IsrMock.aS = self.aN
inherited

Definition at line 331 of file isrMock.py.

◆ aVector

tuple lsst.ip.isr.isrMock.IsrMock.aVector = (self.aN, self.aS, self.aE, self.aW)
inherited

Definition at line 333 of file isrMock.py.

◆ aW

int lsst.ip.isr.isrMock.IsrMock.aW = self.aE
inherited

Definition at line 332 of file isrMock.py.

◆ bfKernel

float lsst.ip.isr.isrMock.IsrMock.bfKernel
inherited
Initial value:
= np.array([[1., 4., 7., 4., 1.],
[4., 16., 26., 16., 4.],
[7., 26., 41., 26., 7.],
[4., 16., 26., 16., 4.],
[1., 4., 7., 4., 1.]]) / 273.0

Definition at line 317 of file isrMock.py.

◆ ConfigClass

lsst.ip.isr.isrMock.IsrMock.ConfigClass = IsrMockConfig
staticinherited

Definition at line 291 of file isrMock.py.

◆ crosstalkCoeffs

lsst.ip.isr.isrMock.IsrMock.crosstalkCoeffs
inherited
Initial value:
= np.array([[0.0, 0.0, 0.0, 0.0, 0.0, -1e-3, 0.0, 0.0],
[1e-2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[1e-2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[1e-2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[1e-2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[1e-2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[1e-2, 0.0, 0.0, 2.2e-2, 0.0, 0.0, 0.0, 0.0],
[1e-2, 5e-3, 5e-4, 3e-3, 4e-2, 5e-3, 5e-3, 0.0]])

Definition at line 299 of file isrMock.py.

◆ cti

lsst.ip.isr.isrMockLSST.IsrMockLSST.cti = deferredChargeCalib.fromDict(self.ctiCalibDict)
inherited

Definition at line 1078 of file isrMockLSST.py.

◆ ctiCalibDict

dict lsst.ip.isr.isrMockLSST.IsrMockLSST.ctiCalibDict
inherited

Definition at line 484 of file isrMockLSST.py.

◆ deferredChargeCalib

lsst.ip.isr.isrMockLSST.IsrMockLSST.deferredChargeCalib = self.makeDeferredChargeCalib()
inherited

Definition at line 613 of file isrMockLSST.py.

◆ rng

lsst.ip.isr.isrMock.IsrMock.rng = np.random.RandomState(self.config.rngSeed)
inherited

Definition at line 296 of file isrMock.py.

◆ splineTrapCoeffs

lsst.ip.isr.isrMockLSST.IsrMockLSST.splineTrapCoeffs
inherited
Initial value:
= np.array([0.0, 28.1, 47.4, 56.4, 66.6, 78.6, 92.4, 109.4,
129.0, 151.9, 179.4, 211.9, 250.5, 296.2, 350.0,
413.5, 488.0, 576.0, 680.4, 753.0, 888.2, 1040.5,
1254.1, 1478.9, 1747.0, 2055.7, 2416.9, 2855.2,
3361.9, 3969.4, 4665.9, 5405.3, 6380.0, 7516.7,
8875.9, 10488.6, 12681.9, 14974.2, 17257.6, 20366.5,
24026.7, 28372.1, 33451.7, 39550.4, 46624.8, 55042.9,
64862.7, 76503.1, 90265.6, 106384.2, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0,
0.1, 0.2, 0.6, 0.1, 0.0, 0.1, 0.0, 0.6, 0.3, 0.5, 0.8,
0.8, 1.5, 2.0, 1.8, 2.4, 2.6, 3.7, 5.0, 6.4, 8.4, 10.9,
14.5, 21.1, 28.9])

Definition at line 470 of file isrMockLSST.py.


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