|
ctools 2.1.0
|
Map cube generation tool. More...
#include <ctmapcube.hpp>
Public Member Functions | |
| ctmapcube (void) | |
| Void constructor. | |
| ctmapcube (int argc, char *argv[]) | |
| Command line constructor. | |
| ctmapcube (const ctmapcube &app) | |
| Copy constructor. | |
| virtual | ~ctmapcube (void) |
| Destructor. | |
| ctmapcube & | operator= (const ctmapcube &app) |
| Assignment operator. | |
| void | clear (void) |
| Clear ctmapcube tool. | |
| void | process (void) |
| Generate map cube. | |
| void | save (void) |
| Save map cube. | |
| void | publish (const std::string &name="") |
| Publish map cube. | |
| const GModelSpatialDiffuseCube & | mapcube (void) const |
| Return map cube. | |
| void | models (const GModels &models) |
| Set models. | |
Public Member Functions inherited from ctool | |
| ctool (const std::string &name, const std::string &version) | |
| Name constructor. | |
| ctool (const std::string &name, const std::string &version, const GApplicationPars &pars) | |
| Application parameter constructor. | |
| ctool (const std::string &name, const std::string &version, int argc, char *argv[]) | |
| Command line constructor. | |
| ctool (const ctool &app) | |
| Copy constructor. | |
| virtual | ~ctool (void) |
| Destructor. | |
| ctool & | operator= (const ctool &app) |
| Assignment operator. | |
| virtual void | run (void) |
| Run ctool. | |
| virtual void | execute (void) |
| Execute ctool. | |
Protected Member Functions | |
| void | init_members (void) |
| Initialise class members. | |
| void | copy_members (const ctmapcube &app) |
| Copy class members. | |
| void | free_members (void) |
| Delete class members. | |
| void | get_parameters (void) |
| Get application parameters. | |
| void | create_cube (void) |
| Generate map cube. | |
| void | add_model (GModelSky *model) |
| Add one model to map cube. | |
| void | add_ptsrc_model (GModelSky *model) |
| Add one point source model to map cube. | |
| void | get_bounding_circle (GModelSky *model, GSkyDir *dir, double *radius) const |
| Get bounding circle for a sky model. | |
Protected Member Functions inherited from ctool | |
| void | init_members (void) |
| Initialise class members. | |
| void | copy_members (const ctool &app) |
| Copy class members. | |
| void | free_members (void) |
| Delete class members. | |
| void | sync_pfiles (void) |
| Synchronise parameter files. | |
| const bool & | read_ahead (void) const |
| Signal whether parameters should be read ahead. | |
| void | setup_observations (GObservations &obs, const bool &response=true, const bool &list=true, const bool &cube=true) |
| Setup observation container. | |
| void | setup_models (GObservations &obs, const std::string &name="") |
| Setup model container. | |
| GEbounds | create_ebounds (void) |
| Create energy boundaries from user parameters. | |
| GEnergies | create_energies (void) |
| Create energies from user parameters. | |
| GSkyMap | create_map (const GObservations &obs) |
| Create a skymap from user parameters. | |
| GCTAEventCube | create_cube (const GObservations &obs) |
| Create a CTA event cube from user parameters. | |
| GCTAObservation | create_cta_obs (void) |
| Create a CTA observation from User parameters. | |
| void | require_inobs (const std::string &method) |
| Throws exception if inobs parameter is not valid. | |
| 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. | |
| GCTARoi | get_roi (const GCTAPointing &pnt=GCTAPointing()) |
| Return RoI from User parameters. | |
| GEbounds | get_ebounds (void) |
| Return energy boundaries from User parameters. | |
| GGti | get_gti (const GTimeReference &ref) |
| Return Good Time Intervals from User parameter. | |
| GCTAPointing | get_pointing (void) |
| Return CTA pointing from User parameters. | |
| GSkyDir | get_skydir (void) |
| Return sky direction from User parameters. | |
| std::string | set_outfile_name (const std::string &filename) |
| Set output file name. | |
| bool | is_stacked (void) |
| Query user parameters for stacked analysis. | |
| bool | is_onoff (void) |
| Query user parameters for On/Off analysis. | |
| void | log_parameters (const GChatter &chatter) |
| Log application parameters. | |
| void | log_observations (const GChatter &chatter, const GObservations &obs, const std::string &what="Observation") |
| Log observation container. | |
| void | log_models (const GChatter &chatter, const GModels &models, const std::string &what="Model") |
| Log model container. | |
| void | set_response (GObservations &obs) |
| Set response for all CTA observations in container. | |
| std::vector< bool > | set_edisp (GObservations &obs, const bool &edisp) const |
| Set energy dispersion to CTA observations. | |
| void | restore_edisp (GObservations &obs, const std::vector< bool > &edisp) const |
| Restore energy dispersion flags of CTA observations. | |
| void | set_obs_response (GCTAObservation *obs) |
| Set response for CTA observation. | |
| GObservations | get_observations (const bool &get_response=true) |
| Get observation container. | |
| GSkyDir | get_mean_pointing (const GObservations &obs) |
| Derives mean pointing from CTA observations. | |
| size_t | get_current_rss (void) |
| Get current resident set size (physical memory use) in Bytes. | |
| std::string | get_obs_header (const GObservation *obs) const |
| Return observation header string. | |
| GEnergies | insert_energy_boundaries (const GEnergies &energies, const GCTAObservation &obs) |
| Insert observation energy boundaries into list of energies. | |
| std::vector< bool > | cube_layer_usage (const GEbounds &cube_ebounds, const GEbounds &list_ebounds) const |
| Determine the counts cube layer usage. | |
| std::string | get_gtiname (const std::string &filename, const std::string &evtname) const |
| Get Good Time Intervals extension name. | |
| 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. | |
| std::string | warn_too_few_energies (const GEnergies &energies) const |
| Set warning string if there are too few energies. | |
| std::string | warn_xml_suffix (const GFilename &filename) const |
| Set warning string if file has no .xml suffix. | |
| void | provide_help (void) const |
| Dump help text in the console. | |
Protected Attributes | |
| GFilename | m_outcube |
| Output map cube filename. | |
| double | m_ptsrcsig |
| Point source sigma (arcmin) | |
| bool | m_publish |
| Publish map cube? | |
| GChatter | m_chatter |
| Chattiness. | |
| GModels | m_models |
| Model container. | |
| GModelSpatialDiffuseCube | m_cube |
| Map cube. | |
Protected Attributes inherited from ctool | |
| bool | m_read_ahead |
| Read ahead output parameters. | |
| bool | m_use_xml |
| Use XML file instead of FITS file for observations. | |
Map cube generation tool.
Definition at line 44 of file ctmapcube.hpp.
| ctmapcube::ctmapcube | ( | void | ) |
| ctmapcube::ctmapcube | ( | int | argc, |
| char * | argv[] ) |
Command line constructor.
| [in] | argc | Number of arguments in command line. |
| [in] | argv | Array of command line arguments. |
Definition at line 69 of file ctmapcube.cpp.
References init_members().
| ctmapcube::ctmapcube | ( | const ctmapcube & | app | ) |
Copy constructor.
| [in] | app | Application. |
Definition at line 85 of file ctmapcube.cpp.
References copy_members(), and init_members().
|
virtual |
|
protected |
Add one model to map cube.
| [in] | model | Pointer to point source sky model. |
Adds one model to map cube.
Definition at line 440 of file ctmapcube.cpp.
References get_bounding_circle(), and m_cube.
Referenced by add_ptsrc_model(), and create_cube().
|
protected |
Add one point source model to map cube.
| [in] | model | Pointer to point source sky model. |
Adds one point source model to map cube.
Definition at line 492 of file ctmapcube.cpp.
References add_model(), get_bounding_circle(), m_cube, and m_ptsrcsig.
Referenced by create_cube().
|
virtual |
Clear ctmapcube tool.
Clears ctmapcube tool.
Implements ctool.
Definition at line 158 of file ctmapcube.cpp.
References free_members(), ctool::free_members(), init_members(), and ctool::init_members().
|
protected |
Copy class members.
| [in] | app | Application. |
Definition at line 305 of file ctmapcube.cpp.
References m_chatter, m_cube, m_models, m_outcube, m_ptsrcsig, and m_publish.
Referenced by ctmapcube(), and operator=().
|
protected |
Generate map cube.
Generate map cube by looping over all sky models in the container.
Definition at line 393 of file ctmapcube.cpp.
References add_model(), add_ptsrc_model(), and m_models.
Referenced by process().
|
protected |
Delete class members.
Definition at line 325 of file ctmapcube.cpp.
Referenced by clear(), operator=(), and ~ctmapcube().
|
protected |
Get bounding circle for a sky model.
| [in] | model | Pointer to sky model. |
| [out] | dir | Centre of bounding circle. |
| [out] | radius | Radius of bounding circle (degrees). |
Determine for any spatial model the bounding circle. The bounding circle is a circular region that fully enclosed the model.
The method does not verify the validity of the pointer arguments.
Definition at line 583 of file ctmapcube.cpp.
Referenced by add_model(), and add_ptsrc_model().
|
protected |
Get application parameters.
Get all task parameters from parameter file or (if required) by querying the user.
Definition at line 338 of file ctmapcube.cpp.
References ctool::create_ebounds(), ctool::log_parameters(), m_chatter, m_cube, m_models, m_ptsrcsig, m_publish, and ctool::read_ahead().
Referenced by process().
|
protected |
Initialise class members.
Definition at line 283 of file ctmapcube.cpp.
References m_chatter, m_cube, m_models, m_outcube, m_ptsrcsig, and m_publish.
Referenced by clear(), ctmapcube(), ctmapcube(), ctmapcube(), and operator=().
|
inline |
|
inline |
Set models.
| [in] | models | Model container. |
Set model container to be used for map cube generation.
Definition at line 109 of file ctmapcube.hpp.
References m_models, and models().
Referenced by models(), and cscripts.cstsdist.cstsdist::process().
Assignment operator.
| [in] | app | Application. |
Definition at line 123 of file ctmapcube.cpp.
References copy_members(), free_members(), init_members(), and ctool::operator=().
|
virtual |
Generate map cube.
This method reads the task parameters from the parfile and generates the map cube.
Implements ctool.
Definition at line 185 of file ctmapcube.cpp.
References create_cube(), get_parameters(), ctool::log_models(), m_chatter, m_cube, m_models, m_publish, and publish().
| void ctmapcube::publish | ( | const std::string & | name = "" | ) |
Publish map cube.
| [in] | name | Map cube name. |
Publishes the map cube on a VO Hub.
Definition at line 252 of file ctmapcube.cpp.
References CTMAPCUBE_NAME, and m_cube.
Referenced by cscripts.cslightcrv.cslightcrv::process(), cscripts.csphasecrv.csphasecrv::process(), cscripts.csresmap.csresmap::process(), cscripts.csspec.csspec::process(), cscripts.csviscube.csviscube::process(), and process().
|
virtual |
Save map cube.
Saves the map cube into a FITS file.
Implements ctool.
Definition at line 215 of file ctmapcube.cpp.
|
protected |
Chattiness.
Definition at line 81 of file ctmapcube.hpp.
Referenced by copy_members(), get_parameters(), init_members(), and process().
|
protected |
Map cube.
Definition at line 85 of file ctmapcube.hpp.
Referenced by add_model(), add_ptsrc_model(), copy_members(), get_parameters(), init_members(), mapcube(), process(), publish(), and save().
|
protected |
Model container.
Definition at line 84 of file ctmapcube.hpp.
Referenced by copy_members(), create_cube(), get_parameters(), init_members(), models(), and process().
|
protected |
Output map cube filename.
Definition at line 78 of file ctmapcube.hpp.
Referenced by copy_members(), init_members(), and save().
|
protected |
Point source sigma (arcmin)
Definition at line 79 of file ctmapcube.hpp.
Referenced by add_ptsrc_model(), copy_members(), get_parameters(), and init_members().
|
protected |
Publish map cube?
Definition at line 80 of file ctmapcube.hpp.
Referenced by copy_members(), get_parameters(), init_members(), and process().