ctools  2.0.0
 All Classes Namespaces Files Functions Variables Macros Pages
ctobservation Class Referenceabstract

Base class for observation tools. More...

#include <ctobservation.hpp>

Inheritance diagram for ctobservation:
ctool GApplication ctbin ctbkgcube ctcubemask ctedispcube ctexpcube ctfindvar ctlikelihood ctmodel ctobssim ctool_obs ctphase ctprob ctpsfcube ctselect ctskymap

Public Member Functions

 ctobservation (const std::string &name, const std::string &version)
 Name constructor. More...
 
 ctobservation (const std::string &name, const std::string &version, const GApplicationPars &pars)
 Application parameters constructor. More...
 
 ctobservation (const std::string &name, const std::string &version, int argc, char *argv[])
 Command line constructor. More...
 
 ctobservation (const std::string &name, const std::string &version, const GObservations &obs)
 Observations constructor. More...
 
 ctobservation (const ctobservation &app)
 Copy constructor. More...
 
virtual ~ctobservation (void)
 Destructor. More...
 
ctobservationoperator= (const ctobservation &app)
 Assignment operator. More...
 
virtual void clear (void)=0
 
virtual void process (void)=0
 
virtual void save (void)=0
 
void obs (const GObservations &obs)
 Set observation container. More...
 
const GObservations & obs (void) const
 Return observation container. More...
 
- Public Member Functions inherited from ctool
 ctool (const std::string &name, const std::string &version)
 Name constructor. More...
 
 ctool (const std::string &name, const std::string &version, const GApplicationPars &pars)
 Application parameter constructor. More...
 
 ctool (const std::string &name, const std::string &version, int argc, char *argv[])
 Command line constructor. More...
 
 ctool (const ctool &app)
 Copy constructor. More...
 
virtual ~ctool (void)
 Destructor. More...
 
ctooloperator= (const ctool &app)
 Assignment operator. More...
 
virtual void run (void)
 Run ctool. More...
 
virtual void execute (void)
 Execute ctool. More...
 

Protected Member Functions

GCTAObservation * first_unbinned_observation (void)
 Return first unbinned CTA observation. More...
 
GCTAObservation * next_unbinned_observation (void)
 Return next unbinned CTA observation. More...
 
const GCTAObservation * first_unbinned_observation (void) const
 Return first unbinned CTA observation (const version) More...
 
const GCTAObservation * next_unbinned_observation (void) const
 Return next unbinned CTA observation (const version) More...
 
void read_ogip_keywords (GFitsHDU *hdu) const
 Read OGIP keywords from FITS HDU. More...
 
void write_ogip_keywords (GFitsHDU *hdu) const
 Write OGIP keywords in FITS HDU. More...
 
void set_obs_statistic (const std::string &statistic)
 Set fit statistic for CTA observations. More...
 
void set_obs_bounds ()
 Set observation boundaries for CTA observations. More...
 
void save_events_fits (void)
 Save event list in FITS format. More...
 
void save_events_xml (void)
 Save event list(s) in XML format. More...
 
void init_members (void)
 Initialise class members. More...
 
void copy_members (const ctobservation &app)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
- Protected Member Functions inherited from ctool
void init_members (void)
 Initialise class members. More...
 
void copy_members (const ctool &app)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
void sync_pfiles (void)
 Synchronise parameter files. More...
 
const bool & read_ahead (void) const
 Signal whether parameters should be read ahead. More...
 
void setup_observations (GObservations &obs, const bool &response=true, const bool &list=true, const bool &cube=true)
 Setup observation container. More...
 
void setup_models (GObservations &obs, const std::string &name="")
 Setup model container. More...
 
GEbounds create_ebounds (void)
 Create energy boundaries from user parameters. More...
 
GEnergies create_energies (void)
 Create energies from user parameters. More...
 
GSkyMap create_map (const GObservations &obs)
 Create a skymap from user parameters. More...
 
GCTAEventCube create_cube (const GObservations &obs)
 Create a CTA event cube from user parameters. More...
 
GCTAObservation create_cta_obs (void)
 Create a CTA observation from User parameters. More...
 
void require_inobs (const std::string &method)
 Throws exception if inobs parameter is not valid. More...
 
void require_inobs_nolist (const std::string &method)
 
void require_inobs_nocube (const std::string &method)
 Throws exception if inobs parameter is a counts cube. More...
 
