DipoleFitPlugin¶
- 
class lsst.ip.diffim.DipoleFitPlugin(config, name, schema, metadata)¶
- Bases: - lsst.meas.base.sfm.SingleFramePlugin- !Subclass of SingleFramePlugin which fits dipoles to all merged (two-peak) diaSources - Accepts up to three input images in its - measuremethod. 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 DipoleFitAlgorithm.- 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_DipoleFitso that it may be used alongside the existing- ip_diffim_DipoleMeasurementclasses until such a time as those are deemed to be replaceable by this.- Attributes Summary - FAILURE_EDGE- FAILURE_FIT- FAILURE_NOT_DIPOLE- Methods Summary - doClassify(measRecord, chi2val)- !Determine if source is classified as dipole via three criteria: - does the total signal-to-noise surpass the minSn? - are the pos/neg fluxes greater than 1.0 and no more than 0.65 (param - maxFluxRatio) of the total flux? By default this will never happen since- posFlux == negFlux.- fail(measRecord[, error])- !Catch failures and set the correct flags. - getExecutionOrder()- !Set execution order to - FLUX_ORDER.- measure(measRecord, exposure[, posExp, negExp])- !Perform the non-linear least squares minimization on the putative dipole source. - Attributes Documentation - 
FAILURE_EDGE= 1¶
 - 
FAILURE_FIT= 2¶
 - 
FAILURE_NOT_DIPOLE= 4¶
 - Methods Documentation - 
doClassify(measRecord, chi2val)¶
- !Determine if source is classified as dipole via three criteria: - does the total signal-to-noise surpass the minSn? - are the pos/neg fluxes greater than 1.0 and no more than 0.65 (param - maxFluxRatio)of the total flux? By default this will never happen since- posFlux == negFlux.- is it a good fit (chi2dof< 1)? (Currently not used.)
 
- is it a good fit (
 - 
fail(measRecord, error=None)¶
- !Catch failures and set the correct flags. 
 - 
classmethod getExecutionOrder()¶
- !Set execution order to - FLUX_ORDER.- This includes algorithms that require both - getShape()and- getCentroid(), in addition to a Footprint and its Peaks.
 - 
measure(measRecord, exposure, posExp=None, negExp=None)¶
- !Perform the non-linear least squares minimization on the putative dipole source. - @param measRecord diaSources that will be measured using dipole measurement @param exposure Difference exposure on which the diaSources were detected; - exposure = posExp-negExp@param posExp “Positive” exposure, typically a science exposure, or None if unavailable @param negExp “Negative” exposure, typically a template exposure, or None if unavailable- @note When - posExpis- None, will compute- posImage = exposure + negExp. Likewise, when- negExpis- None, will compute- negImage = posExp - exposure. If both- posExpand- negExpare- None, will attempt to fit the dipole to just the- exposurewith no constraint.- 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)
 
-