25 #ifndef LSST_JOINTCAL_BASE_STAR_H 26 #define LSST_JOINTCAL_BASE_STAR_H 41 double magFromFlux(
double instFlux) {
return -2.5 *
std::log10(instFlux); }
44 double magErrFromFluxErr(
double instFlux,
double instFluxErr) {
45 return 2.5 /
std::log(10) * (instFluxErr / instFlux);
58 BaseStar(
double xx,
double yy,
double flux,
double fluxErr)
62 _mag(magFromFlux(flux)),
63 _magErr(magErrFromFluxErr(flux, fluxErr)){};
64 BaseStar(
Point const &point,
double flux,
double fluxErr,
double mag,
double magErr)
68 _mag(magFromFlux(flux)),
69 _magErr(magErrFromFluxErr(flux, fluxErr)){};
72 double getX()
const {
return x; }
74 double getY()
const {
return y; }
83 stream <<
"x: " <<
x <<
" y: " <<
y <<
" flux: " <<
_flux <<
" fluxErr: " <<
_fluxErr;
92 static const char *
typeName() {
return "BaseStar"; }
126 #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