GCTARoi get_roi (const GCTAPointing &pnt=GCTAPointing())
 Return RoI from User parameters. More...
 
GEbounds get_ebounds (void)
 Return energy boundaries from User parameters. More...
 
GGti get_gti (const GTimeReference &ref)
 Return Good Time Intervals from User parameter. More...
 
GCTAPointing get_pointing (void)
 Return CTA pointing from User parameters. More...
 
GSkyDir get_skydir (void)
 Return sky direction from User parameters. More...
 
std::string set_outfile_name (const std::string &filename)
 Set output file name. More...
 
bool is_stacked (void)
 Query user parameters for stacked analysis. More...
 
bool is_onoff (void)
 Query user parameters for On/Off analysis. More...
 
void log_parameters (const GChatter &chatter)
 Log application parameters. More...
 
void log_observations (const GChatter &chatter, const GObservations &obs, const std::string &what="Observation")
 Log observation container. More...
 
void log_models (const GChatter &chatter, const GModels &models, const std::string &what="Model")
 Log model container. More...
 
void set_response (GObservations &obs)
 Set response for all CTA observations in container. More...
 
std::vector< bool > set_edisp (GObservations &obs, const bool &edisp) const
 Set energy dispersion to CTA observations. More...
 
void restore_edisp (GObservations &obs, const std::vector< bool > &edisp) const
 Restore energy dispersion flags of CTA observations. More...
 
void set_obs_response (GCTAObservation *obs)
 Set response for CTA observation. More...
 
GObservations get_observations (const bool &get_response=true)
 Get observation container. More...
 
GSkyDir get_mean_pointing (const GObservations &obs)
 Derives mean pointing from CTA observations. More...
 
size_t get_current_rss (void)
 Get current resident set size (physical memory use) in Bytes. More...
 
std::string get_obs_header (const GObservation *obs) const
 Return observation header string. More...
 
GEnergies insert_energy_boundaries (const GEnergies &energies, const GCTAObservation &obs)
 Insert observation energy boundaries into list of energies. More...
 
std::vector< bool > cube_layer_usage (const GEbounds &cube_ebounds, const GEbounds &list_ebounds) const
 Determine the counts cube layer usage. More...
 
std::string get_gtiname (const std::string &filename, const std::string &evtname) const
 Get Good Time Intervals extension name. More...
 
void save_event_list (const GCTAObservation *obs, const std::string &infile, const std::string &evtname, const std::string &gtiname, const std::string &outfile) const
 Save event list into FITS file. More...
 
std::string warn_too_few_energies (const GEnergies &energies) const
 Set warning string if there are too few energies. More...
 
std::string warn_xml_suffix (const GFilename &filename) const
 Set warning string if file has no .xml suffix. More...
 
void provide_help (void) const
 Dump help text in the console. More...
 

Protected Attributes

GObservations m_obs
 Observation container. More...
 
- Protected Attributes inherited from ctool
bool m_read_ahead
 Read ahead output parameters. More...
 
bool m_use_xml
 Use XML file instead of FITS file for observations. More...
 

Private Attributes

std::string m_ogip_telescope
 Name of telescope. More...
 
GTime m_ogip_tstart
 Start time for OGIP keywords. More...
 
GTime m_ogip_tstop
 Stop time for OGIP keywords. More...
 
double m_ogip_telapse
 Elapsed time. More...
 
double m_ogip_exposure
 Exposure time. More...
 
double m_ogip_ontime
 Ontime for OGIP keywords. More...
 
double m_ogip_livetime
 Livetime for OGIP keywords. More...
 
int m_index_unbinned
 Current index of unbinned observation. More...
 

Detailed Description

Base class for observation tools.

This is the baseclass for observation tools. Observation tools are ctools that hold an observation container.

Definition at line 44 of file ctobservation.hpp.

Constructor & Destructor Documentation

ctobservation::ctobservation ( const std::string &  name,
const std::string &  version 
)

Name constructor.

Parameters
[in]nameObservation tool name.
[in]versionObservation tool version.

Constructs a observation tool from the name and version. See the equivalent ctool constructor for details.

Definition at line 56 of file ctobservation.cpp.

References init_members().

ctobservation::ctobservation ( const std::string &  name,
const std::string &  version,
const GApplicationPars &  pars 
)

Application parameters constructor.

Parameters
[in]nameObservation tool name.
[in]versionObservation tool version.
[in]parsApplication parameters.

