36 __all__ = [
"IsrMockConfig",
"IsrMock",
"RawMock",
"TrimmedRawMock",
"RawDictMock",
37 "CalibratedRawMock",
"MasterMock",
38 "BiasMock",
"DarkMock",
"FlatMock",
"FringeMock",
"UntrimmedFringeMock",
39 "BfKernelMock",
"DefectMock",
"CrosstalkCoeffMock",
"TransmissionMock",
44 """Configuration parameters for isrMock. 46 These parameters produce generic fixed position signals from 47 various sources, and combine them in a way that matches how those 48 signals are combined to create real data. The camera used is the 49 test camera defined by the afwUtils code. 52 isLsstLike = pexConfig.Field(
55 doc=
"If True, products have one raw image per amplifier, otherwise, one raw image per detector.",
57 isTrimmed = pexConfig.Field(
60 doc=
"If True, amplifiers have been trimmed and mosaicked to remove regions outside the data BBox.",
62 detectorIndex = pexConfig.Field(
65 doc=
"Index for the detector to use. The default value uses a standard 2x4 array of amps.",
67 rngSeed = pexConfig.Field(
70 doc=
"Seed for random number generator used to add noise.",
73 gain = pexConfig.Field(
76 doc=
"Gain for simulated data in e^-/DN.",
78 readNoise = pexConfig.Field(
81 doc=
"Read noise of the detector in e-.",
83 expTime = pexConfig.Field(
86 doc=
"Exposure time for simulated data.",
90 skyLevel = pexConfig.Field(
93 doc=
"Background contribution to be generated from 'the sky' in DN.",
95 sourceFlux = pexConfig.ListField(
98 doc=
"Peak flux level (in DN) of simulated 'astronomical sources'.",
100 sourceAmp = pexConfig.ListField(
103 doc=
"Amplifier to place simulated 'astronomical sources'.",
105 sourceX = pexConfig.ListField(
108 doc=
"Peak position (in amplifier coordinates) of simulated 'astronomical sources'.",
110 sourceY = pexConfig.ListField(
113 doc=
"Peak position (in amplifier coordinates) of simulated 'astronomical sources'.",
115 overscanScale = pexConfig.Field(
118 doc=
"Amplitude (in DN) of the ramp function to add to overscan data.",
120 biasLevel = pexConfig.Field(
123 doc=
"Background contribution to be generated from the bias offset in DN.",
125 darkRate = pexConfig.Field(
128 doc=
"Background level contribution (in e-/s) to be generated from dark current.",
130 darkTime = pexConfig.Field(
133 doc=
"Exposure time for the dark current contribution.",
135 flatDrop = pexConfig.Field(
138 doc=
"Fractional flux drop due to flat from center to edge of detector along x-axis.",
140 fringeScale = pexConfig.ListField(
143 doc=
"Peak fluxes for the components of the fringe ripple in DN.",
145 fringeX0 = pexConfig.ListField(
148 doc=
"Center position for the fringe ripples.",
150 fringeY0 = pexConfig.ListField(
153 doc=
"Center position for the fringe ripples.",
157 doAddSky = pexConfig.Field(
160 doc=
"Apply 'sky' signal to output image.",
162 doAddSource = pexConfig.Field(
165 doc=
"Add simulated source to output image.",
167 doAddCrosstalk = pexConfig.Field(
170 doc=
"Apply simulated crosstalk to output image. This cannot be corrected by ISR, " 171 "as detector.hasCrosstalk()==False.",
173 doAddOverscan = pexConfig.Field(
176 doc=
"If untrimmed, add overscan ramp to overscan and data regions.",
178 doAddBias = pexConfig.Field(
181 doc=
"Add bias signal to data.",
183 doAddDark = pexConfig.Field(
186 doc=
"Add dark signal to data.",
188 doAddFlat = pexConfig.Field(
191 doc=
"Add flat signal to data.",
193 doAddFringe = pexConfig.Field(
196 doc=
"Add fringe signal to data.",
200 doTransmissionCurve = pexConfig.Field(
203 doc=
"Return a simulated transmission curve.",
205 doDefects = pexConfig.Field(
208 doc=
"Return a simulated defect list.",
210 doBrighterFatter = pexConfig.Field(
213 doc=
"Return a simulated brighter-fatter kernel.",
215 doCrosstalkCoeffs = pexConfig.Field(
218 doc=
"Return the matrix of crosstalk coefficients.",
220 doDataRef = pexConfig.Field(
223 doc=
"Return a simulated gen2 butler dataRef.",
225 doGenerateImage = pexConfig.Field(
228 doc=
"Return the generated output image if True.",
230 doGenerateData = pexConfig.Field(
233 doc=
"Return a non-image data structure if True.",
235 doGenerateAmpDict = pexConfig.Field(
238 doc=
"Return a dict of exposure amplifiers instead of an afwImage.Exposure.",
243 """Class to generate consistent mock images for ISR testing. 245 ISR testing currently relies on one-off fake images that do not 246 accurately mimic the full set of detector effects. This class 247 uses the test camera/detector/amplifier structure defined in 248 `lsst.afw.cameraGeom.testUtils` to avoid making the test data 249 dependent on any of the actual obs package formats. 251 ConfigClass = IsrMockConfig
252 _DefaultName =
"isrMock" 256 self.
rng = np.random.RandomState(self.config.rngSeed)
258 [1e-2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
259 [1e-2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
260 [1e-2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
261 [1e-2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
262 [1e-2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
263 [1e-2, 0.0, 0.0, 2.2e-2, 0.0, 0.0, 0.0, 0.0],
264 [1e-2, 5e-3, 5e-4, 3e-3, 4e-2, 5e-3, 5e-3, 0.0]])
267 [4., 16., 26., 16., 4.],
268 [7., 26., 41., 26., 7.],
269 [4., 16., 26., 16., 4.],
270 [1., 4., 7., 4., 1.]]) / 273.0
273 """Generate a mock ISR product, and return it. 277 image : `lsst.afw.image.Exposure` 278 Simulated ISR image with signals added. 280 Simulated ISR data products. 282 Returned if no valid configuration was found. 287 Raised if both doGenerateImage and doGenerateData are specified. 289 if self.config.doGenerateImage
and self.config.doGenerateData:
290 raise RuntimeError(
"Only one of doGenerateImage and doGenerateData may be specified.")
291 elif self.config.doGenerateImage:
293 elif self.config.doGenerateData:
299 """Generate simulated ISR data. 301 Currently, only the class defined crosstalk coefficient 302 matrix, brighter-fatter kernel, a constant unity transmission 303 curve, or a simple single-entry defect list can be generated. 308 Simulated ISR data product. 310 if sum(map(bool, [self.config.doBrighterFatter,
311 self.config.doDefects,
312 self.config.doTransmissionCurve,
313 self.config.doCrosstalkCoeffs])) != 1:
314 raise RuntimeError(
"Only one data product can be generated at a time.")
315 elif self.config.doBrighterFatter
is True:
317 elif self.config.doDefects
is True:
319 elif self.config.doTransmissionCurve
is True:
321 elif self.config.doCrosstalkCoeffs
is True:
327 """Generate a simple Gaussian brighter-fatter kernel. 331 kernel : `numpy.ndarray` 332 Simulated brighter-fatter kernel. 337 """Generate a simple single-entry defect list. 341 defectList : `lsst.meas.algorithms.Defects` 342 Simulated defect list 348 """Generate the simulated crosstalk coefficients. 352 coeffs : `numpy.ndarray` 353 Simulated crosstalk coefficients. 359 """Generate a simulated flat transmission curve. 363 transmission : `lsst.afw.image.TransmissionCurve` 364 Simulated transmission curve. 367 return afwImage.TransmissionCurve.makeIdentity()
370 """Generate a simulated ISR image. 374 exposure : `lsst.afw.image.Exposure` or `dict` 375 Simulated ISR image data. 379 This method currently constructs a "raw" data image by: 380 * Generating a simulated sky with noise 381 * Adding a single Gaussian "star" 382 * Adding the fringe signal 383 * Multiplying the frame by the simulated flat 384 * Adding dark current (and noise) 385 * Adding a bias offset (and noise) 386 * Adding an overscan gradient parallel to the pixel y-axis 387 * Simulating crosstalk by adding a scaled version of each 388 amplifier to each other amplifier. 390 The exposure with image data constructed this way is in one of 392 * A single image, with overscan and prescan regions retained 393 * A single image, with overscan and prescan regions trimmed 394 * A `dict`, containing the amplifer data indexed by the 397 The nonlinearity, CTE, and brighter fatter are currently not 400 Note that this method generates an image in the reverse 401 direction as the ISR processing, as the output image here has 402 had a series of instrument effects added to an idealized 407 for idx, amp
in enumerate(exposure.getDetector()):
409 if self.config.isTrimmed
is True:
412 bbox = amp.getRawDataBBox()
414 ampData = exposure.image[bbox]
416 if self.config.doAddSky
is True:
417 self.
amplifierAddNoise(ampData, self.config.skyLevel, np.sqrt(self.config.skyLevel))
419 if self.config.doAddSource
is True:
420 for sourceAmp, sourceFlux, sourceX, sourceY
in zip(self.config.sourceAmp,
421 self.config.sourceFlux,
423 self.config.sourceY):
427 if self.config.doAddFringe
is True:
429 x0=np.array(self.config.fringeX0),
430 y0=np.array(self.config.fringeY0))
432 if self.config.doAddFlat
is True:
433 if ampData.getArray().sum() == 0.0:
435 u0 = exposure.getDimensions().getX()
436 v0 = exposure.getDimensions().getY()
439 if self.config.doAddDark
is True:
441 self.config.darkRate * self.config.darkTime / self.config.gain,
442 np.sqrt(self.config.darkRate *
443 self.config.darkTime / self.config.gain))
445 if self.config.doAddCrosstalk
is True:
446 for idxS, ampS
in enumerate(exposure.getDetector()):
447 for idxT, ampT
in enumerate(exposure.getDetector()):
448 if self.config.isTrimmed
is True:
449 ampDataS = exposure.image[ampS.getBBox()]
450 ampDataT = exposure.image[ampT.getBBox()]
452 ampDataS = exposure.image[ampS.getRawDataBBox()]
453 ampDataT = exposure.image[ampT.getRawDataBBox()]
456 for amp
in exposure.getDetector():
458 if self.config.isTrimmed
is True:
461 bbox = amp.getRawDataBBox()
463 ampData = exposure.image[bbox]
465 if self.config.doAddBias
is True:
467 self.config.readNoise / self.config.gain)
469 if self.config.doAddOverscan
is True:
470 oscanBBox = amp.getRawHorizontalOverscanBBox()
471 oscanData = exposure.image[oscanBBox]
473 self.config.readNoise / self.config.gain)
476 1.0 * self.config.overscanScale)
478 1.0 * self.config.overscanScale)
480 if self.config.doGenerateAmpDict
is True:
482 for amp
in exposure.getDetector():
483 expDict[amp.getName()] = exposure
490 """Construct a test camera object. 494 camera : `lsst.afw.cameraGeom.camera` 497 cameraWrapper = afwTestUtils.CameraWrapper(self.config.isLsstLike)
498 camera = cameraWrapper.camera
502 """Construct a test exposure. 504 The test exposure has a simple WCS set, as well as a list of 505 unlikely header keywords that can be removed during ISR 506 processing to exercise that code. 510 exposure : `lsst.afw.exposure.Exposure` 511 Construct exposure containing masked image of the 515 detector = camera[self.config.detectorIndex]
516 image = afwUtils.makeImageFromCcd(detector,
517 isTrimmed=self.config.isTrimmed,
521 imageFactory=afwImage.ImageF)
523 var = afwImage.ImageF(image.getDimensions())
529 exposure.setDetector(detector)
530 exposure.setWcs(self.
getWcs())
532 visitInfo =
afwImage.VisitInfo(exposureTime=self.config.expTime, darkTime=self.config.darkTime)
533 exposure.getInfo().setVisitInfo(visitInfo)
535 metadata = exposure.getMetadata()
536 metadata.add(
"SHEEP", 7.3,
"number of sheep on farm")
537 metadata.add(
"MONKEYS", 155,
"monkeys per tree")
538 metadata.add(
"VAMPIRES", 4,
"How scary are vampires.")
540 for amp
in exposure.getDetector():
541 amp.setLinearityCoeffs((0., 1., 0., 0.))
542 amp.setLinearityType(
"Polynomial")
543 amp.setGain(self.config.gain)
545 exposure.image.array[:] = np.zeros(exposure.getImage().getDimensions()).transpose()
546 exposure.mask.array[:] = np.zeros(exposure.getMask().getDimensions()).transpose()
547 exposure.variance.array[:] = np.zeros(exposure.getVariance().getDimensions()).transpose()
552 """Construct a dummy WCS object. 554 Taken from the deprecated ip_isr/examples/exampleUtils.py. 556 This is not guaranteed, given the distortion and pixel scale 557 listed in the afwTestUtils camera definition. 561 wcs : `lsst.afw.geom.SkyWcs` 569 """Convert between a local amplifier coordinate and the full 574 ampData : `lsst.afw.image.ImageF` 575 Amplifier image to use for conversions. 577 X-coordinate of the point to transform. 579 Y-coordinate of the point to transform. 584 Transformed x-coordinate. 586 Transformed y-coordinate. 590 The output is transposed intentionally here, to match the 591 internal transpose between numpy and afw.image coordinates. 593 u = x + ampData.getBBox().getBeginX()
594 v = y + ampData.getBBox().getBeginY()
600 """Add Gaussian noise to an amplifier's image data. 602 This method operates in the amplifier coordinate frame. 606 ampData : `lsst.afw.image.ImageF` 607 Amplifier image to operate on. 609 Mean value of the Gaussian noise. 611 Sigma of the Gaussian noise. 613 ampArr = ampData.array
614 ampArr[:] = ampArr[:] + self.
rng.normal(mean, sigma,
615 size=ampData.getDimensions()).transpose()
618 """Add a y-axis linear gradient to an amplifier's image data. 620 This method operates in the amplifier coordinate frame. 624 ampData : `lsst.afw.image.ImageF` 625 Amplifier image to operate on. 627 Start value of the gradient (at y=0). 629 End value of the gradient (at y=ymax). 631 nPixY = ampData.getDimensions().getY()
632 ampArr = ampData.array
633 ampArr[:] = ampArr[:] + (np.interp(range(nPixY), (0, nPixY - 1), (start, end)).reshape(nPixY, 1) +
634 np.zeros(ampData.getDimensions()).transpose())
637 """Add a single Gaussian source to an amplifier. 639 This method operates in the amplifier coordinate frame. 643 ampData : `lsst.afw.image.ImageF` 644 Amplifier image to operate on. 646 Peak flux of the source to add. 648 X-coordinate of the source peak. 650 Y-coordinate of the source peak. 652 for x
in range(0, ampData.getDimensions().getX()):
653 for y
in range(0, ampData.getDimensions().getY()):
654 ampData.array[y][x] = (ampData.array[y][x] +
655 scale * np.exp(-0.5 * ((x - x0)**2 + (y - y0)**2) / 3.0**2))
658 """Add a scaled copy of an amplifier to another, simulating crosstalk. 660 This method operates in the amplifier coordinate frame. 664 ampDataSource : `lsst.afw.image.ImageF` 665 Amplifier image to add scaled copy from. 666 ampDataTarget : `lsst.afw.image.ImageF` 667 Amplifier image to add scaled copy to. 669 Flux scale of the copy to add to the target. 673 This simulates simple crosstalk between amplifiers. 675 ampDataTarget.array[:] = (ampDataTarget.array[:] +
676 scale * ampDataSource.array[:])
680 """Add a fringe-like ripple pattern to an amplifier's image data. 684 amp : `~lsst.afw.ampInfo.AmpInfoRecord` 685 Amplifier to operate on. Needed for amp<->exp coordinate transforms. 686 ampData : `lsst.afw.image.ImageF` 687 Amplifier image to operate on. 688 scale : `numpy.array` or `float` 689 Peak intensity scaling for the ripple. 690 x0 : `numpy.array` or `float`, optional 692 y0 : `numpy.array` or `float`, optional 697 This uses an offset sinc function to generate a ripple 698 pattern. True fringes have much finer structure, but this 699 pattern should be visually identifiable. The (x, y) 700 coordinates are in the frame of the amplifier, and (u, v) in 701 the frame of the full trimmed image. 703 for x
in range(0, ampData.getDimensions().getX()):
704 for y
in range(0, ampData.getDimensions().getY()):
706 ampData.getArray()[y][x] = np.sum((ampData.getArray()[y][x] +
708 np.sinc(((u - x0) / 50)**2 +
709 ((v - y0) / 50)**2)))
712 """Multiply an amplifier's image data by a flat-like pattern. 716 amp : `lsst.afw.ampInfo.AmpInfoRecord` 717 Amplifier to operate on. Needed for amp<->exp coordinate transforms. 718 ampData : `lsst.afw.image.ImageF` 719 Amplifier image to operate on. 721 Fractional drop from center to edge of detector along x-axis. 723 Peak location in detector coordinates. 725 Peak location in detector coordinates. 729 This uses a 2-d Gaussian to simulate an illumination pattern 730 that falls off towards the edge of the detector. The (x, y) 731 coordinates are in the frame of the amplifier, and (u, v) in 732 the frame of the full trimmed image. 735 raise RuntimeError(
"Flat fractional drop cannot be greater than 1.0")
737 sigma = u0 / np.sqrt(-2.0 * np.log(fracDrop))
739 for x
in range(0, ampData.getDimensions().getX()):
740 for y
in range(0, ampData.getDimensions().getY()):
742 f = np.exp(-0.5 * ((u - u0)**2 + (v - v0)**2) / sigma**2)
743 ampData.array[y][x] = (ampData.array[y][x] * f)
747 """Generate a raw exposure suitable for ISR. 751 self.config.isTrimmed =
False 752 self.config.doGenerateImage =
True 753 self.config.doGenerateAmpDict =
False 754 self.config.doAddOverscan =
True 755 self.config.doAddSky =
True 756 self.config.doAddSource =
True 757 self.config.doAddCrosstalk =
False 758 self.config.doAddBias =
True 759 self.config.doAddDark =
True 763 """Generate a trimmed raw exposure. 767 self.config.isTrimmed =
True 768 self.config.doAddOverscan =
False 772 """Generate a trimmed raw exposure. 776 self.config.isTrimmed =
True 777 self.config.doGenerateImage =
True 778 self.config.doAddOverscan =
False 779 self.config.doAddSky =
True 780 self.config.doAddSource =
True 781 self.config.doAddCrosstalk =
False 783 self.config.doAddBias =
False 784 self.config.doAddDark =
False 785 self.config.doAddFlat =
False 786 self.config.doAddFringe =
True 788 self.config.biasLevel = 0.0
789 self.config.readNoise = 10.0
793 """Generate a raw exposure dict suitable for ISR. 797 self.config.doGenerateAmpDict =
True 801 """Parent class for those that make master calibrations. 805 self.config.isTrimmed =
True 806 self.config.doGenerateImage =
True 807 self.config.doAddOverscan =
False 808 self.config.doAddSky =
False 809 self.config.doAddSource =
False 810 self.config.doAddCrosstalk =
False 812 self.config.doAddBias =
False 813 self.config.doAddDark =
False 814 self.config.doAddFlat =
False 815 self.config.doAddFringe =
False 819 """Simulated master bias calibration. 823 self.config.doAddBias =
True 824 self.config.readNoise = 10.0
828 """Simulated master dark calibration. 832 self.config.doAddDark =
True 833 self.config.darkTime = 1.0
837 """Simulated master flat calibration. 841 self.config.doAddFlat =
True 845 """Simulated master fringe calibration. 849 self.config.doAddFringe =
True 853 """Simulated untrimmed master fringe calibration. 857 self.config.isTrimmed =
False 861 """Simulated brighter-fatter kernel. 865 self.config.doGenerateImage =
False 866 self.config.doGenerateData =
True 867 self.config.doBrighterFatter =
True 868 self.config.doDefects =
False 869 self.config.doCrosstalkCoeffs =
False 870 self.config.doTransmissionCurve =
False 874 """Simulated defect list. 878 self.config.doGenerateImage =
False 879 self.config.doGenerateData =
True 880 self.config.doBrighterFatter =
False 881 self.config.doDefects =
True 882 self.config.doCrosstalkCoeffs =
False 883 self.config.doTransmissionCurve =
False 887 """Simulated crosstalk coefficient matrix. 891 self.config.doGenerateImage =
False 892 self.config.doGenerateData =
True 893 self.config.doBrighterFatter =
False 894 self.config.doDefects =
False 895 self.config.doCrosstalkCoeffs =
True 896 self.config.doTransmissionCurve =
False 900 """Simulated transmission curve. 904 self.config.doGenerateImage =
False 905 self.config.doGenerateData =
True 906 self.config.doBrighterFatter =
False 907 self.config.doDefects =
False 908 self.config.doCrosstalkCoeffs =
False 909 self.config.doTransmissionCurve =
True 913 """Simulated gen2 butler data ref. 915 Currently only supports get and put operations, which are most 916 likely to be called for data in ISR processing. 919 dataId =
"isrMock Fake Data" 927 if 'config' in kwargs.keys():
935 self.
config.doGenerateImage =
True 936 self.
config.doGenerateData =
False 941 self.
config.doGenerateImage =
False 942 self.
config.doGenerateData =
True 944 def get(self, dataType, **kwargs):
945 """Return an appropriate data product. 950 Type of data product to return. 954 mock : IsrMock.run() result 957 if "_filename" in dataType:
959 return tempfile.mktemp(),
"mock" 960 elif 'transmission_' in dataType:
963 elif dataType ==
'ccdExposureId':
966 elif dataType ==
'camera':
969 elif dataType ==
'raw':
972 elif dataType ==
'bias':
975 elif dataType ==
'dark':
978 elif dataType ==
'flat':
981 elif dataType ==
'fringe':
984 elif dataType ==
'defects':
987 elif dataType ==
'bfKernel':
990 elif dataType ==
'linearizer':
992 elif dataType ==
'crosstalkSources':
995 raise RuntimeError(
"ISR DataRefMock cannot return %s.", dataType)
997 def put(self, exposure, filename):
998 """Write an exposure to a FITS file. 1002 exposure : `lsst.afw.image.Exposure` 1003 Image data to write out. 1005 Base name of the output file. 1007 exposure.writeFits(filename+
".fits")
1011 """Simulated gen2 butler data ref. 1013 Currently only supports get and put operations, which are most 1014 likely to be called for data in ISR processing. 1017 dataId =
"isrMock Fake Data" 1025 if 'config' in kwargs.keys():
1029 self.
config.isTrimmed =
True 1030 self.
config.doAddFringe =
True 1031 self.
config.readNoise = 10.0
1033 def get(self, dataType, **kwargs):
1034 """Return an appropriate data product. 1039 Type of data product to return. 1043 mock : IsrMock.run() result 1046 if "_filename" in dataType:
1047 return tempfile.mktemp(),
"mock" 1048 elif 'transmission_' in dataType:
1050 elif dataType ==
'ccdExposureId':
1052 elif dataType ==
'camera':
1054 elif dataType ==
'raw':
1056 elif dataType ==
'bias':
1058 elif dataType ==
'dark':
1060 elif dataType ==
'flat':
1062 elif dataType ==
'fringe':
1064 configCopy = copy.deepcopy(self.
config)
1065 for scale, x, y
in zip(self.
config.fringeScale, self.
config.fringeX0, self.
config.fringeY0):
1066 configCopy.fringeScale = [1.0]
1067 configCopy.fringeX0 = [x]
1068 configCopy.fringeY0 = [y]
1071 elif dataType ==
'defects':
1073 elif dataType ==
'bfKernel':
1075 elif dataType ==
'linearizer':
1077 elif dataType ==
'crosstalkSources':
1082 def put(self, exposure, filename):
1083 """Write an exposure to a FITS file. 1087 exposure : `lsst.afw.image.Exposure` 1088 Image data to write out. 1090 Base name of the output file. 1092 exposure.writeFits(filename+
".fits")
def amplifierAddNoise(self, ampData, mean, sigma)
def __init__(self, kwargs)
def __init__(self, kwargs)
def __init__(self, kwargs)
def amplifierAddSource(self, ampData, scale, x0, y0)
def __init__(self, kwargs)
def __init__(self, kwargs)
def amplifierAddYGradient(self, ampData, start, end)
def put(self, exposure, filename)
def __init__(self, kwargs)
Information about a single exposure of an imaging camera.
def __init__(self, kwargs)
def get(self, dataType, kwargs)
def amplifierAddFringe(self, amp, ampData, scale, x0=100, y0=0)
Fit spatial kernel using approximate fluxes for candidates, and solving a linear system of equations...
def __init__(self, kwargs)
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > * makeMaskedImage(typename std::shared_ptr< Image< ImagePixelT >> image, typename std::shared_ptr< Mask< MaskPixelT >> mask=Mask< MaskPixelT >(), typename std::shared_ptr< Image< VariancePixelT >> variance=Image< VariancePixelT >())
A function to return a MaskedImage of the correct type (cf.
def __init__(self, kwargs)
std::shared_ptr< Exposure< ImagePixelT, MaskPixelT, VariancePixelT > > makeExposure(MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > &mimage, std::shared_ptr< geom::SkyWcs const > wcs=std::shared_ptr< geom::SkyWcs const >())
A function to return an Exposure of the correct type (cf.
def __init__(self, kwargs)
def __init__(self, kwargs)
Represent a 2-dimensional array of bitmask pixels.
def localCoordToExpCoord(self, ampData, x, y)
def __init__(self, kwargs)
def amplifierMultiplyFlat(self, amp, ampData, fracDrop, u0=100.0, v0=100.0)
def __init__(self, kwargs)
def get(self, dataType, kwargs)
def put(self, exposure, filename)
Point in an unspecified spherical coordinate system.
def __init__(self, kwargs)
std::shared_ptr< SkyWcs > makeSkyWcs(TransformPoint2ToPoint2 const &pixelsToFieldAngle, lsst::geom::Angle const &orientation, bool flipX, lsst::geom::SpherePoint const &boresight, std::string const &projection="TAN")
Construct a FITS SkyWcs from camera geometry.
Eigen::Matrix2d makeCdMatrix(lsst::geom::Angle const &scale, lsst::geom::Angle const &orientation=0 *lsst::geom::degrees, bool flipX=false)
Make a WCS CD matrix.
def makeTransmissionCurve(self)
def __init__(self, kwargs)
def __init__(self, kwargs)
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...
def amplifierAddCT(self, ampDataSource, ampDataTarget, scale)
An integer coordinate rectangle.
def makeCrosstalkCoeff(self)
def __init__(self, kwargs)