MeanDiaPosition#

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

Bases: DiaObjectCalculationPlugin

Compute the mean position and position uncertainty of a DiaObject from its associated DiaSources.

The reported (ra, dec) is the inverse-variance weighted spherical mean of the per-source positions, using only the DiaSources whose per-source coordinate errors are finite. The reported covariance is the covariance of that weighted-mean estimator,

C_formal = (sum_i inv(C_i))^-1,

where C_i is the per-source 2x2 covariance, multiplied by a chi-squared scale factor that inflates the result when the empirical scatter is larger than the per-source errors predict:

chi2 = sum_i r_i^T inv(C_i) r_i (r_i = tangent-plane

residual from the mean)

dof = 2 * (N - 1) C_obj = max(1, chi2 / dof) * C_formal

When the data agree with the per-source errors (chi2 ~ dof) the scale factor is unity and C_obj == C_formal. When the residuals exceed what the errors predict, the covariance is inflated.

Attributes Summary

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, diaSources, **kwargs)

Compute the mean ra/dec position and its uncertainty for each DiaObject.

getExecutionOrder()

Used to set the relative order of plugin execution.

Attributes Documentation

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', 'dec', 'raErr', 'decErr', 'ra_dec_Cov']#

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 = '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.

Methods Documentation

calculate(diaObjects, diaSources, **kwargs)#

Compute the mean ra/dec position and its uncertainty for each DiaObject.

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.

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