MeanDiaPosition

class lsst.meas.base.MeanDiaPosition(config, name, metadata)

Bases: DiaObjectCalculationPlugin

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

Attributes Summary

APCORR_ORDER

Order for algorithms which require shape, centroid and flux (float).

CENTROID_ORDER

Order for algorithms which require only Footprint and Peaks (float).

DEFAULT_CATALOGCALCULATION

Order for catalog calculation plugins.

FLUX_MOMENTS_CALCULATED

Add order after flux means and stds are calculated.

FLUX_ORDER

Order for algorithms which require a shape and a centroid (float).

SHAPE_ORDER

Order for algorithms which require a centroid (float).

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".

registry

List of available plugins (lsst.meas.base.PluginRegistry).

Methods Summary

calculate(diaObjects, diaSources, **kwargs)

Compute the mean ra/dec position of the diaObject given the diaSource locations.

fail(diaObject, columns[, error])

Set diaObject position values to nan.

getExecutionOrder()

Used to set the relative order of plugin execution.

getLogName()

getTransformClass()

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 getCentroid and getShape will 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 getCentroid and getShape will 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 getCentroid will return a good centroid, and that a Footprint and its Peaks are available.

inputCols = []

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 PSFluxMean instead of uPSFluxMean.

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 = ['ra', 'decl', 'radecTai']

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 PSFluxMean instead of uPSFluxMean.

plugType = 'multi'

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.

registry = <lsst.meas.base.pluginRegistry.PluginRegistry object>

List of available plugins (lsst.meas.base.PluginRegistry).

Methods Documentation

calculate(diaObjects, diaSources, **kwargs)

Compute the mean ra/dec position of the diaObject given the diaSource locations.

Parameters:
diaObjectspandas.DataFrame

Summary objects to store values in.

diaSourcespandas.DataFrame or pandas.DataFrameGroupBy

Catalog of DiaSources summarized by this DiaObject.

**kwargs

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

fail(diaObject, columns, error=None)

Set diaObject position values to nan.

Parameters:
diaObjectdict

Summary object to store values in.

columnslist of str

List of string names of columns to write a the failed value.

errorBaseException or None

Error to pass. Kept for consistency with CatologCalculationPlugin. Unused.

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

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.