LSST Applications g0f08755f38+9c285cab97,g1635faa6d4+13f3999e92,g1653933729+a8ce1bb630,g1a0ca8cf93+bf6eb00ceb,g28da252d5a+0829b12dee,g29321ee8c0+5700dc9eac,g2bbee38e9b+9634bc57db,g2bc492864f+9634bc57db,g2cdde0e794+c2c89b37c4,g3156d2b45e+41e33cbcdc,g347aa1857d+9634bc57db,g35bb328faa+a8ce1bb630,g3a166c0a6a+9634bc57db,g3e281a1b8c+9f2c4e2fc3,g414038480c+077ccc18e7,g41af890bb2+fde0dd39b6,g5fbc88fb19+17cd334064,g781aacb6e4+a8ce1bb630,g80478fca09+55a9465950,g82479be7b0+d730eedb7d,g858d7b2824+9c285cab97,g9125e01d80+a8ce1bb630,g9726552aa6+10f999ec6a,ga5288a1d22+2a84bb7594,gacf8899fa4+c69c5206e8,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gc28159a63d+9634bc57db,gcf0d15dbbd+4b7d09cae4,gda3e153d99+9c285cab97,gda6a2b7d83+4b7d09cae4,gdaeeff99f8+1711a396fd,ge2409df99d+5e831397f4,ge79ae78c31+9634bc57db,gf0baf85859+147a0692ba,gf3967379c6+41c94011de,gf3fb38a9a8+8f07a9901b,gfb92a5be7c+9c285cab97,w.2024.46
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 295 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 297 of file DipoleAlgorithms.cc.

300 : _errorDef(1.0),
301 _nPar(6),
302 _maxPix(1e4),
303 _bigChi2(1e10),
304 _psfDipoleFlux(psfDipoleFlux),
305 _source(source),
306 _exposure(exposure)
307 {}

Member Function Documentation

◆ getMaxPix()

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

Definition at line 311 of file DipoleAlgorithms.cc.

311{ return _maxPix; }

◆ getNpar()

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

Definition at line 310 of file DipoleAlgorithms.cc.

310{ return _nPar; }

◆ operator()()

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

Definition at line 315 of file DipoleAlgorithms.cc.

315 {
316 double negCenterX = params[NEGCENTXPAR];
317 double negCenterY = params[NEGCENTYPAR];
318 double negFlux = params[NEGFLUXPAR];
319 double posCenterX = params[POSCENTXPAR];
320 double posCenterY = params[POSCENTYPAR];
321 double posFlux = params[POSFLUXPAR];
322
323 /* Restrict negative dipole to be negative; positive to be positive */
324 if ((negFlux > 0.0) || (posFlux < 0.0)) {
325 return _bigChi2;
326 }
327
328 std::pair<double,int> fit = _psfDipoleFlux.chi2(_source, _exposure, negCenterX, negCenterY, negFlux,
329 posCenterX, posCenterY, posFlux);
330 double chi2 = fit.first;
331 int nPix = fit.second;
332 if (nPix > _maxPix) {
333 return _bigChi2;
334 }
335
336 return chi2;
337 }
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 309 of file DipoleAlgorithms.cc.

309{ _errorDef = def; }

◆ setMaxPix()

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

Definition at line 312 of file DipoleAlgorithms.cc.

312{ _maxPix = maxPix; }

◆ Up()

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

Definition at line 308 of file DipoleAlgorithms.cc.

308{ return _errorDef; }

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