LSST Applications g0265f82a02+0e5473021a,g02d81e74bb+0dd8ce4237,g1470d8bcf6+3ea6592b6f,g2079a07aa2+86d27d4dc4,g2305ad1205+5ca4c0b359,g295015adf3+d10818ec9d,g2a9a014e59+6f9be1b9cd,g2bbee38e9b+0e5473021a,g337abbeb29+0e5473021a,g3ddfee87b4+703ba97ebf,g487adcacf7+4fa16da234,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+ffa42b374e,g5a732f18d5+53520f316c,g64a986408d+0dd8ce4237,g858d7b2824+0dd8ce4237,g8a8a8dda67+585e252eca,g99cad8db69+d39438377f,g9ddcbc5298+9a081db1e4,ga1e77700b3+15fc3df1f7,ga8c6da7877+f1d96605c8,gb0e22166c9+60f28cb32d,gb6a65358fc+0e5473021a,gba4ed39666+c2a2e4ac27,gbb8dafda3b+e5339d463f,gc120e1dc64+da31e9920e,gc28159a63d+0e5473021a,gcf0d15dbbd+703ba97ebf,gdaeeff99f8+f9a426f77a,ge6526c86ff+889fc9d533,ge79ae78c31+0e5473021a,gee10cc3b42+585e252eca,gf18bd8381d+7268b93478,gff1a9f87cc+0dd8ce4237,w.2024.16
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Properties | List of all members
lsst.afw.image._exposure._exposureContinued.Exposure Class Reference
Inheritance diagram for lsst.afw.image._exposure._exposureContinued.Exposure:

Public Member Functions

 __reduce__ (self)
 
 __deepcopy__ (self, memo=None)
 
 convertF (self)
 
 convertD (self)
 
 getImage (self)
 
 setImage (self, image)
 
 getMask (self)
 
 setMask (self, mask)
 
 getVariance (self)
 
 setVariance (self, variance)
 
 getConvexPolygon (self, padding=10)
 
 containsSkyCoords (self, ra, dec, padding=10)
 

Public Attributes

 wcs
 

Static Public Attributes

 readFitsWithOptions = classmethod(imageReadFitsWithOptions)
 
 writeFitsWithOptions = exposureWriteFitsWithOptions
 

Protected Member Functions

 _set (self, index, value, origin)
 
 _get (self, index, origin)
 

Properties

 image = property(getImage, setImage)
 
 mask = property(getMask, setMask)
 
 variance = property(getVariance, setVariance)
 
 convex_polygon = property(getConvexPolygon)
 

Detailed Description

Definition at line 35 of file _exposureContinued.py.

Member Function Documentation

◆ __deepcopy__()

lsst.afw.image._exposure._exposureContinued.Exposure.__deepcopy__ ( self,
memo = None )

Definition at line 67 of file _exposureContinued.py.

67 def __deepcopy__(self, memo=None):
68 return self.clone()
69

◆ __reduce__()

lsst.afw.image._exposure._exposureContinued.Exposure.__reduce__ ( self)

Definition at line 63 of file _exposureContinued.py.

63 def __reduce__(self):
64 from lsst.afw.fits import reduceToFits
65 return reduceToFits(self)
66

◆ _get()

lsst.afw.image._exposure._exposureContinued.Exposure._get ( self,
index,
origin )
protected
Return a triple (value, mask, variance) at the given index.

Parameters
----------
index : `geom.Point2I`
    Position of the pixel to assign to.
origin : `ImageOrigin`
    Coordinate system of ``index`` (`PARENT` or `LOCAL`).

Definition at line 51 of file _exposureContinued.py.

51 def _get(self, index, origin):
52 """Return a triple (value, mask, variance) at the given index.
53
54 Parameters
55 ----------
56 index : `geom.Point2I`
57 Position of the pixel to assign to.
58 origin : `ImageOrigin`
59 Coordinate system of ``index`` (`PARENT` or `LOCAL`).
60 """
61 return self.maskedImage._get(index, origin=origin)
62

