WeightedMeanDiaPsFlux¶
- class lsst.meas.base.WeightedMeanDiaPsFlux(config, name, metadata)¶
Bases:
DiaObjectCalculationPlugin
Compute the weighted mean and mean error on the point source fluxes of the DiaSource measured on the difference image.
Additionally store number of usable data points.
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, diaSources, ...)Compute the weighted mean and mean error of the point source flux.
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
getCentroid
andgetShape
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
andgetShape
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 ofuPSFluxMean
.
- needsFilter = True¶
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 = ['PSFluxMean', 'PSFluxMeanErr', 'PSFluxNdata']¶
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 ofuPSFluxMean
.
- 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"
, thefail
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, filterDiaSources, filterName, **kwargs)¶
Compute the weighted mean and mean error of the point source flux.
- Parameters:
- diaObject
dict
Summary object to store values in.
- diaSources
pandas.DataFrame
DataFrame representing all diaSources associated with this diaObject.
- filterDiaSources
pandas.DataFrame
DataFrame representing diaSources associated with this diaObject that are observed in the band pass
filterName
.- filterName
str
Simple, string name of the filter for the flux being calculated.
- **kwargs
Any additional keyword arguments that may be passed to the plugin.
- diaObject
- fail(diaObject, columns, error=None)¶
Set diaObject position values to nan.
- Parameters:
- diaObject
dict
Summary object to store values in.
- columns
list
ofstr
List of string names of columns to write a the failed value.
- error
BaseException
orNone
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
getExecutionOrder
are compared across all plugins, and smaller numbers run first.Notes
CatalogCalculationPlugin
s must run withBasePlugin.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.