lsst.ip.diffim g9c4eec70e9+fd16635e23
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin Class Reference
Inheritance diagram for lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin:

Public Member Functions

 getExecutionOrder (cls)
 
 __init__ (self, config, name, schema, metadata, logName=None)
 
 measure (self, measRecord, exposure, posExp=None, negExp=None)
 
 doClassify (self, measRecord, chi2val)
 
 fail (self, measRecord, error=None)
 

Public Attributes

 log
 
 centroidKey
 
 fluxKey
 
 orientationKey
 
 separationKey
 
 chi2dofKey
 
 nDataKey
 
 signalToNoiseKey
 
 classificationFlagKey
 
 classificationAttemptedFlagKey
 
 flagKey
 
 edgeFlagKey
 
 FAILURE_NOT_DIPOLE
 
 FAILURE_EDGE
 
 FAILURE_FIT
 

Static Public Attributes

 ConfigClass = DipoleFitPluginConfig
 
 DipoleFitAlgorithmClass = DipoleFitAlgorithm
 
int FAILURE_EDGE = 1
 
int FAILURE_FIT = 2
 
int FAILURE_NOT_DIPOLE = 4
 

Protected Member Functions

 _setupSchema (self, config, name, schema, metadata)
 

Detailed Description

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 962 of file dipoleFitTask.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.__init__ ( self,
config,
name,
schema,
metadata,
logName = None )

Definition at line 997 of file dipoleFitTask.py.

Member Function Documentation

◆ _setupSchema()

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin._setupSchema ( self,
config,
name,
schema,
metadata )
protected

Definition at line 1006 of file dipoleFitTask.py.

◆ doClassify()

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 1183 of file dipoleFitTask.py.

◆ fail()

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.fail ( self,
measRecord,
error = None )
Catch failures and set the correct flags.

Definition at line 1235 of file dipoleFitTask.py.

◆ getExecutionOrder()

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.getExecutionOrder ( cls)
Set execution order to `FLUX_ORDER`.

This includes algorithms that require both `getShape()` and `getCentroid()`,
in addition to a Footprint and its Peaks.

Definition at line 989 of file dipoleFitTask.py.

◆ measure()

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.measure ( 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`)

Returns
-------
result : TODO: DM-17458
    TODO: DM-17458

Definition at line 1078 of file dipoleFitTask.py.

Member Data Documentation

◆ centroidKey

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.centroidKey

Definition at line 1008 of file dipoleFitTask.py.

◆ chi2dofKey

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.chi2dofKey

Definition at line 1050 of file dipoleFitTask.py.

◆ classificationAttemptedFlagKey

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.classificationAttemptedFlagKey

Definition at line 1066 of file dipoleFitTask.py.

◆ classificationFlagKey

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.classificationFlagKey

Definition at line 1062 of file dipoleFitTask.py.

◆ ConfigClass

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.ConfigClass = DipoleFitPluginConfig
static

Definition at line 981 of file dipoleFitTask.py.

◆ DipoleFitAlgorithmClass

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.DipoleFitAlgorithmClass = DipoleFitAlgorithm
static

Definition at line 982 of file dipoleFitTask.py.

◆ edgeFlagKey

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.edgeFlagKey

Definition at line 1074 of file dipoleFitTask.py.

◆ FAILURE_EDGE [1/2]

int lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.FAILURE_EDGE = 1
static

Definition at line 984 of file dipoleFitTask.py.

◆ FAILURE_EDGE [2/2]

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.FAILURE_EDGE

Definition at line 1138 of file dipoleFitTask.py.

◆ FAILURE_FIT [1/2]

int lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.FAILURE_FIT = 2
static

Definition at line 985 of file dipoleFitTask.py.

◆ FAILURE_FIT [2/2]

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.FAILURE_FIT

Definition at line 1141 of file dipoleFitTask.py.

◆ FAILURE_NOT_DIPOLE [1/2]

int lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.FAILURE_NOT_DIPOLE = 4
static

Definition at line 986 of file dipoleFitTask.py.

◆ FAILURE_NOT_DIPOLE [2/2]

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.FAILURE_NOT_DIPOLE

Definition at line 1124 of file dipoleFitTask.py.

◆ flagKey

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.flagKey

Definition at line 1070 of file dipoleFitTask.py.

◆ fluxKey

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.fluxKey

Definition at line 1038 of file dipoleFitTask.py.

◆ log

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.log

Definition at line 1002 of file dipoleFitTask.py.

◆ nDataKey

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.nDataKey

Definition at line 1054 of file dipoleFitTask.py.

◆ orientationKey

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.orientationKey

Definition at line 1042 of file dipoleFitTask.py.

◆ separationKey

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.separationKey

Definition at line 1046 of file dipoleFitTask.py.

◆ signalToNoiseKey

lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin.signalToNoiseKey

Definition at line 1058 of file dipoleFitTask.py.


The documentation for this class was generated from the following file: