|
lsst.ip.diffim g186a439d31+e5f61d2410
|
Public Member Functions | |
| getExecutionOrder (cls) | |
| __init__ (self, config, name, schema, metadata, logName=None) | |
| measureDipoles (self, measRecord, exposure, posExp=None, negExp=None) | |
| doClassify (self, measRecord, chi2val) | |
| fail (self, measRecord, error=None) | |
Public Attributes | |
| log = logging.getLogger(logName) | |
| posFluxKey | |
| negFluxKey | |
| fluxKey = measBase.FluxResultKey.addFields(schema, name, doc) | |
| posCentroidKey | |
| negCentroidKey | |
| centroidKey | |
| orientationKey | |
| separationKey | |
| chi2dofKey | |
| nDataKey | |
| signalToNoiseKey | |
| classificationFlagKey | |
| classificationAttemptedFlagKey | |
| flagKey | |
| edgeFlagKey | |
Static Public Attributes | |
| ConfigClass = DipoleFitPluginConfig | |
| DipoleFitAlgorithmClass = DipoleFitAlgorithm | |
| int | FAILURE_EDGE = 1 |
| int | FAILURE_FIT = 2 |
| int | FAILURE_NOT_DIPOLE = 4 |
| int | FAILURE_TOO_LARGE = 8 |
Protected Member Functions | |
| _setupSchema (self, config, name, schema, metadata) | |
A single frame measurement plugin that fits dipoles to all merged (two-peak) ``diaSources``. This measurement plugin accepts up to three input images in its `measure` method. If these are provided, it includes data from the pre-subtraction posImage (science image) and optionally negImage (template image) to constrain the fit. The meat of the fitting routines are in the class `~lsst.module.name.DipoleFitAlgorithm`. Notes ----- The motivation behind this plugin and the necessity for including more than one exposure are documented in DMTN-007 (http://dmtn-007.lsst.io). This class is named `ip_diffim_DipoleFit` so that it may be used alongside the existing `ip_diffim_DipoleMeasurement` classes until such a time as those are deemed to be replaceable by this.
Definition at line 1005 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.__init__ | ( | self, | |
| config, | |||
| name, | |||
| schema, | |||
| metadata, | |||
| logName = None ) |
Definition at line 1039 of file dipoleFitTask.py.
|
protected |
Add fields for the outputs, and save the keys for fast assignment.
Definition at line 1048 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.doClassify | ( | self, | |
| measRecord, | |||
| chi2val ) |
Classify a source as a dipole.
Parameters
----------
measRecord : TODO: DM-17458
TODO: DM-17458
chi2val : TODO: DM-17458
TODO: DM-17458
Notes
-----
Sources are classified as dipoles, or not, according to three criteria:
1. Does the total signal-to-noise surpass the ``minSn``?
2. Are the pos/neg fluxes greater than 1.0 and no more than 0.65 (``maxFluxRatio``)
of the total flux? By default this will never happen since ``posFlux == negFlux``.
3. Is it a good fit (``chi2dof`` < 1)? (Currently not used.)
Definition at line 1204 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.fail | ( | self, | |
| measRecord, | |||
| error = None ) |
Catch failures and set the correct flags. Fallback on the current slot centroid positions, but set the dipole failure flag, since we attempted to fit the source.
Definition at line 1256 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.getExecutionOrder | ( | cls | ) |
This algorithm simultaneously fits the centroid and flux, and does not require any previous centroid fit.
Definition at line 1033 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.measureDipoles | ( | self, | |
| measRecord, | |||
| exposure, | |||
| posExp = None, | |||
| negExp = None ) |
Perform the non-linear least squares minimization on the putative dipole source.
Parameters
----------
measRecord : `lsst.afw.table.SourceRecord`
diaSources that will be measured using dipole measurement
exposure : `lsst.afw.image.Exposure`
Difference exposure on which the diaSources were detected; `exposure = posExp-negExp`
If both `posExp` and `negExp` are `None`, will attempt to fit the
dipole to just the `exposure` with no constraint.
posExp : `lsst.afw.image.Exposure`, optional
"Positive" exposure, typically a science exposure, or None if unavailable
When `posExp` is `None`, will compute `posImage = exposure + negExp`.
negExp : `lsst.afw.image.Exposure`, optional
"Negative" exposure, typically a template exposure, or None if unavailable
When `negExp` is `None`, will compute `negImage = posExp - exposure`.
Notes
-----
The main functionality of this routine was placed outside of
this plugin (into `DipoleFitAlgorithm.fitDipole()`) so that
`DipoleFitAlgorithm.fitDipole()` can be called separately for
testing (@see `tests/testDipoleFitter.py`)
Definition at line 1109 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.centroidKey |
Definition at line 1068 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.chi2dofKey |
Definition at line 1081 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.classificationAttemptedFlagKey |
Definition at line 1097 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.classificationFlagKey |
Definition at line 1093 of file dipoleFitTask.py.
|
static |
Definition at line 1024 of file dipoleFitTask.py.
|
static |
Definition at line 1025 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.edgeFlagKey |
Definition at line 1105 of file dipoleFitTask.py.
|
static |
Definition at line 1027 of file dipoleFitTask.py.
|
static |
Definition at line 1028 of file dipoleFitTask.py.
|
static |
Definition at line 1029 of file dipoleFitTask.py.
|
static |
Definition at line 1030 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.flagKey |
Definition at line 1101 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.fluxKey = measBase.FluxResultKey.addFields(schema, name, doc) |
Definition at line 1058 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.log = logging.getLogger(logName) |
Definition at line 1044 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.nDataKey |
Definition at line 1085 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.negCentroidKey |
Definition at line 1064 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.negFluxKey |
Definition at line 1054 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.orientationKey |
Definition at line 1073 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.posCentroidKey |
Definition at line 1060 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.posFluxKey |
Definition at line 1051 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.separationKey |
Definition at line 1077 of file dipoleFitTask.py.
| lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.signalToNoiseKey |
Definition at line 1089 of file dipoleFitTask.py.