lsst.ip.isr  20.0.0-3-g2fa8bb8+6
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.ip.isr.isrMock.DefectMock Class Reference
Inheritance diagram for lsst.ip.isr.isrMock.DefectMock:
lsst.ip.isr.isrMock.IsrMock

Public Member Functions

def __init__ (self, **kwargs)
 
def run (self)
 
def makeData (self)
 
def makeBfKernel (self)
 
def makeDefectList (self)
 
def makeCrosstalkCoeff (self)
 
def makeTransmissionCurve (self)
 
def makeImage (self)
 
def getCamera (self)
 
def getExposure (self)
 
def getWcs (self)
 
def localCoordToExpCoord (self, ampData, x, y)
 
def amplifierAddNoise (self, ampData, mean, sigma)
 
def amplifierAddYGradient (self, ampData, start, end)
 
def amplifierAddSource (self, ampData, scale, x0, y0)
 
def amplifierAddCT (self, ampDataSource, ampDataTarget, scale)
 
def amplifierAddFringe (self, amp, ampData, scale, x0=100, y0=0)
 
def amplifierMultiplyFlat (self, amp, ampData, fracDrop, u0=100.0, v0=100.0)
 

Public Attributes

 rng
 
 crosstalkCoeffs
 
 bfKernel
 

Static Public Attributes

 ConfigClass = IsrMockConfig
 

Detailed Description

Simulated defect list.

Definition at line 894 of file isrMock.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.ip.isr.isrMock.DefectMock.__init__ (   self,
**  kwargs 
)

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

Definition at line 897 of file isrMock.py.

Member Function Documentation

◆ amplifierAddCT()

def lsst.ip.isr.isrMock.IsrMock.amplifierAddCT (   self,
  ampDataSource,
  ampDataTarget,
  scale 
)
inherited
Add a scaled copy of an amplifier to another, simulating crosstalk.

 This method operates in the amplifier coordinate frame.

Parameters
----------
ampDataSource : `lsst.afw.image.ImageF`
    Amplifier image to add scaled copy from.
ampDataTarget : `lsst.afw.image.ImageF`
    Amplifier image to add scaled copy to.
scale : `float`
    Flux scale of the copy to add to the target.

Notes
-----
This simulates simple crosstalk between amplifiers.

Definition at line 679 of file isrMock.py.

◆ amplifierAddFringe()

def 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 701 of file isrMock.py.

◆ amplifierAddNoise()

def lsst.ip.isr.isrMock.IsrMock.amplifierAddNoise (   self,
  ampData,
  mean,
  sigma 
)
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.

Definition at line 621 of file isrMock.py.

◆ amplifierAddSource()

def 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 658 of file isrMock.py.

◆ amplifierAddYGradient()

def 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 639 of file isrMock.py.

◆ amplifierMultiplyFlat()

def lsst.ip.isr.isrMock.IsrMock.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.

Notes
-----
This uses a 2-d Gaussian to simulate an illumination pattern
that falls off towards the edge of the detector. 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 732 of file isrMock.py.

◆ getCamera()

def lsst.ip.isr.isrMock.IsrMock.getCamera (   self)
inherited
Construct a test camera object.

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

Definition at line 499 of file isrMock.py.

◆ getExposure()

def lsst.ip.isr.isrMock.IsrMock.getExposure (   self)
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.

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

Definition at line 515 of file isrMock.py.

◆ getWcs()

def 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 573 of file isrMock.py.

◆ localCoordToExpCoord()

def 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 590 of file isrMock.py.

◆ makeBfKernel()

def lsst.ip.isr.isrMock.IsrMock.makeBfKernel (   self)
inherited
Generate a simple Gaussian brighter-fatter kernel.

Returns
-------
kernel : `numpy.ndarray`
    Simulated brighter-fatter kernel.

Definition at line 337 of file isrMock.py.

◆ makeCrosstalkCoeff()

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

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

Definition at line 358 of file isrMock.py.

◆ makeData()

def 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 309 of file isrMock.py.

◆ makeDefectList()

def lsst.ip.isr.isrMock.IsrMock.makeDefectList (   self)
inherited
Generate a simple single-entry defect list.

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

Definition at line 347 of file isrMock.py.

◆ makeImage()

def lsst.ip.isr.isrMock.IsrMock.makeImage (   self)
inherited
Generate a simulated ISR image.

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

Notes
-----
This method currently constructs a "raw" data image by:
    * Generating a simulated sky with noise
    * Adding a single Gaussian "star"
    * Adding the fringe signal
    * Multiplying the frame by the simulated flat
    * Adding dark current (and noise)
    * Adding a bias offset (and noise)
    * Adding an overscan gradient parallel to the pixel y-axis
    * Simulating crosstalk by adding a scaled version of each
      amplifier to each other amplifier.

The exposure with image data constructed this way is in one of
three formats.
    * A single image, with overscan and prescan regions retained
    * A single image, with overscan and prescan regions trimmed
    * A `dict`, containing the amplifer data indexed by the
      amplifier name.

The nonlinearity, CTE, and brighter fatter are currently not
implemented.

Note that this method generates an image in the reverse
direction as the ISR processing, as the output image here has
had a series of instrument effects added to an idealized
exposure.

Definition at line 380 of file isrMock.py.

◆ makeTransmissionCurve()

def 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 369 of file isrMock.py.

◆ run()

def lsst.ip.isr.isrMock.IsrMock.run (   self)
inherited
Generate a mock ISR product, 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.

Definition at line 283 of file isrMock.py.

Member Data Documentation

◆ bfKernel

lsst.ip.isr.isrMock.IsrMock.bfKernel
inherited

Definition at line 277 of file isrMock.py.

◆ ConfigClass

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

Definition at line 262 of file isrMock.py.

◆ crosstalkCoeffs

lsst.ip.isr.isrMock.IsrMock.crosstalkCoeffs
inherited

Definition at line 268 of file isrMock.py.

◆ rng

lsst.ip.isr.isrMock.IsrMock.rng
inherited

Definition at line 267 of file isrMock.py.


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