LSST Applications g0d97872fb5+4fd969bb9d,g1653933729+34a971ddd9,g28da252d5a+072f89fe25,g2bbee38e9b+a99b0ab4cd,g2bc492864f+a99b0ab4cd,g2ca4be77d2+c0e3b27cd8,g2cdde0e794+704103fe75,g3156d2b45e+6e87dc994a,g347aa1857d+a99b0ab4cd,g35bb328faa+34a971ddd9,g3a166c0a6a+a99b0ab4cd,g3e281a1b8c+8ec26ec694,g4005a62e65+ba0306790b,g414038480c+9ed5ed841a,g569e0e2b34+cb4faa46ad,g5a97de2502+520531a62c,g717e5f8c0f+29153700a5,g7ede599f99+367733290c,g80478fca09+17051a22cc,g82479be7b0+f2f1ea0a87,g858d7b2824+29153700a5,g8b782ad322+29153700a5,g8cd86fa7b1+05420e7f7d,g9125e01d80+34a971ddd9,ga5288a1d22+e7f674aaf3,gae0086650b+34a971ddd9,gae74b0b5c6+45ef5cdc51,gb58c049af0+ace264a4f2,gc28159a63d+a99b0ab4cd,gcf0d15dbbd+8051a81198,gda6a2b7d83+8051a81198,gdaeeff99f8+7774323b41,gdf4d240d4a+34a971ddd9,ge2409df99d+cb167bac99,ge33fd446bb+29153700a5,ge79ae78c31+a99b0ab4cd,gf0baf85859+890af219f9,gf5289d68f6+9faa5c5784,w.2024.36
LSST Data Management Base Package
|
Public Member Functions | |
__init__ (self, **kwargs) | |
run (self) | |
makeData (self) | |
makeBfKernel (self) | |
makeDefectList (self) | |
makeCrosstalkCoeff (self) | |
makeTransmissionCurve (self) | |
makeLinearity (self) | |
makeImage (self) | |
getCamera (self) | |
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) | |
amplifierAddCT (self, ampDataSource, ampDataTarget, scale) | |
amplifierAddFringe (self, amp, ampData, scale, x0=100, y0=0) | |
amplifierMultiplyFlat (self, amp, ampData, fracDrop, u0=100.0, v0=100.0) | |
Public Attributes | |
rng | |
crosstalkCoeffs | |
bfKernel | |
Static Public Attributes | |
ConfigClass = IsrMockConfig | |
Protected Attributes | |
_display | |
Static Protected Attributes | |
str | _DefaultName = "isrMock" |
Class to generate consistent mock images for ISR testing. ISR testing currently relies on one-off fake images that do not accurately mimic the full set of detector effects. This class uses the test camera/detector/amplifier structure defined in `lsst.afw.cameraGeom.testUtils` to avoid making the test data dependent on any of the actual obs package formats.
Definition at line 264 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.__init__ | ( | self, | |
** | kwargs ) |
Reimplemented in lsst.ip.isr.isrMock.RawMock, lsst.ip.isr.isrMock.TrimmedRawMock, lsst.ip.isr.isrMock.CalibratedRawMock, lsst.ip.isr.isrMock.RawDictMock, lsst.ip.isr.isrMock.MasterMock, lsst.ip.isr.isrMock.BiasMock, lsst.ip.isr.isrMock.DarkMock, lsst.ip.isr.isrMock.FlatMock, lsst.ip.isr.isrMock.FringeMock, lsst.ip.isr.isrMock.UntrimmedFringeMock, lsst.ip.isr.isrMock.BfKernelMock, lsst.ip.isr.isrMock.DefectMock, lsst.ip.isr.isrMock.CrosstalkCoeffMock, lsst.ip.isr.isrMock.TransmissionMock, lsst.ip.isr.isrMockLSST.IsrMockLSST, lsst.ip.isr.isrMockLSST.RawMockLSST, lsst.ip.isr.isrMockLSST.TrimmedRawMockLSST, lsst.ip.isr.isrMockLSST.CalibratedRawMockLSST, lsst.ip.isr.isrMockLSST.ReferenceMockLSST, lsst.ip.isr.isrMockLSST.DarkMockLSST, lsst.ip.isr.isrMockLSST.BiasMockLSST, lsst.ip.isr.isrMockLSST.FlatMockLSST, lsst.ip.isr.isrMockLSST.FringeMockLSST, lsst.ip.isr.isrMockLSST.BfKernelMockLSST, lsst.ip.isr.isrMockLSST.DefectMockLSST, lsst.ip.isr.isrMockLSST.CrosstalkCoeffMockLSST, lsst.ip.isr.isrMockLSST.LinearizerMockLSST, and lsst.ip.isr.isrMockLSST.TransmissionMockLSST.
Definition at line 276 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.amplifierAddCT | ( | self, | |
ampDataSource, | |||
ampDataTarget, | |||
scale ) |
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 794 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.amplifierAddFringe | ( | self, | |
amp, | |||
ampData, | |||
scale, | |||
x0 = 100, | |||
y0 = 0 ) |
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 816 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.amplifierAddNoise | ( | self, | |
ampData, | |||
mean, | |||
sigma, | |||
rng = None ) |
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 729 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.amplifierAddSource | ( | self, | |
ampData, | |||
scale, | |||
x0, | |||
y0 ) |
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 773 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.amplifierAddYGradient | ( | self, | |
ampData, | |||
start, | |||
end ) |
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 754 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.amplifierMultiplyFlat | ( | self, | |
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. 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.
Reimplemented in lsst.ip.isr.isrMockLSST.IsrMockLSST.
Definition at line 848 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.getCamera | ( | self | ) |
Construct a test camera object. Returns ------- camera : `lsst.afw.cameraGeom.camera` Test camera.
Definition at line 535 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.getExposure | ( | self, | |
isTrimmed = None ) |
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 551 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.getWcs | ( | self | ) |
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 681 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.localCoordToExpCoord | ( | self, | |
ampData, | |||
x, | |||
y ) |
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 698 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.makeBfKernel | ( | self | ) |
Generate a simple Gaussian brighter-fatter kernel. Returns ------- kernel : `numpy.ndarray` Simulated brighter-fatter kernel.
Reimplemented in lsst.ip.isr.isrMockLSST.IsrMockLSST.
Definition at line 362 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.makeCrosstalkCoeff | ( | self | ) |
Generate the simulated crosstalk coefficients. Returns ------- coeffs : `numpy.ndarray` Simulated crosstalk coefficients.
Definition at line 383 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.makeData | ( | self | ) |
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 331 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.makeDefectList | ( | self | ) |
Generate a simple single-entry defect list. Returns ------- defectList : `lsst.meas.algorithms.Defects` Simulated defect list
Reimplemented in lsst.ip.isr.isrMockLSST.IsrMockLSST.
Definition at line 372 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.makeImage | ( | self | ) |
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.
Reimplemented in lsst.ip.isr.isrMockLSST.IsrMockLSST.
Definition at line 414 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.makeLinearity | ( | self | ) |
Generate a linearity dataset. Returns ------- linearizer : `lsst.ip.isr.Linearizer`
Definition at line 405 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.makeTransmissionCurve | ( | self | ) |
Generate a simulated flat transmission curve. Returns ------- transmission : `lsst.afw.image.TransmissionCurve` Simulated transmission curve.
Definition at line 394 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.run | ( | self | ) |
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.
Reimplemented in lsst.ip.isr.isrMockLSST.IsrMockLSST.
Definition at line 305 of file isrMock.py.
|
staticprotected |
Definition at line 274 of file isrMock.py.
|
protected |
Definition at line 289 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.bfKernel |
Definition at line 299 of file isrMock.py.
|
static |
Definition at line 273 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.crosstalkCoeffs |
Definition at line 281 of file isrMock.py.
lsst.ip.isr.isrMock.IsrMock.rng |
Definition at line 278 of file isrMock.py.