23 from __future__
import absolute_import, division, print_function
25 __all__ = [
"Exposure"]
27 from future.utils
import with_metaclass
30 from lsst.utils
import TemplateMeta
32 from .exposure
import ExposureI, ExposureF, ExposureD, ExposureU, ExposureL
35 class Exposure(with_metaclass(TemplateMeta, object)):
42 return ExposureF(self, deep=
True)
45 return ExposureD(self, deep=
True)
49 """Construct a new Exposure of the same dtype.
51 return cls(*args, **kwargs)
54 """Return a deep copy of self"""
55 return self.
Factory(self, deep=
True)
58 return self.
Factory(self.getMaskedImage()[imageSlice])
61 self.getMaskedImage[imageSlice] = rhs.getMaskedImage()
64 Exposure.register(np.int32, ExposureI)
65 Exposure.register(np.float32, ExposureF)
66 Exposure.register(np.float64, ExposureD)
67 Exposure.register(np.uint16, ExposureU)
68 Exposure.register(np.int64, ExposureL)
69 Exposure.alias(
"I", ExposureI)
70 Exposure.alias(
"F", ExposureF)
71 Exposure.alias(
"D", ExposureD)
72 Exposure.alias(
"U", ExposureU)
73 Exposure.alias("L", ExposureL)