LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
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  {}
const char * source()
Source function that allows astChannel to source from a Stream.
Definition: Stream.h:224

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
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: