2 #ifndef LSST_JOINTCAL_BASE_STAR_H 3 #define LSST_JOINTCAL_BASE_STAR_H 18 double magFromFlux(
double instFlux) {
return -2.5 *
std::log10(instFlux); }
21 double magErrFromFluxErr(
double instFlux,
double instFluxErr) {
22 return 2.5 /
std::log(10) * (instFluxErr / instFlux);
35 BaseStar(
double xx,
double yy,
double flux,
double fluxErr)
39 _mag(magFromFlux(flux)),
40 _magErr(magErrFromFluxErr(flux, fluxErr)){};
41 BaseStar(
Point const &point,
double flux,
double fluxErr,
double mag,
double magErr)
45 _mag(magFromFlux(flux)),
46 _magErr(magErrFromFluxErr(flux, fluxErr)){};
49 double getX()
const {
return x; }
51 double getY()
const {
return y; }
60 stream <<
"x: " <<
x <<
" y: " <<
y <<
" flux: " <<
_flux <<
" fluxErr: " <<
_fluxErr;
69 static const char *
typeName() {
return "BaseStar"; }
103 #endif // LSST_JOINTCAL_BASE_STAR_H BaseStarList::const_iterator BaseStarCIterator
double getX() const
access stuff.
virtual void dump(std::ostream &stream=std::cout) const
utility
StarList< BaseStar > BaseStarList
BaseStarList::iterator BaseStarIterator
double getFluxErr() const
A Point with uncertainties.
The base class for handling stars. Used by all matching routines.
Class for a simple mapping implementing a generic Gtransfo.
BaseStar & operator=(Point const &point)
static const char * typeName()
void setFluxErr(double fluxErr)
void setFlux(double flux)
BaseStar(Point const &point, double flux, double fluxErr, double mag, double magErr)
friend std::ostream & operator<<(std::ostream &stream, BaseStar const &s)
allows std::cout << aBaseStar;
void setMagErr(double magErr)
BaseStar(double xx, double yy, double flux, double fluxErr)
constructor