Constructs a observation tool from the name, version and the application parameters pars. See the equivalent ctool constructor for details.

Definition at line 78 of file ctobservation.cpp.

References init_members().

ctobservation::ctobservation ( const std::string &  name,
const std::string &  version,
int  argc,
char *  argv[] 
)

Command line constructor.

Parameters
[in]nameObservation tool name.
[in]versionObservation tool version.
[in]argcNumber of arguments in command line.
[in]argvArray of command line arguments.

Constructs a observation tool from the name, version and command line arguments. See the equivalent ctool constructor for details.

Definition at line 102 of file ctobservation.cpp.

References init_members().

ctobservation::ctobservation ( const std::string &  name,
const std::string &  version,
const GObservations &  obs 
)

Observations constructor.

Parameters
[in]nameObservation tool name.
[in]versionObservation tool version.
[in]obsObservation container.

Constructs a observation tool from the name, version and an observation container.

Definition at line 125 of file ctobservation.cpp.

References init_members(), m_obs, and obs().

ctobservation::ctobservation ( const ctobservation app)

Copy constructor.

Parameters
[in]appObservation tool.

Constructs an instance of a observation tool by copying information from another observation tool.

Definition at line 148 of file ctobservation.cpp.

References copy_members(), and init_members().

ctobservation::~ctobservation ( void  )
virtual

Destructor.

Destructs the observation tool.

Definition at line 166 of file ctobservation.cpp.

References free_members().

Member Function Documentation

virtual void ctobservation::clear ( void  )
pure virtual
void ctobservation::copy_members ( const ctobservation app)
protected

Copy class members.

Parameters
[in]appObservation tool.

Definition at line 769 of file ctobservation.cpp.

References m_index_unbinned, m_obs, m_ogip_exposure, m_ogip_livetime, m_ogip_ontime, m_ogip_telapse, m_ogip_telescope, m_ogip_tstart, and m_ogip_tstop.

Referenced by ctobservation(), and operator=().

GCTAObservation * ctobservation::first_unbinned_observation ( void  )
inlineprotected

Return first unbinned CTA observation.

Returns
Pointer to first unbinned CTA observation

Returns a pointer to the first unbinned CTA observation in the container. If no CTA observation exists a NULL pointer is returned.

The method calls next_unbinned_observation(). See the method for details.

Definition at line 152 of file ctobservation.hpp.

Referenced by ctskymap::fill_maps(), ctprob::process(), ctphase::process(), ctbin::process(), save_events_fits(), and save_events_xml().

const GCTAObservation * ctobservation::first_unbinned_observation ( void  ) const
protected

Return first unbinned CTA observation (const version)

Returns
Const pointer to first unbinned CTA observation

Returns a const pointer to the first unbinned CTA observation in the container. If no CTA observation exists a NULL pointer is returned.

The method calls next_unbinned_observation(). See the method for details.

Definition at line 237 of file ctobservation.cpp.

References m_index_unbinned, m_ogip_exposure, m_ogip_livetime, m_ogip_ontime, m_ogip_telapse, m_ogip_telescope, m_ogip_tstart, m_ogip_tstop, next_unbinned_observation(), and obs().

GCTAObservation * ctobservation::next_unbinned_observation ( void  )
inlineprotected

Return next unbinned CTA observation.

Returns
Pointer to next unbinned CTA observation

Returns a pointer to the next unbinned CTA observation in the container. If no CTA observation exists any more a NULL pointer is returned.

The method writes for each encountered observation a level 3 header into the logger. It will also signal when an observation was skipped because it either was not a CTA observation or not an unbinned observation.

Definition at line 173 of file ctobservation.hpp.

Referenced by ctskymap::fill_maps(), first_unbinned_observation(), ctprob::process(), ctphase::process(), ctbin::process(), save_events_fits(), and save_events_xml().

const GCTAObservation * ctobservation::next_unbinned_observation ( void  ) const
protected

Return next unbinned CTA observation (const version)

Returns
Const pointer to next unbinned CTA observation

Returns a const pointer to the next unbinned CTA observation in the container. If no CTA observation exists any more a NULL pointer is returned.

The method writes for each encountered observation a level 3 header into the logger. It will also signal when an observation was skipped because it either was not a CTA observation or not an unbinned observation.

Todo:
Logger methods should be declared const to avoid the const casting.

