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
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap Class Reference
Inheritance diagram for lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap:
lsst.pipe.tasks.healSparseMappingProperties.DcrDdecPropertyMap lsst.pipe.tasks.healSparseMappingProperties.DcrDraPropertyMap lsst.pipe.tasks.healSparseMappingProperties.DcrE1PropertyMap lsst.pipe.tasks.healSparseMappingProperties.DcrE2PropertyMap lsst.pipe.tasks.healSparseMappingProperties.ExposureTimePropertyMap lsst.pipe.tasks.healSparseMappingProperties.NExposurePropertyMap lsst.pipe.tasks.healSparseMappingProperties.PsfE1PropertyMap lsst.pipe.tasks.healSparseMappingProperties.PsfE2PropertyMap lsst.pipe.tasks.healSparseMappingProperties.PsfMaglimPropertyMap lsst.pipe.tasks.healSparseMappingProperties.PsfSizePropertyMap lsst.pipe.tasks.healSparseMappingProperties.SkyBackgroundPropertyMap lsst.pipe.tasks.healSparseMappingProperties.SkyNoisePropertyMap

Public Member Functions

def __init__ (self, config, name)
 
def initialize_tract_maps (self, nside_coverage, nside)
 
def initialize_values (self, n_pixels)
 
def accumulate_values (self, indices, ra, dec, weights, scalings, row, psf_array=None)
 
def finalize_mean_values (self, total_weights, total_inputs)
 
def set_map_values (self, pixels)
 

Public Attributes

 config
 
 name
 
 zeropoint
 
 min_map
 
 max_map
 
 mean_map
 
 weighted_mean_map
 
 sum_map
 
 min_values
 
 max_values
 
 mean_values
 
 weighted_mean_values
 
 sum_values
 

Static Public Attributes

 dtype = np.float64
 
bool requires_psf = False
 
 ConfigClass = BasePropertyMapConfig
 
 registry = PropertyMapRegistry(BasePropertyMapConfig)
 

Detailed Description

Base class for property maps.

Parameters
----------
config : `BasePropertyMapConfig`
    Property map configuration.
name : `str`
    Property map name.

Definition at line 195 of file healSparseMappingProperties.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.__init__ (   self,
  config,
  name 
)

Definition at line 212 of file healSparseMappingProperties.py.

212  def __init__(self, config, name):
213  object.__init__(self)
214  self.config = config
215  self.name = name
216  self.zeropoint = 0.0
217 

Member Function Documentation

◆ accumulate_values()

def lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.accumulate_values (   self,
  indices,
  ra,
  dec,
  weights,
  scalings,
  row,
  psf_array = None 
)
Accumulate values from a row of a visitSummary table.

Parameters
----------
indices : `np.ndarray`
    Indices of values that should be accumulated.
ra : `np.ndarray`
    Array of right ascension for indices
dec : `np.ndarray`
    Array of declination for indices
weights : `float` or `np.ndarray`
    Weight(s) for indices to be accumulated.
scalings : `float` or `np.ndarray`
    Scaling values to coadd zeropoint.
row : `lsst.afw.table.ExposureRecord`
    Row of a visitSummary ExposureCatalog.
psf_array : `np.ndarray`, optional
    Array of approximate psf values matched to ra/dec.

Raises
------
ValueError : Raised if requires_psf is True and psf_array is None.

Definition at line 271 of file healSparseMappingProperties.py.

272  psf_array=None):
273  """Accumulate values from a row of a visitSummary table.
274 
275  Parameters
276  ----------
277  indices : `np.ndarray`
278  Indices of values that should be accumulated.
279  ra : `np.ndarray`
280  Array of right ascension for indices
281  dec : `np.ndarray`
282  Array of declination for indices
283  weights : `float` or `np.ndarray`
284  Weight(s) for indices to be accumulated.
285  scalings : `float` or `np.ndarray`
286  Scaling values to coadd zeropoint.
287  row : `lsst.afw.table.ExposureRecord`
288  Row of a visitSummary ExposureCatalog.
289  psf_array : `np.ndarray`, optional
290  Array of approximate psf values matched to ra/dec.
291 
292  Raises
293  ------
294  ValueError : Raised if requires_psf is True and psf_array is None.
295  """
296  if self.requires_psf and psf_array is None:
297  name = self.__class__.__name__
298  raise ValueError(f"Cannot compute {name} without psf_array.")
299 
300  values = self._compute(row, ra, dec, scalings, psf_array=psf_array)
301  if self.config.do_min:
302  self.min_values[indices] = np.fmin(self.min_values[indices], values)
303  if self.config.do_max:
304  self.max_values[indices] = np.fmax(self.max_values[indices], values)
305  if self.config.do_mean:
306  self.mean_values[indices] += values
307  if self.config.do_weighted_mean:
308  self.weighted_mean_values[indices] += weights*values
309  if self.config.do_sum:
310  self.sum_values[indices] += values
311 

◆ finalize_mean_values()

def lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.finalize_mean_values (   self,
  total_weights,
  total_inputs 
)
Finalize the accumulation of the mean and weighted mean.

Parameters
----------
total_weights : `np.ndarray`
    Total accumulated weights, for each value index.
total_inputs : `np.ndarray`
    Total number of inputs, for each value index.

Definition at line 312 of file healSparseMappingProperties.py.

312  def finalize_mean_values(self, total_weights, total_inputs):
313  """Finalize the accumulation of the mean and weighted mean.
314 
315  Parameters
316  ----------
317  total_weights : `np.ndarray`
318  Total accumulated weights, for each value index.
319  total_inputs : `np.ndarray`
320  Total number of inputs, for each value index.
321  """
322  if self.config.do_mean:
323  use, = np.where(total_inputs > 0)
324  self.mean_values[use] /= total_inputs[use]
325  if self.config.do_weighted_mean:
326  use, = np.where(total_weights > 0.0)
327  self.weighted_mean_values[use] /= total_weights[use]
328 
329  # And perform any necessary post-processing
330  self._post_process(total_weights, total_inputs)
331 

◆ initialize_tract_maps()

def lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.initialize_tract_maps (   self,
  nside_coverage,
  nside 
)
Initialize the tract maps.

Parameters
----------
nside_coverage : `int`
    Healpix nside of the healsparse coverage map.
nside : `int`
    Healpix nside of the property map.

Definition at line 218 of file healSparseMappingProperties.py.

218  def initialize_tract_maps(self, nside_coverage, nside):
219  """Initialize the tract maps.
220 
221  Parameters
222  ----------
223  nside_coverage : `int`
224  Healpix nside of the healsparse coverage map.
225  nside : `int`
226  Healpix nside of the property map.
227  """
228  if self.config.do_min:
229  self.min_map = hsp.HealSparseMap.make_empty(nside_coverage,
230  nside,
231  self.dtype)
232  if self.config.do_max:
233  self.max_map = hsp.HealSparseMap.make_empty(nside_coverage,
234  nside,
235  self.dtype)
236  if self.config.do_mean:
237  self.mean_map = hsp.HealSparseMap.make_empty(nside_coverage,
238  nside,
239  self.dtype)
240  if self.config.do_weighted_mean:
241  self.weighted_mean_map = hsp.HealSparseMap.make_empty(nside_coverage,
242  nside,
243  self.dtype)
244  if self.config.do_sum:
245  self.sum_map = hsp.HealSparseMap.make_empty(nside_coverage,
246  nside,
247  self.dtype)
248 

◆ initialize_values()

def lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.initialize_values (   self,
  n_pixels 
)
Initialize the value arrays for accumulation.

Parameters
----------
n_pixels : `int`
    Number of pixels in the map.

Definition at line 249 of file healSparseMappingProperties.py.

249  def initialize_values(self, n_pixels):
250  """Initialize the value arrays for accumulation.
251 
252  Parameters
253  ----------
254  n_pixels : `int`
255  Number of pixels in the map.
256  """
257  if self.config.do_min:
258  self.min_values = np.zeros(n_pixels, dtype=self.dtype)
259  # This works for float types, need check for integers...
260  self.min_values[:] = np.nan
261  if self.config.do_max:
262  self.max_values = np.zeros(n_pixels, dtype=self.dtype)
263  self.max_values[:] = np.nan
264  if self.config.do_mean:
265  self.mean_values = np.zeros(n_pixels, dtype=self.dtype)
266  if self.config.do_weighted_mean:
267  self.weighted_mean_values = np.zeros(n_pixels, dtype=self.dtype)
268  if self.config.do_sum:
269  self.sum_values = np.zeros(n_pixels, dtype=self.dtype)
270 

◆ set_map_values()

def lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.set_map_values (   self,
  pixels 
)
Assign accumulated values to the maps.

Parameters
----------
pixels : `np.ndarray`
    Array of healpix pixels (nest scheme) to set in the map.

Definition at line 332 of file healSparseMappingProperties.py.

332  def set_map_values(self, pixels):
333  """Assign accumulated values to the maps.
334 
335  Parameters
336  ----------
337  pixels : `np.ndarray`
338  Array of healpix pixels (nest scheme) to set in the map.
339  """
340  if self.config.do_min:
341  self.min_map[pixels] = self.min_values
342  if self.config.do_max:
343  self.max_map[pixels] = self.max_values
344  if self.config.do_mean:
345  self.mean_map[pixels] = self.mean_values
346  if self.config.do_weighted_mean:
347  self.weighted_mean_map[pixels] = self.weighted_mean_values
348  if self.config.do_sum:
349  self.sum_map[pixels] = self.sum_values
350 

Member Data Documentation

◆ config

lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.config

Definition at line 214 of file healSparseMappingProperties.py.

◆ ConfigClass

lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.ConfigClass = BasePropertyMapConfig
static

Definition at line 208 of file healSparseMappingProperties.py.

◆ dtype

lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.dtype = np.float64
static

Definition at line 205 of file healSparseMappingProperties.py.

◆ max_map

lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.max_map

Definition at line 233 of file healSparseMappingProperties.py.

◆ max_values

lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.max_values

Definition at line 262 of file healSparseMappingProperties.py.

◆ mean_map

lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.mean_map

Definition at line 237 of file healSparseMappingProperties.py.

◆ mean_values

lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.mean_values

Definition at line 265 of file healSparseMappingProperties.py.

◆ min_map

lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.min_map

Definition at line 229 of file healSparseMappingProperties.py.

◆ min_values

lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.min_values

Definition at line 258 of file healSparseMappingProperties.py.

◆ name

lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.name

Definition at line 215 of file healSparseMappingProperties.py.

◆ registry

lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.registry = PropertyMapRegistry(BasePropertyMapConfig)
static

Definition at line 210 of file healSparseMappingProperties.py.

◆ requires_psf

bool lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.requires_psf = False
static

Definition at line 206 of file healSparseMappingProperties.py.

◆ sum_map

lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.sum_map

Definition at line 245 of file healSparseMappingProperties.py.

◆ sum_values

lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.sum_values

Definition at line 269 of file healSparseMappingProperties.py.

◆ weighted_mean_map

lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.weighted_mean_map

Definition at line 241 of file healSparseMappingProperties.py.

◆ weighted_mean_values

lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.weighted_mean_values

Definition at line 267 of file healSparseMappingProperties.py.

◆ zeropoint

lsst.pipe.tasks.healSparseMappingProperties.BasePropertyMap.zeropoint

Definition at line 216 of file healSparseMappingProperties.py.


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