63#define G_READ_DS_ROI "gammalib::read_ds_roi(GFitsHDU&)"
64#define G_READ_DS_EBOUNDS "gammalib::read_ds_ebounds(GFitsHDU&)"
65#define G_READ_DS_PHASE "gammalib::read_ds_phase(GFitsHDU&)"
66#define G_READ_DS_GTI "gammalib::read_ds_gti_extname(GFitsHDU&)"
67#define G_CTA_MODEL_NROI "gammalib::cta_model_nroi(GObservation*, "\
68 "GModelData*, GEnergy&, GTime&)"
102 for (
int i = 1; i <= ndskeys; ++i) {
110 if (hdu.
has_card(type_key) && hdu.
string(type_key) ==
"POS(RA,DEC)") {
114 std::string value = hdu.
string(value_key);
118 if (args.size() == 3) {
131 double ra_pnt = hdu.
real(
"RA_PNT");
132 double dec_pnt = hdu.
real(
"DEC_PNT");
150 std::string msg =
"Invalid acceptance cone value \""+value+
151 "\" encountered in data sub-space "
152 "key \""+value_key+
"\".";
190 for (
int i = 1; i <= ndskeys; ++i) {
201 std::string value = hdu.
string(value_key);
202 std::string unit = hdu.
string(unit_key);
204 if (values.size() == 2) {
209 ebounds.
append(e_min, e_max);
212 std::string msg =
"Invalid energy value \""+value+
213 "\" encountered in data selection key \""+
252 for (
int i = 1; i <= ndskeys; ++i) {
263 std::string value = hdu.
string(value_key);
265 for (
int j = 0; j < intervals.size(); ++j) {
267 if (values.size() == 2) {
270 phases.
append(phmin, phmax);
273 std::string msg =
"Invalid phase value \""+value+
274 "\" encountered in data selection key \""+
318 for (
int i = 1; i <= ndskeys; ++i) {
334 std::string msg =
"Keyword \""+value_key+
"\" missing for data "
335 "sub-space selection of type "+type_key+
336 "=\"TIME\". Please correct FITS header.";
339 if (hdu.
string(value_key) !=
"TABLE") {
340 std::string msg =
"Cannot interpret keyword \""+value_key+
"\" "
341 "value \""+hdu.
string(value_key)+
"\". Only "
342 "the value \"TABLE\" is supported.";
348 std::string msg =
"Keyword \""+ref_key+
"\" missing for data "
349 "sub-space selection of type "+type_key+
350 "=\"TIME\". Please correct FITS header.";
375 const std::string& hduclas4)
381 for (
int i = 0; i < fits.
size(); ++i) {
433 const double& resolution,
444 if (iter < iter_min) {
447 else if (iter > iter_max) {
479 const double& resolution,
490 if (iter < iter_min) {
493 else if (iter > iter_max) {
524 std::string cls = std::string(
typeid(&obs).name());
525 std::string msg =
"Invalid observation type \""+cls+
"\" provided with "
526 "name \""+obs.
name()+
"\" (ID="+obs.
id()+
"). "
527 "Please specify a \"GCTAObservation\" instance as "
577 std::string cls = std::string(
typeid(&rsp).name());
578 std::string msg =
"Invalid response type \""+cls+
"\" provided. Please "
579 "specify a \"GCTAResponse\" as argument.";
611 std::string cls = std::string(
typeid(cta.
response()).name());
612 std::string msg =
"Invalid response type \""+cls+
"\" provided in "
613 "CTA observation \""+obs.
name()+
"\" (ID="+obs.
id()+
"). "
614 "Please specify a CTA observation containing an IRF "
615 "response as argument.";
647 std::string cls = std::string(
typeid(cta.
response()).name());
648 std::string msg =
"Invalid response type \""+cls+
"\" provided. Please "
649 "specify a CTA observation containing a response cube "
681 std::string msg =
"Specified observation does not contain a valid "
682 "effective area response. Please specify a CTA "
683 "observation containing an effective area response.";
713 std::string msg =
"Specified observation does not contain a valid "
714 "background response. Please specify a CTA "
715 "observation containing a background response.";
746 if (events == NULL) {
747 std::string msg =
"Specified observation does not contain a CTA event "
748 "list. Please specify a CTA observation containing "
749 "a CTA event list as argument.";
780 if (events == NULL) {
781 std::string msg =
"Specified observation does not contain a CTA event "
782 "cube. Please specify a CTA observation containing "
783 "a CTA event cube as argument.";
812 std::string cls = std::string(
typeid(&event).name());
813 std::string msg =
"Invalid event type \""+cls+
"\" provided. Please "
814 "specify a \"GCTAEventAtom\" or \"GCTAEventBin\" "
815 "instance as argument.";
850 else if (aeff != NULL) {
853 else if (irf != NULL) {
856 else if (cube != NULL) {
859 else if (rad != NULL) {
894 else if (aeff != NULL) {
897 else if (irf != NULL) {
900 else if (cube != NULL) {
903 else if (rad != NULL) {
CTA effective area base class definition.
CTA background model base class definition.
CTA event bin container class interface definition.
CTA event list class interface definition.
CTA instrument direction class interface definition.
CTA Aeff background model class definition.
Background model class interface definition.
CTA cube background model class interface definition.
CTA IRF background model class definition.
Radial acceptance model class interface definition.
CTA observation class interface definition.
CTA pointing class interface definition.
CTA cube-style response function class definition.
CTA instrument response function class definition.
CTA response abstract base class definition.
CTA region of interest class interface definition.
#define G_READ_DS_EBOUNDS
Definition of support function used by CTA classes.
Energy boundaries class interface definition.
Abstract FITS extension base class definition.
Mathematical function definitions.
Abstract data model base class interface definition.
Abstract spectral model base class interface definition.
Abstract temporal model base class interface definition.
Phase intervals class interface definition.
Abstract response base class definition.
Abstract base class for the CTA effective area.
Abstract base class for the CTA background model.
CTA event bin container class.
CTA instrument direction class.
GModelTemporal * temporal(void) const
Return temporal model component.
GModelSpectral * spectral(void) const
Return spectral model component.
GModelSpectral * spectral(void) const
Return spectral model component.
GModelTemporal * temporal(void) const
Return temporal model component.
CTA cube background model class.
GModelSpectral * spectral(void) const
Return spectral model component.
GModelTemporal * temporal(void) const
Return temporal model component.
CTA IRF background model class.
GModelTemporal * temporal(void) const
Return temporal model component.
GModelSpectral * spectral(void) const
Return spectral model component.
Radial acceptance model class.
GModelSpectral * spectral(void) const
Return spectral model component.
GModelTemporal * temporal(void) const
Return temporal model component.
void pointing(const GCTAPointing &pointing)
Set CTA pointing.
virtual void response(const GResponse &rsp)
Set response function.
GCTAInstDir instdir(const GSkyDir &skydir) const
Get instrument direction from sky direction.
CTA cube-style response function class.
CTA instrument response function class.
const GCTAAeff * aeff(void) const
Return pointer to effective area response.
const GCTABackground * background(void) const
Return pointer to background model.
CTA instrument response function class.
Interface for the CTA region of interest class.
const double & radius(void) const
Returns radius of region of interest in degrees.
const GCTAInstDir & centre(void) const
Returns region of interest centre.
Energy boundaries container class.
void append(const GEnergy &emin, const GEnergy &emax)
Append energy interval.
Class that handles energies in a unit independent way.
Abstract interface for the event classes.
Abstract FITS extension base class.
bool has_card(const int &cardno) const
Check existence of header card.
const std::string & extname(void) const
Return extension name.
double real(const std::string &keyname) const
Return card value as double precision.
std::string string(const std::string &keyname) const
Return card value as string.
int integer(const std::string &keyname) const
Return card value as integer.
int size(void) const
Return number of HDUs in FITS file.
Abstract data model class.
Abstract spectral model base class.
Abstract temporal model base class.
Abstract observation base class.
virtual GEvents * events(void)
Return events.
void name(const std::string &name)
Set observation name.
void id(const std::string &id)
Set observation identifier.
void append(const double &pmin, const double &pmax)
Append phase interval.
Abstract instrument response base class.
void radec_deg(const double &ra, const double &dec)
Set equatorial sky direction (degrees)
const GCTAObservation & cta_obs(const std::string &origin, const GObservation &obs)
Retrieve CTA observation from generic observation.
std::string read_ds_gti_extname(const GFitsHDU &hdu)
Return Good Time Intervals extension name from data sub-space keywords.
const GCTAPointing & cta_pnt(const std::string &origin, const GObservation &obs)
Retrieve CTA pointing from generic observation.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.
double todouble(const std::string &arg)
Convert string into double precision value.
const GCTAInstDir & cta_dir(const std::string &origin, const GEvent &event)
Retrieve CTA instrument direction from generic event.
const GCTABackground & cta_rsp_bkg(const std::string &origin, const GObservation &obs)
Retrieve CTA background response from generic observation.
GCTARoi read_ds_roi(const GFitsHDU &hdu)
Extract ROI from data sub-space keywords.
std::string strip_whitespace(const std::string &arg)
Strip leading and trailing whitespace from string.
const GCTAEventList & cta_event_list(const std::string &origin, const GObservation &obs)
Retrieve CTA event list from generic observation.
int iter_phi(const double &rho, const double &resolution, const int &iter_min, const int &iter_max)
Determine number of azimuthal Romberg iterations.
double resolution(const GModelSpatial *model)
Determine resolution of spatial model.
const GCTAResponse * cta_rsp(const std::string &origin, const GResponse &rsp)
Retrieve CTA response from generic observation.
const GModelSpectral * cta_model_spectral(const GModelData &model)
Retrieve spectral component from CTA background model.
std::string gadf_hduclas4(const GFits &fits, const std::string &hduclas4)
Return extension name for GADF response table of given HDU class 4.
const GCTAResponseIrf & cta_rsp_irf(const std::string &origin, const GObservation &obs)
Retrieve CTA IRF response from generic observation.
GEbounds read_ds_ebounds(const GFitsHDU &hdu)
Read energy boundary data sub-space keywords.
const GCTAAeff & cta_rsp_aeff(const std::string &origin, const GObservation &obs)
Retrieve CTA effective area response from generic observation.
int iter_rho(const double &rho_max, const double &resolution, const int &iter_min, const int &iter_max)
Determine number of radial Romberg iterations.
std::vector< std::string > split(const std::string &s, const std::string &sep)
Split string.
GPhases read_ds_phase(const GFitsHDU &hdu)
Read phase boundary data sub-space keywords.
const GCTAEventCube & cta_event_cube(const std::string &origin, const GObservation &obs)
Retrieve CTA event cube from generic observation.
const GCTAResponseCube & cta_rsp_cube(const std::string &origin, const GObservation &obs)
Retrieve CTA cube response from generic observation.
std::string strip_chars(const std::string &arg, const std::string &chars)
Strip leading and trailing character from string.
const GModelTemporal * cta_model_temporal(const GModelData &model)
Retrieve temporal component from CTA background model.