CalcRelativeDistances

class lsst.analysis.tools.actions.keyedData.CalcRelativeDistances(*args, **kw)

Bases: KeyedDataAction

Calculate relative distances in a matched catalog.

Given a catalog of matched sources from multiple visits, this finds all pairs of objects at a given separation, then calculates the separation of their component source measurements from the individual visits. The RMS of these is used to calculate the astrometric relative repeatability metric, AMx, while the overall distribution of separations is used to compute the ADx and AFx metrics.

Attributes Summary

annulus

Radial distance of the annulus in arcmin (float, default 5.0)

decKey

Dec column key (str, default 'coord_dec')

groupKey

Column key to use for forming groups (str, default 'obj_index')

maxPairs

Maximum number of pairs to use; downsample otherwise.

raKey

RA column key (str, default 'coord_ra')

randomSeed

Random seed to use when downsampling.

threshAD

Threshold in mas for AFx calculation.

threshAF

Percentile of differences that can vary by more than threshAD.

visitKey

Column key to use for matching visits (str, default 'visit')

width

Width of annulus in arcmin (float, default 2.0)

Methods Summary

__call__(data, **kwargs)

Run the calculation.

getInputSchema()

Return the schema an AnalysisAction expects to be present in the arguments supplied to the __call__ method.

Attributes Documentation

annulus

Radial distance of the annulus in arcmin (float, default 5.0)

decKey

Dec column key (str, default 'coord_dec')

groupKey

Column key to use for forming groups (str, default 'obj_index')

maxPairs

Maximum number of pairs to use; downsample otherwise. (int, default 100000)

raKey

RA column key (str, default 'coord_ra')

randomSeed

Random seed to use when downsampling. (int, default 12345)

threshAD

Threshold in mas for AFx calculation. (float, default 20.0)

threshAF

Percentile of differences that can vary by more than threshAD. (float, default 10.0)

visitKey

Column key to use for matching visits (str, default 'visit')

width

Width of annulus in arcmin (float, default 2.0)

Methods Documentation

__call__(data: MutableMapping[str, ndarray[Any, dtype[_ScalarType_co]] | Scalar | HealSparseMap | Tensor | Mapping], **kwargs) MutableMapping[str, ndarray[Any, dtype[_ScalarType_co]] | Scalar | HealSparseMap | Tensor | Mapping]

Run the calculation.

Parameters:
dataKeyedData

Catalog of data including coordinate, visit, and object group information.

Returns:
distanceParamsdict

Dictionary of the calculated arrays and metrics with the following keys:

  • rmsDistances : Per-object rms of separations (np.array).

  • separationResidualsAll separations minus per-object median

    (np.array)

  • AMx : AMx metric (float).

  • ADx : ADx metric (float).

  • AFx : AFx metric (float).

getInputSchema() Mapping]]]

Return the schema an AnalysisAction expects to be present in the arguments supplied to the __call__ method.

Returns:
resultKeyedDataSchema

The schema this action requires to be present when calling this action, keys are unformatted.