HTMIndexDiaPosition¶
- class lsst.meas.base.HTMIndexDiaPosition(config, name, metadata)¶
Bases:
DiaObjectCalculationPluginCompute 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
pixelIdcolumn 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
Order for algorithms which require shape, centroid and flux (
float).Order for algorithms which require only Footprint and Peaks (
float).Order for catalog calculation plugins.
Add order after flux means and stds are calculated.
Order for algorithms which require a shape and a centroid (
float).Order for algorithms which require a centroid (
float).DiaObject column names required by the plugin in order to run and complete its calculation.
This plugin requires a filter to be specified.
DiaObject column names output by the plugin.
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".List of available plugins (
lsst.meas.base.PluginRegistry).Methods Summary
calculate(diaObjects, diaObjectId, **kwargs)Compute the mean position of a DiaObject given a set of DiaSources
fail(diaObject, columns[, error])Set diaObject position values to nan.
Used to set the relative order of plugin execution.
Get the measurement transformation appropriate to this plugin.
Attributes Documentation
- APCORR_ORDER = 3.0¶
Order for algorithms which require shape, centroid and flux (
float).Notes
These algorithms may assume that
getCentroidandgetShapewill return good values, that flux has been measured, and that and that a Footprint and its Peaks are available.
- CENTROID_ORDER = 0.0¶
Order for algorithms which require only Footprint and Peaks (
float).Notes
Algorithms with this execution order include centroids.
- DEFAULT_CATALOGCALCULATION = 4.0¶
Order for catalog calculation plugins.
Notes
These plugins only operate on catalogs; they may not access pixel values.
- FLUX_MOMENTS_CALCULATED = 5.0¶
Add order after flux means and stds are calculated.
- FLUX_ORDER = 2.0¶
Order for algorithms which require a shape and a centroid (
float).Notes
These algorithms may assume that both
getCentroidandgetShapewill return good values, and that a Footprint and its Peaks are available.
- SHAPE_ORDER = 1.0¶
Order for algorithms which require a centroid (
float).Notes
These algorithms may refer assume that
getCentroidwill return a good centroid, and that a Footprint and its Peaks are available.
- inputCols = ['ra', 'decl']¶
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
PSFluxMeaninstead ofuPSFluxMean.
- 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
PSFluxMeaninstead ofuPSFluxMean.
- 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", thefailmethod must be implemented to accept the whole catalog. If the plugin is of type"single",failshould accept a single source record.
- registry = <lsst.meas.base.pluginRegistry.PluginRegistry object>¶
List of available plugins (
lsst.meas.base.PluginRegistry).
Methods Documentation
- calculate(diaObjects, diaObjectId, **kwargs)¶
Compute the mean position of a DiaObject given a set of DiaSources
- Parameters:
- diaObjects
pandas.dataFrame Summary objects to store values in and read ra/decl from.
- diaObjectId
int Id of the diaObject to update.
- **kwargs
Any additional keyword arguments that may be passed to the plugin.
- diaObjects
- fail(diaObject, columns, error=None)¶
Set diaObject position values to nan.
- Parameters:
- diaObject
dict Summary object to store values in.
- columns
listofstr List of string names of columns to write a the failed value.
- error
BaseExceptionorNone Error to pass. Kept for consistency with CatologCalculationPlugin. Unused.
- diaObject
- classmethod getExecutionOrder()¶
Used to set the relative order of plugin execution.
The values returned by
getExecutionOrderare compared across all plugins, and smaller numbers run first.Notes
CatalogCalculationPlugins must run withBasePlugin.DEFAULT_CATALOGCALCULATIONor higher.All plugins must implement this method with an appropriate run level
- getLogName()¶
- static getTransformClass()¶
Get the measurement transformation appropriate to this plugin.
This returns a subclass of
transforms.MeasurementTransform, which may be instantiated with details of the algorithm configuration and then called with information about calibration and WCS to convert from raw measurement quantities to calibrated units. Calibrated data is then provided in a separate output table.Notes
By default, we copy everything from the input to the output without transformation.