23 __all__ = [
"Exposure"]
27 from deprecated.sphinx
import deprecated
31 from ..slicing
import supportSlicing
32 from ..image.fitsIoWithOptions
import imageReadFitsWithOptions, exposureWriteFitsWithOptions
33 from .exposure
import ExposureI, ExposureF, ExposureD, ExposureU, ExposureL
38 def _set(self, index, value, origin):
39 """Set the pixel at the given index to a triple (value, mask, variance). 43 index : `geom.Point2I` 44 Position of the pixel to assign to. 46 A tuple of (value, mask, variance) scalars. 47 origin : `ImageOrigin` 48 Coordinate system of ``index`` (`PARENT` or `LOCAL`). 50 self.maskedImage._set(index, value=value, origin=origin)
52 def _get(self, index, origin):
53 """Return a triple (value, mask, variance) at the given index. 57 index : `geom.Point2I` 58 Position of the pixel to assign to. 59 origin : `ImageOrigin` 60 Coordinate system of ``index`` (`PARENT` or `LOCAL`). 62 return self.maskedImage._get(index, origin=origin)
69 return ExposureF(self, deep=
True)
72 return ExposureD(self, deep=
True)
75 return self.maskedImage.image
78 self.maskedImage.image = image
80 image = property(getImage, setImage)
83 return self.maskedImage.mask
86 self.maskedImage.mask = mask
88 mask = property(getMask, setMask)
91 return self.maskedImage.variance
94 self.maskedImage.variance = variance
96 variance = property(getVariance, setVariance)
98 readFitsWithOptions = classmethod(imageReadFitsWithOptions)
100 writeFitsWithOptions = exposureWriteFitsWithOptions
102 @deprecated(reason=
"Replaced with getPhotoCalib (will be removed after v18)", category=FutureWarning)
104 return self._getCalib(*args, **kwargs)
106 @deprecated(reason=
"Replaced with setPhotoCalib (will be removed after v18)", category=FutureWarning)
108 self._setCalib(*args, **kwargs)
111 Exposure.register(np.int32, ExposureI)
112 Exposure.register(np.float32, ExposureF)
113 Exposure.register(np.float64, ExposureD)
114 Exposure.register(np.uint16, ExposureU)
115 Exposure.register(np.uint64, ExposureL)
116 Exposure.alias(
"I", ExposureI)
117 Exposure.alias(
"F", ExposureF)
118 Exposure.alias(
"D", ExposureD)
119 Exposure.alias(
"U", ExposureU) 120 Exposure.alias("L", ExposureL)
122 for cls
in set(Exposure.values()):
def setVariance(self, variance)
daf::base::PropertySet * set
def getCalib(self, args, kwargs)
def setCalib(self, args, kwargs)
def setImage(self, image)