Definition at line 274 of file ctobservation.cpp.

References ctool::get_obs_header(), m_index_unbinned, m_obs, m_ogip_exposure, m_ogip_livetime, m_ogip_ontime, m_ogip_telapse, m_ogip_telescope, m_ogip_tstart, m_ogip_tstop, and obs().

void ctobservation::obs ( const GObservations &  obs)
inline

Set observation container.

Parameters
[in]obsObservation container.

Set observation container.

Definition at line 120 of file ctobservation.hpp.

References m_obs, and obs().

Referenced by cscripts.cslightcrv.cslightcrv::_adjust_model_pars(), cscripts.csscs.csscs::_adjust_model_pars(), cscripts.csspec.csspec::_adjust_model_pars(), cscripts.cstsmapsplit.cstsmapsplit::_compute_null_hypothesis(), cscripts.csphasecrv.csphasecrv::_create_fits_table(), cscripts.cslightcrv.cslightcrv::_create_fits_table(), cscripts.cslightcrv.cslightcrv::_create_tbounds(), cscripts.csspec.csspec::_fit_model(), cscripts.csbkgmodel.csbkgmodel::_generate_runwise_bkg(), cscripts.csphasecrv.csphasecrv::_get_free_par_names(), cscripts.cslightcrv.cslightcrv::_get_free_par_names(), cscripts.csbkgmodel.csbkgmodel::_get_instrument(), cscripts.csobsselect.csobsselect::_get_parameters(), cscripts.csebins.csebins::_get_parameters(), cscripts.csmodelselect.csmodelselect::_get_parameters(), cscripts.csresmap.csresmap::_get_parameters(), cscripts.csresspec.csresspec::_get_parameters(), cscripts.csobsinfo.csobsinfo::_get_parameters(), cscripts.cstsmapsplit.cstsmapsplit::_get_parameters(), cscripts.csobs2caldb.csobs2caldb::_get_parameters(), cscripts.csbkgmodel.csbkgmodel::_get_parameters(), cscripts.cspull.cspull::_get_parameters(), cscripts.cstsdist.cstsdist::_get_parameters(), cscripts.csspec.csspec::_get_parameters(), cscripts.cssens.cssens::_get_parameters(), cscripts.csphasecrv.csphasecrv::_get_parameters(), cscripts.cslightcrv.cslightcrv::_get_parameters(), cscripts.csscs.csscs::_get_parameters(), cscripts.csphagen.csphagen::_get_parameters(), cscripts.csphagen.csphagen::_get_parameters_bkgmethod_custom(), cscripts.csphagen.csphagen::_get_parameters_bkgmethod_off(), cscripts.cssens.cssens::_get_sensitivity(), cscripts.csspec.csspec::_log_spectral_binning(), cscripts.csscs.csscs::_mask_observations(), cscripts.csphasecrv.csphasecrv::_phase_bin(), cscripts.csphagen.csphagen::_process_observation(), cscripts.csspec.csspec::_select_obs(), cscripts.csspec.csspec::_set_ebounds(), cscripts.cssens.cssens::_set_obs_ebounds(), cscripts.csspec.csspec::_set_replace_src_spectrum_by_bins(), cscripts.csspec.csspec::_set_replace_src_spectrum_by_nodes(), cscripts.cssens.cssens::_set_source(), cscripts.cssens.cssens::_set_src_prefactor(), cscripts.cstsdist.cstsdist::_sim(), cscripts.cssens.cssens::_sim_evt_excess(), cscripts.cslightcrv.cslightcrv::_timebin(), cscripts.cspull.cspull::_trial(), cscripts.csresmap.csresmap::models(), cscripts.cstsdist.cstsdist::models(), cscripts.cspull.cspull::models(), cscripts.cslightcrv.cslightcrv::models(), cscripts.csspec.csspec::models(), cscripts.csobsinfo.csobsinfo::process(), cscripts.cstsmapsplit.cstsmapsplit::process(), cscripts.csresmap.csresmap::process(), cscripts.csmodelselect.csmodelselect::process(), cscripts.csebins.csebins::process(), cscripts.csobsselect.csobsselect::process(), cscripts.cstsdist.cstsdist::process(), cscripts.cspull.cspull::process(), cscripts.csbkgmodel.csbkgmodel::process(), cscripts.csphasecrv.csphasecrv::process(), cscripts.cslightcrv.cslightcrv::process(), cscripts.csresspec.csresspec::process(), cscripts.csscs.csscs::process(), cscripts.csphagen.csphagen::process(), cscripts.cssens.cssens::process(), cscripts.csspec.csspec::process(), cscripts.csobsselect.csobsselect::save(), and cscripts.csphagen.csphagen::save().