◆ _set()

lsst.afw.image._exposure._exposureContinued.Exposure._set ( self,
index,
value,
origin )
protected
Set the pixel at the given index to a triple (value, mask, variance).

Parameters
----------
index : `geom.Point2I`
    Position of the pixel to assign to.
value : `tuple`
    A tuple of (value, mask, variance) scalars.
origin : `ImageOrigin`
    Coordinate system of ``index`` (`PARENT` or `LOCAL`).

Definition at line 37 of file _exposureContinued.py.

37 def _set(self, index, value, origin):
38 """Set the pixel at the given index to a triple (value, mask, variance).
39
40 Parameters
41 ----------
42 index : `geom.Point2I`
43 Position of the pixel to assign to.
44 value : `tuple`
45 A tuple of (value, mask, variance) scalars.
46 origin : `ImageOrigin`
47 Coordinate system of ``index`` (`PARENT` or `LOCAL`).
48 """
49 self.maskedImage._set(index, value=value, origin=origin)
50

◆ containsSkyCoords()

lsst.afw.image._exposure._exposureContinued.Exposure.containsSkyCoords ( self,
ra,
dec,
padding = 10 )
Check if a set of sky positions is in the pixel bounding box.

The default padding size was chosen to be sufficient for the
most warped detectors at the edges of the HyperSuprimeCam focal plane.

Parameters
----------
ra : `astropy.Quantity`, (N,)
    Array of Right Ascension, angular units.
dec : `astropy.Quantity`, (N,)
    Array of Declination, angular units.
padding : `int`, optional
    Pixel padding to ensure that bounding box is entirely contained
    within the sky polygon (see ``getConvexPolygon()``).

Returns
-------
contained : `np.ndarray`, (N,)
    Boolean array indicating which points are contained in the
    bounding box.

Raises
------
ValueError if exposure does not have a valid wcs.

Definition at line 128 of file _exposureContinued.py.

128 def containsSkyCoords(self, ra, dec, padding=10):
129 """Check if a set of sky positions is in the pixel bounding box.
130
131 The default padding size was chosen to be sufficient for the
132 most warped detectors at the edges of the HyperSuprimeCam focal plane.
133
134 Parameters
135 ----------
136 ra : `astropy.Quantity`, (N,)
137 Array of Right Ascension, angular units.
138 dec : `astropy.Quantity`, (N,)
139 Array of Declination, angular units.
140 padding : `int`, optional
141 Pixel padding to ensure that bounding box is entirely contained
142 within the sky polygon (see ``getConvexPolygon()``).
143
144 Returns
145 -------
146 contained : `np.ndarray`, (N,)
147 Boolean array indicating which points are contained in the
148 bounding box.
149
150 Raises
151 ------
152 ValueError if exposure does not have a valid wcs.
153 """
154 if self.wcs is None:
155 raise ValueError("Exposure does not have a valid WCS.")
156
157 return bbox_contains_sky_coords(
158 self.getBBox(),
159 self.wcs,
160 ra,
161 dec,
162 padding=padding)
163

◆ convertD()

lsst.afw.image._exposure._exposureContinued.Exposure.convertD ( self)

Definition at line 73 of file _exposureContinued.py.

73 def convertD(self):
74 return ExposureD(self, deep=True)
75

◆ convertF()

lsst.afw.image._exposure._exposureContinued.Exposure.convertF ( self)

Definition at line 70 of file _exposureContinued.py.

70 def convertF(self):
71 return ExposureF(self, deep=True)
72

◆ getConvexPolygon()

lsst.afw.image._exposure._exposureContinued.Exposure.getConvexPolygon ( self,
padding = 10 )
Get the convex polygon associated with the bounding box corners.

The returned polygon has additional padding to ensure that the
bounding box is entirely contained within it.  To ensure a set
of coordinates are entirely contained within an exposure, run
``exposure.containsSkyCoords()``.  The default padding
size was chosen to be sufficient for the most warped detectors at
the edges of the HyperSuprimeCam focal plane.

