ctools
2.0.0
|
Energy dispersion cube generation tool. More...
#include <ctedispcube.hpp>
Public Member Functions | |
ctedispcube (void) | |
Void constructor. More... | |
ctedispcube (const GObservations &obs) | |
Observations constructor. More... | |
ctedispcube (int argc, char *argv[]) | |
Command line constructor. More... | |
ctedispcube (const ctedispcube &app) | |
Copy constructor. More... | |
virtual | ~ctedispcube (void) |
Destructor. More... | |
ctedispcube & | operator= (const ctedispcube &app) |
Assignment operator. More... | |
void | clear (void) |
Clear energy dispersion tool. More... | |
void | process (void) |
Generate the energy dispersion cube. More... | |
void | save (void) |
Save energy dispersion cube. More... | |
const GCTACubeEdisp & | edispcube (void) const |
Return energy dispersion cube. More... | |
Public Member Functions inherited from ctobservation | |
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... | |
ctobservation & | operator= (const ctobservation &app) |
Assignment operator. More... | |
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... | |
ctool & | operator= (const ctool &app) |
Assignment operator. More... | |
virtual void | run (void) |
Run ctool. More... | |
virtual void | execute (void) |
Execute ctool. More... | |
Protected Member Functions | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const ctedispcube &app) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
void | get_parameters (void) |
Get application parameters. More... | |
void | init_cube (void) |
Initialise energy dispersion cube. More... | |
Protected Member Functions inherited from ctobservation | |
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 >iname, 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 | |
GFilename | m_outcube |
Output exposure cube file. More... | |
bool | m_addbounds |
Add energies at boundaries? More... | |
GChatter | m_chatter |
Chattiness. More... | |
GCTACubeEdisp | m_edispcube |
Energy dispersion cube. More... | |
Protected Attributes inherited from ctobservation | |
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... | |
Energy dispersion cube generation tool.
Definition at line 44 of file ctedispcube.hpp.
ctedispcube::ctedispcube | ( | void | ) |
Void constructor.
Constructs an empty energy dispersion tool.
Definition at line 55 of file ctedispcube.cpp.
References init_members().
|
explicit |
Observations constructor.
[in] | obs | Observation container. |
Constructs an energy dispersion tool from the information that is provided in an observation container obs
.
Definition at line 73 of file ctedispcube.cpp.
References init_members().
ctedispcube::ctedispcube | ( | int | argc, |
char * | argv[] | ||
) |
Command line constructor.
[in] | argc | Number of arguments in command line. |
[in] | argv | Array of command line arguments. |
Constructs an energy dispersion tool by parsing the arguments provided on the command line.
Definition at line 94 of file ctedispcube.cpp.
References init_members().
ctedispcube::ctedispcube | ( | const ctedispcube & | app | ) |
Copy constructor.
[in] | app | Energy dispersion tool. |
Constructs an energy dispersion tool by copying anothere energy dispersion tool.
Definition at line 113 of file ctedispcube.cpp.
References copy_members(), and init_members().
|
virtual |
Destructor.
Desctructs an energy dispersion tool.
Definition at line 131 of file ctedispcube.cpp.
References free_members().
|
virtual |
Clear energy dispersion tool.
Set the energy disperison tool to an empty tool.
Implements ctobservation.
Definition at line 190 of file ctedispcube.cpp.
References free_members(), ctool::free_members(), ctobservation::free_members(), init_members(), ctool::init_members(), and ctobservation::init_members().
|
protected |
Copy class members.
[in] | app | Energy dispersion cube. |
Definition at line 314 of file ctedispcube.cpp.
References m_addbounds, m_chatter, m_edispcube, and m_outcube.
Referenced by ctedispcube(), and operator=().
|
inline |
Return energy dispersion cube.
Definition at line 87 of file ctedispcube.hpp.
References m_edispcube.
|
protected |
Delete class members.
Definition at line 332 of file ctedispcube.cpp.
Referenced by clear(), operator=(), and ~ctedispcube().
|
protected |
Get application parameters.
Get all task parameters from parameter file or (if required) by querying the user. The parameters are read in the correct order.
Definition at line 345 of file ctedispcube.cpp.
References ctool::create_cube(), ctool::log_parameters(), m_addbounds, m_chatter, m_edispcube, ctobservation::m_obs, ctool::read_ahead(), and ctool::setup_observations().
Referenced by process().
|
protected |
Initialise energy dispersion cube.
Initialise the energy dispersion cube.
Definition at line 386 of file ctedispcube.cpp.
References ctool::insert_energy_boundaries(), m_addbounds, m_chatter, m_edispcube, and ctobservation::m_obs.
Referenced by process().
|
protected |
Initialise class members.
Definition at line 294 of file ctedispcube.cpp.
References m_addbounds, m_chatter, m_edispcube, and m_outcube.
Referenced by clear(), ctedispcube(), and operator=().
ctedispcube & ctedispcube::operator= | ( | const ctedispcube & | app | ) |
Assignment operator.
[in] | app | Energy dispersion tool. |
Assigns energy dispersion tool.
Definition at line 155 of file ctedispcube.cpp.
References copy_members(), free_members(), init_members(), and ctobservation::operator=().
|
virtual |
Generate the energy dispersion cube.
Generates the energy dispersion cube by looping over all unbinned CTA observations in the observation container.
Implements ctobservation.
Definition at line 219 of file ctedispcube.cpp.
References get_parameters(), init_cube(), ctool::log_observations(), m_chatter, m_edispcube, and ctobservation::m_obs.
|
virtual |
Save energy dispersion cube.
Saves the energy dispersion cube in a FITS file. The FITS filename is provided by the "outcube" parameter.
Implements ctobservation.
Definition at line 253 of file ctedispcube.cpp.
References m_edispcube, and m_outcube.
|
protected |
Add energies at boundaries?
Definition at line 73 of file ctedispcube.hpp.
Referenced by copy_members(), get_parameters(), init_cube(), and init_members().
|
protected |
Chattiness.
Definition at line 74 of file ctedispcube.hpp.
Referenced by copy_members(), get_parameters(), init_cube(), init_members(), and process().
|
protected |
Energy dispersion cube.
Definition at line 77 of file ctedispcube.hpp.
Referenced by copy_members(), edispcube(), get_parameters(), init_cube(), init_members(), process(), and save().
|
protected |
Output exposure cube file.
Definition at line 72 of file ctedispcube.hpp.
Referenced by copy_members(), init_members(), and save().