const GObservations & ctobservation::obs ( void  ) const
inline

Return observation container.

Returns
Reference to observation container.

Returns a reference to the observation container.

Definition at line 135 of file ctobservation.hpp.

References m_obs.

Referenced by cscripts.cslightcrv.cslightcrv::_adjust_model_pars(), cscripts.csscs.csscs::_adjust_model_pars(), cscripts.csspec.csspec::_adjust_model_pars(), cscripts.cstsmapsplit.cstsmapsplit::_compute_null_hypothesis(), cscripts.csphasecrv.csphasecrv::_create_fits_table(), cscripts.cslightcrv.cslightcrv::_create_fits_table(), cscripts.cslightcrv.cslightcrv::_create_tbounds(), cscripts.csspec.csspec::_fit_model(), cscripts.csbkgmodel.csbkgmodel::_generate_runwise_bkg(), cscripts.csphasecrv.csphasecrv::_get_free_par_names(), cscripts.cslightcrv.cslightcrv::_get_free_par_names(), cscripts.csbkgmodel.csbkgmodel::_get_instrument(), cscripts.csobsselect.csobsselect::_get_parameters(), cscripts.csebins.csebins::_get_parameters(), cscripts.csmodelselect.csmodelselect::_get_parameters(), cscripts.csresmap.csresmap::_get_parameters(), cscripts.csresspec.csresspec::_get_parameters(), cscripts.csobsinfo.csobsinfo::_get_parameters(), cscripts.cstsmapsplit.cstsmapsplit::_get_parameters(), cscripts.csobs2caldb.csobs2caldb::_get_parameters(), cscripts.csbkgmodel.csbkgmodel::_get_parameters(), cscripts.cspull.cspull::_get_parameters(), cscripts.cstsdist.cstsdist::_get_parameters(), cscripts.csspec.csspec::_get_parameters(), cscripts.cssens.cssens::_get_parameters(), cscripts.csphasecrv.csphasecrv::_get_parameters(), cscripts.cslightcrv.cslightcrv::_get_parameters(), cscripts.csscs.csscs::_get_parameters(), cscripts.csphagen.csphagen::_get_parameters(), cscripts.csphagen.csphagen::_get_parameters_bkgmethod_custom(), cscripts.csphagen.csphagen::_get_parameters_bkgmethod_off(), cscripts.cssens.cssens::_get_sensitivity(), cscripts.csspec.csspec::_log_spectral_binning(), cscripts.csscs.csscs::_mask_observations(), cscripts.csphasecrv.csphasecrv::_phase_bin(), cscripts.csphagen.csphagen::_process_observation(), cscripts.csspec.csspec::_select_obs(), cscripts.csspec.csspec::_set_ebounds(), cscripts.cssens.cssens::_set_obs_ebounds(), cscripts.csspec.csspec::_set_replace_src_spectrum_by_bins(), cscripts.csspec.csspec::_set_replace_src_spectrum_by_nodes(), cscripts.cssens.cssens::_set_source(), cscripts.cssens.cssens::_set_src_prefactor(), cscripts.cstsdist.cstsdist::_sim(), cscripts.cssens.cssens::_sim_evt_excess(), cscripts.cslightcrv.cslightcrv::_timebin(), cscripts.cspull.cspull::_trial(), ctfindvar::create_cube(), ctobservation(), ctskymap::fill_maps(), first_unbinned_observation(), ctfindvar::get_alphas(), ctmodel::get_parameters(), ctfindvar::get_tstart(), ctfindvar::get_tstop(), ctfindvar::init_gtis(), cscripts.csresmap.csresmap::models(), cscripts.cstsdist.cstsdist::models(), cscripts.cspull.cspull::models(), cscripts.cslightcrv.cslightcrv::models(), cscripts.csspec.csspec::models(), next_unbinned_observation(), obs(), ctbin::obs_cube_stacked(), ctselect::process(), ctprob::process(), ctcubemask::process(), ctphase::process(), ctobssim::process(), ctmodel::process(), ctbutterfly::process(), ctbin::process(), cscripts.csobsinfo.csobsinfo::process(), cscripts.cstsmapsplit.cstsmapsplit::process(), cscripts.csresmap.csresmap::process(), cscripts.csmodelselect.csmodelselect::process(), cscripts.csebins.csebins::process(), cscripts.csobsselect.csobsselect::process(), cscripts.cstsdist.cstsdist::process(), cscripts.cspull.cspull::process(), cscripts.csbkgmodel.csbkgmodel::process(), cscripts.csphasecrv.csphasecrv::process(), cscripts.cslightcrv.cslightcrv::process(), cscripts.csresspec.csresspec::process(), cscripts.csscs.csscs::process(), cscripts.csphagen.csphagen::process(), cscripts.cssens.cssens::process(), cscripts.csspec.csspec::process(), ctprob::publish(), ctselect::publish(), ctcubemask::publish(), ctphase::publish(), ctobssim::publish(), ctbin::save(), cscripts.csobsselect.csobsselect::save(), cscripts.csphagen.csphagen::save(), save_events_fits(), save_events_xml(), ctcubemask::save_fits(), ctselect::save_fits(), ctobssim::save_fits(), ctcubemask::save_xml(), ctselect::save_xml(), ctobssim::save_xml(), and set_obs_bounds().