Parameters
----------
padding : `int`
    Pixel padding to ensure that bounding box is entirely contained
    within the resulting polygon.

Returns
-------
convexPolygon : `lsst.sphgeom.ConvexPolygon`
    Returns `None` if exposure does not have a valid WCS.

Definition at line 100 of file _exposureContinued.py.

100 def getConvexPolygon(self, padding=10):
101 """Get the convex polygon associated with the bounding box corners.
102
103 The returned polygon has additional padding to ensure that the
104 bounding box is entirely contained within it. To ensure a set
105 of coordinates are entirely contained within an exposure, run
106 ``exposure.containsSkyCoords()``. The default padding
107 size was chosen to be sufficient for the most warped detectors at
108 the edges of the HyperSuprimeCam focal plane.
109
110 Parameters
111 ----------
112 padding : `int`
113 Pixel padding to ensure that bounding box is entirely contained
114 within the resulting polygon.
115
116 Returns
117 -------
118 convexPolygon : `lsst.sphgeom.ConvexPolygon`
119 Returns `None` if exposure does not have a valid WCS.
120 """
121 if self.wcs is None:
122 return None
123
124 return bbox_to_convex_polygon(self.getBBox(), self.wcs, padding=padding)
125

◆ getImage()

lsst.afw.image._exposure._exposureContinued.Exposure.getImage ( self)

Definition at line 76 of file _exposureContinued.py.

76 def getImage(self):
77 return self.maskedImage.image
78

◆ getMask()

lsst.afw.image._exposure._exposureContinued.Exposure.getMask ( self)

Definition at line 84 of file _exposureContinued.py.

84 def getMask(self):
85 return self.maskedImage.mask
86

◆ getVariance()

lsst.afw.image._exposure._exposureContinued.Exposure.getVariance ( self)

Definition at line 92 of file _exposureContinued.py.

92 def getVariance(self):
93 return self.maskedImage.variance
94

◆ setImage()

lsst.afw.image._exposure._exposureContinued.Exposure.setImage ( self,
image )

Definition at line 79 of file _exposureContinued.py.

79 def setImage(self, image):
80 self.maskedImage.image = image
81

◆ setMask()

lsst.afw.image._exposure._exposureContinued.Exposure.setMask ( self,
mask )

Definition at line 87 of file _exposureContinued.py.

87 def setMask(self, mask):
88 self.maskedImage.mask = mask
89

◆ setVariance()

lsst.afw.image._exposure._exposureContinued.Exposure.setVariance ( self,
variance )

Definition at line 95 of file _exposureContinued.py.

95 def setVariance(self, variance):
96 self.maskedImage.variance = variance
97

Member Data Documentation

◆ readFitsWithOptions

lsst.afw.image._exposure._exposureContinued.Exposure.readFitsWithOptions = classmethod(imageReadFitsWithOptions)
static

Definition at line 164 of file _exposureContinued.py.

◆ wcs

lsst.afw.image._exposure._exposureContinued.Exposure.wcs

Definition at line 124 of file _exposureContinued.py.

◆ writeFitsWithOptions

lsst.afw.image._exposure._exposureContinued.Exposure.writeFitsWithOptions = exposureWriteFitsWithOptions
static

Definition at line 166 of file _exposureContinued.py.

Property Documentation

◆ convex_polygon

lsst.afw.image._exposure._exposureContinued.Exposure.convex_polygon = property(getConvexPolygon)
static

Definition at line 126 of file _exposureContinued.py.

◆ image

lsst.afw.image._exposure._exposureContinued.Exposure.image = property(getImage, setImage)
static

Definition at line 82 of file _exposureContinued.py.

◆ mask

lsst.afw.image._exposure._exposureContinued.Exposure.mask = property(getMask, setMask)
static

Definition at line 90 of file _exposureContinued.py.

◆ variance

lsst.afw.image._exposure._exposureContinued.Exposure.variance = property(getVariance, setVariance)
static

Definition at line 98 of file _exposureContinued.py.


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