LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
Classes | Functions
lsst.pipe.tasks.healSparseMappingProperties Namespace Reference

Classes

class  BasePropertyMapConfig
 
class  PropertyMapRegistry
 
class  PropertyMapMap
 
class  BasePropertyMap
 
class  ExposureTimePropertyMap
 
class  PsfSizePropertyMap
 
class  PsfE1PropertyMap
 
class  PsfE2PropertyMap
 
class  NExposurePropertyMap
 
class  PsfMaglimPropertyMapConfig
 
class  PsfMaglimPropertyMap
 
class  SkyBackgroundPropertyMap
 
class  SkyNoisePropertyMap
 
class  DcrDraPropertyMap
 
class  DcrDdecPropertyMap
 
class  DcrE1PropertyMap
 
class  DcrE2PropertyMap
 

Functions

def register_property_map (name)
 
def compute_approx_psf_size_and_shape (ccd_row, ra, dec, nx=20, ny=20, orderx=2, ordery=2)
 

Function Documentation

◆ compute_approx_psf_size_and_shape()

def lsst.pipe.tasks.healSparseMappingProperties.compute_approx_psf_size_and_shape (   ccd_row,
  ra,
  dec,
  nx = 20,
  ny = 20,
  orderx = 2,
  ordery = 2 
)
Compute the approximate psf size and shape.

This routine fits how the psf size and shape varies over a field by approximating
with a Chebyshev bounded field.

Parameters
----------
ccd_row : `lsst.afw.table.ExposureRecord`
    Exposure metadata for a given detector exposure.
ra : `np.ndarray`
    Right ascension of points to compute size and shape (degrees).
dec : `np.ndarray`
    Declination of points to compute size and shape (degrees).
nx : `int`, optional
    Number of sampling points in the x direction.
ny : `int`, optional
    Number of sampling points in the y direction.
orderx : `int`, optional
    Chebyshev polynomial order for fit in x direction.
ordery : `int`, optional
    Chebyshev polynomial order for fit in y direction.

Returns
-------
psf_array : `np.ndarray`
    Record array with "psf_size", "psf_e1", "psf_e2".

Definition at line 99 of file healSparseMappingProperties.py.

99 def compute_approx_psf_size_and_shape(ccd_row, ra, dec, nx=20, ny=20, orderx=2, ordery=2):
100  """Compute the approximate psf size and shape.
101 
102  This routine fits how the psf size and shape varies over a field by approximating
103  with a Chebyshev bounded field.
104 
105  Parameters
106  ----------
107  ccd_row : `lsst.afw.table.ExposureRecord`
108  Exposure metadata for a given detector exposure.
109  ra : `np.ndarray`
110  Right ascension of points to compute size and shape (degrees).
111  dec : `np.ndarray`
112  Declination of points to compute size and shape (degrees).
113  nx : `int`, optional
114  Number of sampling points in the x direction.
115  ny : `int`, optional
116  Number of sampling points in the y direction.
117  orderx : `int`, optional
118  Chebyshev polynomial order for fit in x direction.
119  ordery : `int`, optional
120  Chebyshev polynomial order for fit in y direction.
121 
122  Returns
123  -------
124  psf_array : `np.ndarray`
125  Record array with "psf_size", "psf_e1", "psf_e2".
126  """
127  pts = [lsst.geom.SpherePoint(r*lsst.geom.degrees, d*lsst.geom.degrees) for
128  r, d in zip(ra, dec)]
129  pixels = ccd_row.getWcs().skyToPixel(pts)
130 
131  ctrl = ChebyshevBoundedFieldControl()
132  ctrl.orderX = orderx
133  ctrl.orderY = ordery
134  ctrl.triangular = False
135 
136  bbox = ccd_row.getBBox()
137  xSteps = np.linspace(bbox.getMinX(), bbox.getMaxX(), nx)
138  ySteps = np.linspace(bbox.getMinY(), bbox.getMaxY(), ny)
139  x = np.tile(xSteps, nx)
140  y = np.repeat(ySteps, ny)
141 
142  psf_size = np.zeros(x.size)
143  psf_e1 = np.zeros(x.size)
144  psf_e2 = np.zeros(x.size)
145  psf_area = np.zeros(x.size)
146 
147  psf = ccd_row.getPsf()
148  for i in range(x.size):
149  shape = psf.computeShape(lsst.geom.Point2D(x[i], y[i]))
150  psf_size[i] = shape.getDeterminantRadius()
151  ixx = shape.getIxx()
152  iyy = shape.getIyy()
153  ixy = shape.getIxy()
154 
155  psf_e1[i] = (ixx - iyy)/(ixx + iyy + 2.*psf_size[i]**2.)
156  psf_e2[i] = (2.*ixy)/(ixx + iyy + 2.*psf_size[i]**2.)
157 
158  im = psf.computeKernelImage(lsst.geom.Point2D(x[i], y[i]))
159  psf_area[i] = np.sum(im.array)/np.sum(im.array**2.)
160 
161  pixel_x = np.array([pix.getX() for pix in pixels])
162  pixel_y = np.array([pix.getY() for pix in pixels])
163 
164  psf_array = np.zeros(pixel_x.size, dtype=[("psf_size", "f8"),
165  ("psf_e1", "f8"),
166  ("psf_e2", "f8"),
167  ("psf_area", "f8")])
168 
169  cheb_size = ChebyshevBoundedField.fit(lsst.geom.Box2I(bbox), x, y, psf_size, ctrl)
170  psf_array["psf_size"] = cheb_size.evaluate(pixel_x, pixel_y)
171  cheb_e1 = ChebyshevBoundedField.fit(lsst.geom.Box2I(bbox), x, y, psf_e1, ctrl)
172  psf_array["psf_e1"] = cheb_e1.evaluate(pixel_x, pixel_y)
173  cheb_e2 = ChebyshevBoundedField.fit(lsst.geom.Box2I(bbox), x, y, psf_e2, ctrl)
174  psf_array["psf_e2"] = cheb_e2.evaluate(pixel_x, pixel_y)
175  cheb_area = ChebyshevBoundedField.fit(lsst.geom.Box2I(bbox), x, y, psf_area, ctrl)
176  psf_array["psf_area"] = cheb_area.evaluate(pixel_x, pixel_y)
177 
178  return psf_array
179 
180 
An integer coordinate rectangle.
Definition: Box.h:55
Point in an unspecified spherical coordinate system.
Definition: SpherePoint.h:57
def compute_approx_psf_size_and_shape(ccd_row, ra, dec, nx=20, ny=20, orderx=2, ordery=2)

◆ register_property_map()

def lsst.pipe.tasks.healSparseMappingProperties.register_property_map (   name)
A decorator to register a property map class in its base class's registry.

Definition at line 91 of file healSparseMappingProperties.py.

91 def register_property_map(name):
92  """A decorator to register a property map class in its base class's registry."""
93  def decorate(PropertyMapClass):
94  PropertyMapClass.registry.register(name, PropertyMapClass)
95  return PropertyMapClass
96  return decorate
97 
98