virtual void ctobservation::process ( void  )
pure virtual
void ctobservation::read_ogip_keywords ( GFitsHDU *  hdu) const
protected

Read OGIP keywords from FITS HDU.

Parameters
[in,out]hduPointer to FITS HDU.

Read OGIP keywords from FITS HDU.

Definition at line 353 of file ctobservation.cpp.

References m_ogip_exposure, m_ogip_livetime, m_ogip_ontime, m_ogip_telapse, m_ogip_telescope, m_ogip_tstart, and m_ogip_tstop.

Referenced by ctskymap::get_parameters().

virtual void ctobservation::save ( void  )
pure virtual
void ctobservation::save_events_fits ( void  )
protected

Save event list in FITS format.

Save the event list as a FITS file. The file name of the FITS file is specified by the outobs parameter.

Definition at line 621 of file ctobservation.cpp.

References first_unbinned_observation(), m_obs, next_unbinned_observation(), obs(), and ctool::save_event_list().

Referenced by ctprob::save(), and ctphase::save().

void ctobservation::save_events_xml ( void  )
protected

Save event list(s) in XML format.

Save the event list(s) into FITS files and write the file path information into a XML file. The filename of the XML file is specified by the outobs parameter, the filename(s) of the event lists are built by prepending a prefix to the input event list filenames. Any path present in the input filename will be stripped, i.e. the event list(s) will be written in the local working directory (unless a path is specified in the prefix).

Definition at line 683 of file ctobservation.cpp.

References first_unbinned_observation(), ctool::get_gtiname(), m_obs, next_unbinned_observation(), obs(), ctool::save_event_list(), ctool::set_outfile_name(), and ctool::warn_xml_suffix().

Referenced by ctprob::save(), and ctphase::save().

void ctobservation::set_obs_bounds ( void  )
protected

Set observation boundaries for CTA observations.

Sets the observation boundaries for all CTA observations that contain event lists if they do not yet exist.

If the event list does not contain any Good Time Intervals, they are derived from the time limits provided by the tmin and tmax user parameters if they exist and are valid. Furthermore, the reference time for the Good Time Intervals is inferred from the mjdref parameter if it exists. Otherwise, G_CTA_MJDREF is used as reference time.

If the event list does not contain energy boundaries, they are derived from the energy limits provided by the emin and emax user parameters if they exist and are valid.

If the event list does not contain a valid ROI, the ROI radius is determined by the rad user parameter if it exists and is valid. The center is either taken from the pointing direction, and if this is not valid, it is set from the ra and dec user parameters if they exist and are valid.

Definition at line 514 of file ctobservation.cpp.

References m_obs, and obs().

Referenced by ctmodel::get_obs(), and ctobssim::get_parameters().

void ctobservation::set_obs_statistic ( const std::string &  statistic)
protected

Set fit statistic for CTA observations.

Parameters
[in]statisticRequested fit statistic.

Sets the fit statistic for all CTA observations. The method handles regular CTA observations as well as On/Off observations.

For regular CTA observations of type GCTAObservation the fit statistic is only set for binned or stacked observations. Possible values are POISSON, GAUSSIAN or CHI2 (case insensitive).

