HTMIndexDiaPosition#

class lsst.meas.base.HTMIndexDiaPosition(config, name, metadata)#

Bases: DiaObjectCalculationPlugin

Compute the mean position of a DiaObject given a set of DiaSources.

Notes#

This plugin was implemented to satisfy requirements of old APDB interface which required pixelId column in DiaObject with HTM20 index. APDB interface had migrated to not need that information, but we keep this plugin in case it may be useful for something else.

Attributes Summary

inputCols

DiaObject column names required by the plugin in order to run and complete its calculation.

needsFilter

This plugin requires a filter to be specified.

outputCols

DiaObject column names output by the plugin.

plugType

Does the plugin operate on a single source or the whole catalog (str)? If the plugin operates on a single source at a time, this should be set to "single"; if it expects the whoe catalog, to "multi".

Methods Summary

calculate(diaObjects, diaObjectId, **kwargs)

Compute the mean position of a DiaObject given a set of DiaSources

getExecutionOrder()

Used to set the relative order of plugin execution.

Attributes Documentation

inputCols = ['ra', 'dec']#

DiaObject column names required by the plugin in order to run and complete its calculation. DiaCalculationTask should raise an error is a plugin is instantiated without the needed column available. Input columns should be defined in the DPDD/cat/Apdb schema. Filter dependent columns should be specified without the filter name perpended to them. eg psfFluxMean instead of u_psfFluxMean.

needsFilter = False#

This plugin requires a filter to be specified. Plugin’s using filter names usually deal with fluxes and only a sub-set of the DiaSource catalog. Plugins that to not use the filter name usually run over a value common across all observations/detections such as position.

outputCols = ['pixelId']#

DiaObject column names output by the plugin. DiaCalculationTask should raise an error if another pluging is run output to the same column. Output columns should be defined in the DPDD/cat/Apdb schema. Filter dependent columns should be specified without the filter name perpended to them. eg psfFluxMean instead of u_psfFluxMean.

plugType = 'single'#

Does the plugin operate on a single source or the whole catalog (str)? If the plugin operates on a single source at a time, this should be set to "single"; if it expects the whoe catalog, to "multi". If the plugin is of type "multi", the fail method must be implemented to accept the whole catalog. If the plugin is of type "single", fail should accept a single source record.

Methods Documentation

calculate(diaObjects, diaObjectId, **kwargs)#

Compute the mean position of a DiaObject given a set of DiaSources

Parameters#

diaObjectspandas.dataFrame

Summary objects to store values in and read ra/dec from.

diaObjectIdint

Id of the diaObject to update.

**kwargs

Any additional keyword arguments that may be passed to the plugin.

classmethod getExecutionOrder()#

Used to set the relative order of plugin execution.

The values returned by getExecutionOrder are compared across all plugins, and smaller numbers run first.

Notes#

CatalogCalculationPlugins must run with BasePlugin.DEFAULT_CATALOGCALCULATION or higher.

All plugins must implement this method with an appropriate run level