SimpleSourceFlagDiaPlugin¶
- class lsst.meas.base.SimpleSourceFlagDiaPlugin(config, name, metadata)¶
- Bases: - DiaObjectCalculationPlugin- Find if any DiaSource is flagged. - Set the DiaObject flag if any DiaSource is flagged. - 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, **kwargs)- Find if any DiaSource is flagged. - 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 - getCentroidand- getShapewill 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 - getCentroidand- getShapewill 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 = []¶
- 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 - psfFluxMeaninstead of- u_psfFluxMean.
 - 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 = ['flags']¶
- 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 - psfFluxMeaninstead 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- failmethod 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, diaSources, **kwargs)¶
- Find if any DiaSource is flagged. - Set the DiaObject flag if any DiaSource is flagged. - Parameters:
- diaObjectdict
- Summary object to store values in and read ra/dec from. 
- **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:
- diaObjectdict
- Summary object to store values in. 
- columnslistofstr
- List of string names of columns to write a the failed value. 
- errorBaseExceptionorNone
- 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 with- BasePlugin.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.