For On/Off CTA observations of type GCTAOnOffObservation the fit statistic is always set. Possible values are POISSON, CSTAT or WSTAT (case insensitive).

If statistic is any other string the fit statistic of the observations will not be modified.

Definition at line 455 of file ctobservation.cpp.

References m_obs.

Referenced by cterror::get_parameters(), ctlike::get_parameters(), ctulimit::get_parameters(), ctbutterfly::get_parameters(), and cttsmap::get_parameters().

void ctobservation::write_ogip_keywords ( GFitsHDU *  hdu) const
protected

Write OGIP keywords in FITS HDU.

Parameters
[in,out]hduPointer to FITS HDU.

Writes OGIP keywords in FITS HDU.

Definition at line 395 of file ctobservation.cpp.

References m_ogip_exposure, m_ogip_livetime, m_ogip_ontime, m_ogip_telapse, m_ogip_telescope, m_ogip_tstart, and m_ogip_tstop.

Referenced by ctskymap::write_map().

Member Data Documentation

int ctobservation::m_index_unbinned
mutableprivate

Current index of unbinned observation.

Definition at line 108 of file ctobservation.hpp.

Referenced by copy_members(), first_unbinned_observation(), init_members(), and next_unbinned_observation().

GObservations ctobservation::m_obs
protected

Observation container.

Definition at line 97 of file ctobservation.hpp.

Referenced by ctbutterfly::check_model(), copy_members(), ctfindvar::create_cube(), ctobservation(), ctlikelihood::evaluate(), ctprob::evaluate_probability(), ctskymap::fill_maps(), ctbutterfly::gaussian_error_propagation(), ctfindvar::get_alphas(), ctulimit::get_model_parameter(), ctmodel::get_obs(), ctulimit::get_parameter_brackets(), cterror::get_parameters(), ctedispcube::get_parameters(), ctpsfcube::get_parameters(), ctlike::get_parameters(), ctexpcube::get_parameters(), ctfindvar::get_parameters(), ctselect::get_parameters(), ctprob::get_parameters(), ctbkgcube::get_parameters(), ctcubemask::get_parameters(), ctphase::get_parameters(), ctskymap::get_parameters(), ctulimit::get_parameters(), ctobssim::get_parameters(), ctbutterfly::get_parameters(), cttsmap::get_parameters(), ctmodel::get_parameters(), ctbin::get_parameters(), ctfindvar::get_tstart(), ctfindvar::get_tstop(), ctedispcube::init_cube(), ctpsfcube::init_cube(), ctexpcube::init_cube(), ctfindvar::init_gtis(), init_members(), ctbin::init_sky_dir_cache(), ctmodel::models(), next_unbinned_observation(), obs(), ctbin::obs_cube_stacked(), ctlike::optimize_lm(), ctlike::process(), cterror::process(), ctool_obs::process(), ctool_like::process(), ctedispcube::process(), ctexpcube::process(), ctbkgcube::process(), ctpsfcube::process(), ctfindvar::process(), ctprob::process(), ctselect::process(), ctcubemask::process(), ctphase::process(), ctobssim::process(), ctulimit::process(), ctmodel::process(), cttsmap::process(), ctbutterfly::process(), ctbin::process(), ctselect::publish(), ctprob::publish(), ctcubemask::publish(), ctphase::publish(), ctobssim::publish(), ctlike::refit(), ctlike::reoptimize_lm(), cterror::save(), ctlike::save(), ctselect::save(), ctprob::save(), ctcubemask::save(), ctphase::save(), ctobssim::save(), ctbin::save(), save_events_fits(), save_events_xml(), ctcubemask::save_fits(), ctselect::save_fits(), ctobssim::save_fits(), ctcubemask::save_xml(), ctselect::save_xml(), ctobssim::save_xml(), set_obs_bounds(), set_obs_statistic(), ctulimit::ulimit_bisection(), and ctlike::xml_result().

double ctobservation::m_ogip_exposure
mutableprivate
double ctobservation::m_ogip_livetime
mutableprivate
double ctobservation::m_ogip_ontime
mutableprivate
double ctobservation::m_ogip_telapse
mutableprivate
std::string ctobservation::m_ogip_telescope
mutableprivate
GTime ctobservation::m_ogip_tstart
mutableprivate
GTime ctobservation::m_ogip_tstop
mutableprivate

The documentation for this class was generated from the following files: