LSST Applications g063fba187b+cac8b7c890,g0f08755f38+6aee506743,g1653933729+a8ce1bb630,g168dd56ebc+a8ce1bb630,g1a2382251a+b4475c5878,g1dcb35cd9c+8f9bc1652e,g20f6ffc8e0+6aee506743,g217e2c1bcf+73dee94bd0,g28da252d5a+1f19c529b9,g2bbee38e9b+3f2625acfc,g2bc492864f+3f2625acfc,g3156d2b45e+6e55a43351,g32e5bea42b+1bb94961c2,g347aa1857d+3f2625acfc,g35bb328faa+a8ce1bb630,g3a166c0a6a+3f2625acfc,g3e281a1b8c+c5dd892a6c,g3e8969e208+a8ce1bb630,g414038480c+5927e1bc1e,g41af890bb2+8a9e676b2a,g7af13505b9+809c143d88,g80478fca09+6ef8b1810f,g82479be7b0+f568feb641,g858d7b2824+6aee506743,g89c8672015+f4add4ffd5,g9125e01d80+a8ce1bb630,ga5288a1d22+2903d499ea,gb58c049af0+d64f4d3760,gc28159a63d+3f2625acfc,gcab2d0539d+b12535109e,gcf0d15dbbd+46a3f46ba9,gda6a2b7d83+46a3f46ba9,gdaeeff99f8+1711a396fd,ge79ae78c31+3f2625acfc,gef2f8181fd+0a71e47438,gf0baf85859+c1f95f4921,gfa517265be+6aee506743,gfa999e8aa5+17cd334064,w.2024.51
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lsst::ip::diffim::MinimizeDipoleChi2 Class Reference

Class to minimize PsfDipoleFlux; this is the object that Minuit minimizes. More...

Inheritance diagram for lsst::ip::diffim::MinimizeDipoleChi2:

Public Member Functions

 MinimizeDipoleChi2 (PsfDipoleFlux const &psfDipoleFlux, afw::table::SourceRecord &source, afw::image::Exposure< float > const &exposure)
 
double Up () const
 
void setErrorDef (double def)
 
int getNpar () const
 
int getMaxPix () const
 
void setMaxPix (int maxPix)
 
virtual double operator() (std::vector< double > const &params) const
 

Detailed Description

Class to minimize PsfDipoleFlux; this is the object that Minuit minimizes.

Definition at line 92 of file DipoleAlgorithms.cc.

Constructor & Destructor Documentation

◆ MinimizeDipoleChi2()

lsst::ip::diffim::MinimizeDipoleChi2::MinimizeDipoleChi2 ( PsfDipoleFlux const & psfDipoleFlux,
afw::table::SourceRecord & source,
afw::image::Exposure< float > const & exposure )
inlineexplicit

Definition at line 94 of file DipoleAlgorithms.cc.

97 : _errorDef(1.0),
98 _nPar(6),
99 _maxPix(1e4),
100 _bigChi2(1e10),
101 _psfDipoleFlux(psfDipoleFlux),
102 _source(source),
103 _exposure(exposure)
104 {}

Member Function Documentation

◆ getMaxPix()

int lsst::ip::diffim::MinimizeDipoleChi2::getMaxPix ( ) const
inline

Definition at line 108 of file DipoleAlgorithms.cc.

108{ return _maxPix; }

◆ getNpar()

int lsst::ip::diffim::MinimizeDipoleChi2::getNpar ( ) const
inline

Definition at line 107 of file DipoleAlgorithms.cc.

107{ return _nPar; }

◆ operator()()

virtual double lsst::ip::diffim::MinimizeDipoleChi2::operator() ( std::vector< double > const & params) const
inlinevirtual

Definition at line 112 of file DipoleAlgorithms.cc.

112 {
113 double negCenterX = params[NEGCENTXPAR];
114 double negCenterY = params[NEGCENTYPAR];
115 double negFlux = params[NEGFLUXPAR];
116 double posCenterX = params[POSCENTXPAR];
117 double posCenterY = params[POSCENTYPAR];
118 double posFlux = params[POSFLUXPAR];
119
120 /* Restrict negative dipole to be negative; positive to be positive */
121 if ((negFlux > 0.0) || (posFlux < 0.0)) {
122 return _bigChi2;
123 }
124
125 std::pair<double,int> fit = _psfDipoleFlux.chi2(_source, _exposure, negCenterX, negCenterY, negFlux,
126 posCenterX, posCenterY, posFlux);
127 double chi2 = fit.first;
128 int nPix = fit.second;
129 if (nPix > _maxPix) {
130 return _bigChi2;
131 }
132
133 return chi2;
134 }
std::pair< double, int > chi2(afw::table::SourceRecord &source, afw::image::Exposure< float > const &exposure, double negCenterX, double negCenterY, double negFlux, double posCenterX, double poCenterY, double posFlux) const
Definition __init__.py:1
int const NEGFLUXPAR(2)
int const NEGCENTXPAR(0)
int const NEGCENTYPAR(1)
int const POSFLUXPAR(5)
int const POSCENTXPAR(3)
int const POSCENTYPAR(4)

◆ setErrorDef()

void lsst::ip::diffim::MinimizeDipoleChi2::setErrorDef ( double def)
inline

Definition at line 106 of file DipoleAlgorithms.cc.

106{ _errorDef = def; }

◆ setMaxPix()

void lsst::ip::diffim::MinimizeDipoleChi2::setMaxPix ( int maxPix)
inline

Definition at line 109 of file DipoleAlgorithms.cc.

109{ _maxPix = maxPix; }

◆ Up()

double lsst::ip::diffim::MinimizeDipoleChi2::Up ( ) const
inline

Definition at line 105 of file DipoleAlgorithms.cc.

105{ return _errorDef; }

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