42 #define G_READ "GLATPsf::read(GFits&)"
43 #define G_WRITE "GLATPsf::write(GFits&)"
90 load(filename, evtype);
178 const double& ctheta)
181 double psf = (
m_psf != NULL) ?
m_psf->
psf(offset, logE, ctheta) : 0.0;
234 GFits fits(filename);
261 fits.
saveto(filename, clobber);
293 std::string rpsf =
"RPSF";
294 std::string scaling =
"PSF_SCALING_PARAMS";
315 if (detnam ==
"FRONT") {
318 else if (detnam ==
"BACK") {
335 std::string msg =
"Unsupported response function version "+
337 "version 1 or 3 point spread function.";
510 result.append(
"=== GLATPsf ===");
515 result.append(
"No PSF loaded");
525 result.append(
"sqrt(");
569 if (psf.
m_psf != NULL) {
double operator()(const double &offset, const double &logE, const double &ctheta)
Return point spread function value.
void read_scale(const GFitsTable &hdu)
Read PSF scale factors from FITS table.
GFitsTable * table(const int &extno)
Get pointer to table HDU.
bool contains(const int &extno) const
Check if HDU exists in FITS file.
bool has_card(const int &cardno) const
Check existence of header card.
virtual GLATPsfBase * clone(void) const =0
Clones object.
virtual double psf(const double &offset, const double &logE, const double &ctheta)=0
void clear(void)
Clear instance.
GLATPsf * clone(void) const
Clone instance.
Fermi/LAT point spread function version 1 class definition.
const double & scale_index(void) const
Return scaling index.
Fermi/LAT point spread function version 1 class.
void read(const GFits &file, const std::string &evtype)
Read point spread function from FITS file.
const double & costhetamin(void) const
Return cosine theta minimum.
virtual void write(GFits &file) const =0
void save(const GFilename &filename, const bool &clobber=false)
Save point spread function into FITS file.
void copy_members(const GLATPsf &psf)
Copy class members.
const double & scale_par1(void) const
Return first scaling parameter.
int ncostheta(void) const
Return number of cosine theta bins in point spread function.
FITS table float column class interface definition.
FITS file class interface definition.
std::string strip_whitespace(const std::string &arg)
Strip leading and trailing whitespace from string.
const std::string & evtype(void) const
Return event type.
int nenergies(void) const
Returns number of energy bins in PSF.
void saveto(const GFilename &filename, const bool &clobber=false)
Saves to specified FITS file.
void write_scale(GFits &file) const
Write PSF scale factors.
Fermi/LAT point spread function version 3 class definition.
Interface for the Fermi LAT point spread function.
int version(void) const
Returns PSF version.
double costhetamin(void) const
Returns minimum cos(theta) angle.
Abstract interface for FITS table.
virtual ~GLATPsf(void)
Destructor.
int size(void) const
Returns size of PSF.
int integer(const std::string &keyname) const
Return card value as integer.
Fermi LAT point spread function class definition.
void write(GFits &file) const
Write point spread function into FITS file.
GLATPsfBase * m_psf
Pointer to versioned point spread function.
std::string m_evtype
Event type.
GLATPsf(void)
Void constructor.
virtual int version(void) const =0
virtual void read(const GFitsTable &table)=0
int nenergies(void) const
Return number of energies in point spread function.
void load(const GFilename &filename, const std::string &evtype)
Load point spread function from FITS file.
std::string string(const std::string &keyname) const
Return card value as string.
Exception handler interface definition.
std::string toupper(const std::string &s)
Convert string to upper case.
FITS binary table class definition.
const double & scale_par2(void) const
Return second scaling parameter.
int ncostheta(void) const
Returns number of cos(theta) bins in PSF.
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
void init_members(void)
Initialise class members.
const bool & front(void) const
Signal that point spread function is for front section.
Filename class interface definition.
GLATPsf & operator=(const GLATPsf &psf)
Assignment operator.
Fermi/LAT point spread function version 3 class.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.
std::string print(const GChatter &chatter=NORMAL) const
Print point spread function information.
void free_members(void)
Delete class members.