GammaLib
2.1.0.dev
|
Functions | |
void | check_energy_interval (const std::string &origin, const GEnergy &emin, const GEnergy &emax) |
Checks energy interval. More... | |
void | check_prj_x2s_status (const std::string &origin, const int &status, const int &number) |
Checks status of GWcs::prj_x2s method. More... | |
void | check_prj_s2x_status (const std::string &origin, const int &status, const int &number) |
Checks status of GWcs::prj_s2x method. More... | |
int | fits_move_to_hdu (const std::string &caller, void *vptr, const int &hdunum=0) |
Move to FITS extension. More... | |
double | acos (const double &arg) |
Computes acos by avoiding NaN due to rounding errors. More... | |
double | atan2 (const double &y, const double &x) |
Compute arc tangens in radians. More... | |
double | cosd (const double &angle) |
Compute cosine of angle in degrees. More... | |
double | sind (const double &angle) |
Compute sine of angle in degrees. More... | |
double | tand (const double &angle) |
Compute tangens of angle in degrees. More... | |
double | asind (const double &value) |
Compute arc sine in degrees. More... | |
double | acosd (const double &value) |
Compute arc cosine in degrees. More... | |
double | atand (const double &value) |
Compute arc tangens in degrees. More... | |
double | atan2d (const double &y, const double &x) |
Compute arc tangens in degrees. More... | |
void | sincosd (const double &angle, double *s, double *c) |
Compute sine and cosine of angle in degrees. More... | |
double | gammln (const double &arg) |
Computes logarithm of gamma function. More... | |
double | erf (const double &arg) |
Computes error function. More... | |
double | erfc (const double &arg) |
Computes complementary error function. More... | |
double | erfinv (const double &arg) |
Computes inverse error function. More... | |
double | modulo (const double &v1, const double &v2) |
Returns the remainder of the division. More... | |
double | plaw_integral (const double &x1, const double &f1, const double &x2, const double &f2) |
Returns the integral of a power law. More... | |
double | gauss_integral (const double &x1, const double &x2) |
Returns the integral of a Gaussian function. More... | |
std::string | strip_whitespace (const std::string &arg) |
Strip leading and trailing whitespace from string. More... | |
std::string | strip_chars (const std::string &arg, const std::string &chars) |
Strip leading and trailing character from string. More... | |
std::string | rstrip_chars (const std::string &arg, const std::string &chars) |
Strip trailing character from string. More... | |
std::string | replace_segment (const std::string &arg, const std::string &segment, const std::string &replacement) |
Replace string segment in string. More... | |
std::string | expand_env (const std::string &arg) |
Expand environment variables in string. More... | |
std::string | filepath (const std::string &pathname, const std::string &filename) |
Build file path from path name and file name. More... | |
std::string | tmpnam (void) |
Return temporary file name. More... | |
std::string | getenv (const std::string &arg) |
Return value of environment variable. More... | |
std::string | str (const unsigned short int &value) |
Convert unsigned short integer value into string. More... | |
std::string | str (const unsigned int &value) |
Convert unsigned integer value into string. More... | |
std::string | str (const unsigned long int &value) |
Convert unsigned long integer value into string. More... | |
std::string | str (const unsigned long long int &value) |
Convert unsigned long long integer value into string. More... | |
std::string | str (const short int &value) |
Convert short integer value into string. More... | |
std::string | str (const int &value, const std::string &fmt="%d") |
Convert integer value into string. More... | |
std::string | str (const long int &value) |
Convert long integer value into string. More... | |
std::string | str (const long long int &value) |
Convert long long integer value into string. More... | |
std::string | str (const float &value, const int &precision=0) |
Convert single precision value into string. More... | |
std::string | str (const double &value, const int &precision=0) |
Convert double precision value into string. More... | |
std::string | str (const std::complex< double > &value, const int &precision=0) |
Convert complex value into string. More... | |
std::string | strdate (void) |
Return current date. More... | |
char * | tochar (const std::string &arg) |
Convert string to C string. More... | |
short | toshort (const std::string &arg) |
Convert string into short value. More... | |
unsigned short | toushort (const std::string &arg) |
Convert string into unsigned short value. More... | |
int | toint (const std::string &arg) |
Convert string into integer value. More... | |
unsigned int | touint (const std::string &arg) |
Convert string into unsigned integer value. More... | |
long | tolong (const std::string &arg) |
Convert string into long value. More... | |
unsigned long | toulong (const std::string &arg) |
Convert string into unsigned long value. More... | |
long long | tolonglong (const std::string &arg) |
Convert string into long long value. More... | |
unsigned long long | toulonglong (const std::string &arg) |
Convert string into unsigned long long value. More... | |
float | tofloat (const std::string &arg) |
Convert string into single precision value. More... | |
double | todouble (const std::string &arg) |
Convert string into double precision value. More... | |
std::string | toupper (const std::string &s) |
Convert string to upper case. More... | |
std::string | tolower (const std::string &s) |
Convert string to lower case. More... | |
std::vector< std::string > | split (const std::string &s, const std::string &sep) |
Split string. More... | |
std::string | fill (const std::string &s, const int &n) |
Fill string with n strings of same type. More... | |
std::string | left (const std::string &s, const int &n, const char &c= ' ') |
Left justify string to achieve a length of n characters. More... | |
std::string | right (const std::string &s, const int &n, const char &c= ' ') |
Right justify string to achieve a length of n characters. More... | |
std::string | centre (const std::string &s, const int &n, const char &c= ' ') |
Centre string to achieve a length of n characters. More... | |
std::string | parformat (const std::string &s, const int &indent=0) |
Convert string in parameter format. More... | |
std::string | number (const std::string &noun, const int &number) |
Convert singular noun into number noun. More... | |
double | plaw_photon_flux (const double &emin, const double &emax, const double &epivot, const double &gamma) |
Compute photon flux between two energies for a power law. More... | |
double | plaw_energy_flux (const double &emin, const double &emax, const double &epivot, const double &gamma) |
Compute energy flux between two energies for a power law. More... | |
GEnergy | elogmean (const GEnergy &a, const GEnergy &b) |
Computes log mean energy. More... | |
bool | dir_exists (const std::string &dirname) |
Checks if directory exists. More... | |
bool | is_infinite (const double &x) |
Signal if argument is infinite. More... | |
bool | is_notanumber (const double &x) |
Signal if argument is not a number. More... | |
bool | contains (const std::string &str, const std::string &substring) |
Checks if a substring is in a string. More... | |
bool | contains (const std::vector< std::string > &strings, const std::string &string) |
Checks if a string is contained in a vector of strings. More... | |
void | warning (const std::string &origin, const std::string &message) |
Emits warning. More... | |
std::string | xml2str (const std::string &arg) |
Convert XML character references in string to characters. More... | |
std::string | str2xml (const std::string &arg) |
Convert special characters in string to XML character references. More... | |
bool | xml_has_par (const GXmlElement &xml, const std::string &name) |
Checks if parameter with given name in XML element exists. More... | |
GXmlElement * | xml_need_par (const std::string &origin, GXmlElement &xml, const std::string &name) |
Return pointer to parameter with given name in XML element. More... | |
const GXmlElement * | xml_get_par (const std::string &origin, const GXmlElement &xml, const std::string &name) |
Return pointer to parameter with given name in XML element. More... | |
std::string | xml_get_attr (const std::string &origin, const GXmlElement &xml, const std::string &name, const std::string &attribute) |
Return attribute value for a given parameter in XML element. More... | |
void | xml_check_parnum (const std::string &origin, const GXmlElement &xml, const int &number) |
Checks number of parameters. More... | |
void | xml_check_type (const std::string &origin, GXmlElement &xml, const std::string &type) |
Checks the model type. More... | |
void | xml_check_par (const std::string &origin, const std::string &name, const int &number) |
Checks whether a parameter has occured once. More... | |
GFilename | xml_file_expand (const GXmlElement &xml, const std::string &filename) |
Expand file name provided as XML attribute for loading. More... | |
GFilename | xml_file_reduce (const GXmlElement &xml, const std::string &filename) |
Reduce file name provided for writing as XML attribute. More... | |
void | xml_get_name_value_pair (const GXmlNode *node, std::string &name, std::string &value) |
Extract name / value pair from XML node. More... | |
int | recv (int fd, char *buffer, int len, int flags, int timeout) |
Checks whether a parameter has occured once. More... | |
double | roi_arclength (const double &rad, const double &dist, const double &cosdist, const double &sindist, const double &roi, const double &cosroi) |
Returns length of circular arc within circular ROI. More... | |
bool | compare (const double &a, const double &b, const double &tol) |
Compare two floating point values with tolerance. More... | |
std::string | http_query (const std::string &host, const std::string &query) |
Return response to a HTTP query. More... | |
std::string | host_country (const bool &force_query=false) |
Return two-digit host country code. More... | |
GFilename | gamma_filename (const std::string &name) |
Returns filename in .gamma directory. More... | |
GChatter | reduce (const GChatter &chatter) |
Reduce chattiness by one level. More... | |
GTime | com_time (const int &tjd, const int &tics) |
Convert TJD and COMPTEL tics in GTime object. More... | |
int | com_tjd (const GTime &time) |
Convert GTime in COMPTEL TJD. More... | |
int | com_tics (const GTime &time) |
Convert GTime in COMPTEL tics. More... | |
void | com_wcs_mer2car (GSkyMap &map) |
Changes Mercator's projection to cartesian projection. More... | |
double | com_energy1 (const double &energy, const double &phigeo) |
Return D1 energy deposit. More... | |
double | com_energy2 (const double &energy, const double &phigeo) |
Return D2 energy deposit. More... | |
const double & | com_exd2x (const int &id2) |
Return D2 module exclusion region X position. More... | |
const double & | com_exd2y (const int &id2) |
Return D2 module exclusion region Y position. More... | |
const double & | com_exd2r (const int &id2) |
Return D2 module exclusion region radius. More... | |
cta_omega_intervals | limit_omega (const double &min, const double &max, const double &domega) |
Limit omega interval. More... | |
double | resolution (const GModelSpatial *model) |
Determine resolution of spatial model. More... | |
GCTARoi | read_ds_roi (const GFitsHDU &hdu) |
Extract ROI from data sub-space keywords. More... | |
GEbounds | read_ds_ebounds (const GFitsHDU &hdu) |
Read energy boundary data sub-space keywords. More... | |
GPhases | read_ds_phase (const GFitsHDU &hdu) |
Read phase boundary data sub-space keywords. More... | |
std::string | read_ds_gti_extname (const GFitsHDU &hdu) |
Return Good Time Intervals extension name from data sub-space keywords. More... | |
std::string | gadf_hduclas4 (const GFits &fits, const std::string &hduclas4) |
Return extension name for GADF response table of given HDU class 4. More... | |
int | iter_rho (const double &rho_max, const double &resolution, const int &iter_min, const int &iter_max) |
Determine number of radial Romberg iterations. More... | |
int | iter_phi (const double &rho, const double &resolution, const int &iter_min, const int &iter_max) |
Determine number of azimuthal Romberg iterations. More... | |
const GCTAObservation & | cta_obs (const std::string &origin, const GObservation &obs) |
Retrieve CTA observation from generic observation. More... | |
const GCTAPointing & | cta_pnt (const std::string &origin, const GObservation &obs) |
Retrieve CTA pointing from generic observation. More... | |
const GCTAResponse * | cta_rsp (const std::string &origin, const GResponse &rsp) |
Retrieve CTA response from generic observation. More... | |
const GCTAResponseIrf & | cta_rsp_irf (const std::string &origin, const GObservation &obs) |
Retrieve CTA IRF response from generic observation. More... | |
const GCTAResponseCube & | cta_rsp_cube (const std::string &origin, const GObservation &obs) |
Retrieve CTA cube response from generic observation. More... | |
const GCTAAeff & | cta_rsp_aeff (const std::string &origin, const GObservation &obs) |
Retrieve CTA effective area response from generic observation. More... | |
const GCTABackground & | cta_rsp_bkg (const std::string &origin, const GObservation &obs) |
Retrieve CTA background response from generic observation. More... | |
const GCTAEventList & | cta_event_list (const std::string &origin, const GObservation &obs) |
Retrieve CTA event list from generic observation. More... | |
const GCTAEventCube & | cta_event_cube (const std::string &origin, const GObservation &obs) |
Retrieve CTA event cube from generic observation. More... | |
const GCTAInstDir & | cta_dir (const std::string &origin, const GEvent &event) |
Retrieve CTA instrument direction from generic event. More... | |
const GModelSpectral * | cta_model_spectral (const GModelData &model) |
Retrieve spectral component from CTA background model. More... | |
const GModelTemporal * | cta_model_temporal (const GModelData &model) |
Retrieve temporal component from CTA background model. More... | |
const GFitsTable * | spi_hdu (const GFits &fits, const std::string &extname, const int &extver=1) |
Return FITS table. More... | |
int | spi_num_hdus (const GFits &fits, const std::string &extname) |
Return number of HDU versions. More... | |
GTime | spi_ijd2time (const double &ijd) |
Convert IJD to GTime. More... | |
GTimes | spi_annealing_start_times (void) |
Return start time of annealing operations. More... | |
GTimes | spi_gedfail_times (void) |
Return times of detector failures. More... | |
Variables | |
const std::string | extname_arf = "SPECRESP" |
const std::string | extname_ebounds = "EBOUNDS" |
const std::string | extname_energies = "ENERGIES" |
const std::string | extname_gti = "GTI" |
const double | pi = 3.141592653589793238462643383279502884197 |
const double | twopi = 6.283185307179586476925286766559005768394 |
const double | fourpi = 12.56637061435917295385057353311801153679 |
const double | pihalf = 1.570796326794896619231321691639751442099 |
const double | inv_pihalf = 0.6366197723675813430755350534900574 |
const double | inv_sqrt4pi = 0.2820947917738781434740397257803862929220 |
const double | inv_sqrt2pi = 0.3989422804014327028632180827116826549172 |
const double | pi2 = pi*pi |
const double | deg2rad = 0.0174532925199432954743717 |
const double | rad2deg = 57.295779513082322864647722 |
const double | ln2 = 0.6931471805599453094172321214581766 |
const double | ln10 = 2.3025850929940456840179914546843642 |
const double | inv_ln2 = 1.4426950408889634073599246810018921 |
const double | inv_ln10 = 1.0/ln10 |
const double | inv_loge = 1.0/std::log10(std::exp(1.0)) |
const double | onethird = 1.0/3.0 |
const double | twothird = 2.0/3.0 |
const double | fourthird = 4.0/3.0 |
const double | sqrt_onehalf = std::sqrt(1.0/2.0) |
const double | sqrt_two = std::sqrt(2.0) |
const double | sqrt_pihalf = std::sqrt(pihalf) |
const double | sqrt_twopi = std::sqrt(twopi) |
const std::string | extname_pha = "SPECTRUM" |
const std::string | extname_rmf = "MATRIX" |
const double | MeV2erg = 1.6021765e-6 |
const double | erg2MeV = 624150.96 |
const double | MeV2Angstrom = 1.239841875e-2 |
const double | pc2cm = 3.08568025e18 |
const double | sec_in_day = 86400.0 |
const double | sec2day = 1.0 / sec_in_day |
const double | tai2tt = 32.184 |
const double | mec2 = 0.5109989461 |
const double | speed_of_light = 299792458.0 |
const double | gkx1 [5] |
const double | gkw10 [5] |
const double | gkx2 [5] |
const double | gkw21a [5] |
const double | gkw21b [6] |
const double | gkx3 [11] |
const double | gkw43a [10] |
const double | gkw43b [12] |
const double | gkx4 [22] |
const double | gkw87a [21] |
const double | gkw87b [23] |
const std::string | extname_dri = "DRI" |
const std::string | extname_cta_aeff2d = "EFFECTIVE AREA" |
const std::string | extname_cta_background2d = "BKG" |
const std::string | extname_cta_background3d = "BACKGROUND" |
const std::string | extname_cta_migras = "MIGRAS" |
const std::string | extname_deltas = "DELTAS" |
const std::string | extname_cta_edisp2d = "ENERGY DISPERSION" |
const std::string | extname_cta_counts = "COUNTS" |
const std::string | extname_cta_weights = "WEIGHTS" |
const std::string | extname_cta_events = "EVENTS" |
const std::string | extname_cta_spatial_lookup = "RADIAL BACKGROUND LOOKUP" |
const std::string | extname_cta_psf2d = "POINT SPREAD FUNCTION" |
const std::string | extname_cta_psfking = "POINT SPREAD FUNCTION" |
const std::string | extname_cta_psftable = "PSF_2D_TABLE" |
const std::string | extname_lat_aeff = "EFFECTIVE AREA" |
const std::string | extname_lat_efficiency = "EFFICIENCY_PARAMS" |
const std::string | extname_lat_edisp = "ENERGY DISPERSION" |
const std::string | extname_lat_edisp_scale = "EDISP_SCALING_PARAMS" |
const std::string | extname_lat_events = "EVENTS" |
const std::string | extname_lat_exposure = "EXPOSURE" |
const std::string | extname_lat_wgtexposure = "WEIGHTED_EXPOSURE" |
const std::string | extname_lat_cthetabounds = "CTHETABOUNDS" |
const std::string | extname_lat_ltcubemap = "EXPOSURE" |
double gammalib::acos | ( | const double & | arg | ) |
Computes acos by avoiding NaN due to rounding errors.
[in] | arg | Argument. |
Returns the arc cosine by restricting the argument to [-1,1].
If the compile option G_USE_ASIN_FOR_ACOS is defined, the function will compute
\[ acos(x) = \frac{\pi}{2} - asin(x) \]
which happens to be faster on most systems.
Definition at line 69 of file GMath.cpp.
References asin(), pi, and pihalf.
Referenced by acos(), acosd(), angle(), GCOMDri::compute_geometry(), GCOMDri::compute_surface(), GHorizDir::dist(), GSkyDir::dist(), cta_psf_radial_kerns_phi::eval(), cta_irf_radial_kern_omega::eval(), cta_irf_elliptical_kern_rho::eval(), cta_irf_elliptical_kern_omega::eval(), cta_nroi_elliptical_kern_rho::eval(), cta_irf_diffuse_kern_phi::eval(), cta_psf_radial_kern_omega::eval(), cta_psf_radial_kern_phi::eval(), cta_psf_elliptical_kern_rho::eval(), cta_psf_elliptical_kern_omega::eval(), GHealpix::get_ring_info(), GCTAPointing::instdir(), GCTAResponseIrf::irf_radial(), GModelSpatialDiffuseConst::mc(), GCTAModelAeffBackground::mc(), GModelSpatialDiffuseMap::mc(), GModelSpatialRadialDisk::mc(), GModelSpatialRadialRing::mc(), GCTAPsfTable::mc(), GModelSpatialEllipticalDisk::mc(), GModelSpatialDiffuseCube::mc(), GHealpix::pix2ang_nest(), GHealpix::pix2ang_ring(), roi_arclength(), and GWcs::solidangle().
double gammalib::acosd | ( | const double & | value | ) |
Compute arc cosine in degrees.
[in] | value | Value |
This code has been adapted from the WCSLIB function wcstrig.c::acosd().
Definition at line 218 of file GMath.cpp.
References acos(), and rad2deg.
Referenced by GWcs::cel_set(), GWcsSIN::prj_x2s(), GWcs::sph_s2x(), and GWcs::sph_x2s().
double gammalib::asind | ( | const double & | value | ) |
Compute arc sine in degrees.
[in] | value | Value |
This code has been adapted from the WCSLIB function wcstrig.c::asind().
Definition at line 250 of file GMath.cpp.
References asin(), and rad2deg.
Referenced by GWcsAZP::prj_s2x(), GWcsAZP::prj_set(), GWcsAIT::prj_x2s(), GWcsAZP::prj_x2s(), GWcsSIN::prj_x2s(), GWcs::sph_s2x(), and GWcs::sph_x2s().
double gammalib::atan2 | ( | const double & | y, |
const double & | x | ||
) |
Compute arc tangens in radians.
[in] | y | Nominator |
[in] | x | Denominator |
This code has been adapted from the WCSLIB function wcstrig.c::atan2d().
Definition at line 102 of file GMath.cpp.
Referenced by atan2d(), GHorizDir::celvector(), GSkyDir::celvector(), GSkyDir::euler(), GSkyDir::galvector(), GHealpix::get_ring_info(), GHealpix::loc2dir(), GSkyRegionRectangle::local_to_dir(), GHealpix::max_pixrad(), GSkyDir::moon(), GCTAInstDir::phi(), GSkyDir::posang(), GCTAPointing::skydir(), GCTABackground3D::solid_angle(), GCTABackground2D::solid_angle(), and GSkyDir::sun().
double gammalib::atan2d | ( | const double & | y, |
const double & | x | ||
) |
Compute arc tangens in degrees.
[in] | y | Nominator |
[in] | x | Denominator |
This code has been adapted from the WCSLIB function wcstrig.c::atan2d().
Definition at line 308 of file GMath.cpp.
References atan2(), and rad2deg.
Referenced by GWcs::cel_set(), GModelSpatialEllipticalGauss::mc(), GWcsSTG::prj_x2s(), GWcsTAN::prj_x2s(), GWcsAZP::prj_x2s(), GWcsSIN::prj_x2s(), GWcsAIT::prj_x2s(), GWcsARC::prj_x2s(), GWcs::sph_s2x(), and GWcs::sph_x2s().
double gammalib::atand | ( | const double & | value | ) |
Compute arc tangens in degrees.
[in] | value | Value |
This code has been adapted from the WCSLIB function wcstrig.c::atand().
Definition at line 282 of file GMath.cpp.
References atan(), and rad2deg.
Referenced by GWcsAZP::prj_s2x(), GWcsSIN::prj_s2x(), GWcsSTG::prj_x2s(), and GWcsMER::prj_x2s().
std::string gammalib::centre | ( | const std::string & | s, |
const int & | n, | ||
const char & | c = ' ' |
||
) |
Centre string to achieve a length of n characters.
[in] | s | String to be centred. |
[in] | n | Requested total width. |
[in] | c | Fill character. |
Centre string by adding c
to the left and the right to achieve a length of n
characters.
Definition at line 1118 of file GTools.cpp.
References fill().
Referenced by GSkyRegionMap::contains(), GModelSpatial::flux(), GSkyMap::flux(), GCTAResponseIrf::irf_elliptical(), GCTAResponseIrf::irf_radial(), GApplication::log_header(), GCTAResponseIrf::nroi_elliptical(), GCTAResponseIrf::nroi_radial(), GCTAEventList::print(), GCOMEventList::read_events(), and GSkyMap::region_circle().
void gammalib::check_energy_interval | ( | const std::string & | origin, |
const GEnergy & | emin, | ||
const GEnergy & | emax | ||
) |
Checks energy interval.
[in] | origin | Method performing the check. |
[in] | emin | Minimum energy. |
[in] | emax | Maximum energy. |
GException::invalid_argument | Minimum energy is equal or larger than maximum energy. |
Checks that the minimum energy is smaller than the maximum energy.
Definition at line 364 of file GException.cpp.
References GEnergy::print().
Referenced by GModelSpectralComposite::mc(), GModelSpectralMultiplicative::mc(), GModelSpectralExponential::mc(), GModelSpectralBins::mc(), GModelSpectralTable::mc(), GModelSpectralConst::mc(), GModelSpectralFunc::mc(), GModelSpectralGauss::mc(), GModelSpectralPlaw::mc(), GModelSpectralExpPlaw::mc(), GModelSpectralLogParabola::mc(), GModelSpectralBrokenPlaw::mc(), GModelSpectralExpInvPlaw::mc(), GModelSpectralSuperExpPlaw::mc(), GModelSpectralPlawPhotonFlux::mc(), GModelSpectralPlawEnergyFlux::mc(), GModelSpectralNodes::mc(), and GModelSpectralSmoothBrokenPlaw::mc().
void gammalib::check_prj_s2x_status | ( | const std::string & | origin, |
const int & | status, | ||
const int & | number | ||
) |
Checks status of GWcs::prj_s2x method.
[in] | origin | Method performing the check. |
[in] | status | Status flag. |
[in] | number | Number of invalid coordinates. |
GException::invalid_argument | Invalid (phi,theta) coordinate specified. |
Checks the status of the GWcs::prj_s2x method.
Definition at line 438 of file GException.cpp.
References str().
Referenced by GWcsAIT::prj_s2x(), GWcsTAN::prj_s2x(), GWcsSTG::prj_s2x(), GWcsSIN::prj_s2x(), GWcsMOL::prj_s2x(), and GWcsAZP::prj_s2x().
void gammalib::check_prj_x2s_status | ( | const std::string & | origin, |
const int & | status, | ||
const int & | number | ||
) |
Checks status of GWcs::prj_x2s method.
[in] | origin | Method performing the check. |
[in] | status | Status flag. |
[in] | number | Number of invalid coordinates. |
GException::invalid_argument | Invalid (x,y) coordinate specified. |
Checks the status of the GWcs::prj_x2s method.
Definition at line 401 of file GException.cpp.
References str().
Referenced by GWcsAIT::prj_x2s(), GWcsSIN::prj_x2s(), GWcsSFL::prj_x2s(), GWcsMOL::prj_x2s(), GWcsMER::prj_x2s(), GWcsCAR::prj_x2s(), GWcsAZP::prj_x2s(), and GWcsARC::prj_x2s().
double gammalib::com_energy1 | ( | const double & | energy, |
const double & | phigeo | ||
) |
Return D1 energy deposit.
[in] | energy | Input photon energy (MeV). |
[in] | phigeo | Geometrical scatter angle (deg). |
Definition at line 110 of file GCOMSupport.cpp.
References com_energy2().
Referenced by GCOMInstChars::psd_correction().
double gammalib::com_energy2 | ( | const double & | energy, |
const double & | phigeo | ||
) |
Return D2 energy deposit.
[in] | energy | Input photon energy (MeV). |
[in] | phigeo | Geometrical scatter angle (deg). |
Definition at line 127 of file GCOMSupport.cpp.
References cos(), deg2rad, and mec2.
Referenced by com_energy1(), GCOMIaq::compton_kinematics(), GCOMInstChars::prob_D2inter(), GCOMInstChars::trans_D2(), and GCOMInstChars::trans_V23().
const double & gammalib::com_exd2r | ( | const int & | id2 | ) |
Return D2 module exclusion region radius.
[in] | id2 | Module identifier [1,...,14]. |
Returns the D2 module exclusion region radius for a given module. The method does not check the validity of the module identifier.
The values have been implemented from the MPE-FPM-4 file.
Definition at line 195 of file GCOMSupport.cpp.
Referenced by GCOMDri::compute_geometry(), and GCOMSelection::use_event().
const double & gammalib::com_exd2x | ( | const int & | id2 | ) |
Return D2 module exclusion region X position.
[in] | id2 | Module identifier [1,...,14]. |
Returns the D2 module exclusion region X position for a given module. The method does not check the validity of the module identifier.
The values have been implemented from the MPE-FPM-4 file.
Definition at line 151 of file GCOMSupport.cpp.
Referenced by GCOMDri::compute_geometry(), and GCOMSelection::use_event().
const double & gammalib::com_exd2y | ( | const int & | id2 | ) |
Return D2 module exclusion region Y position.
[in] | id2 | Module identifier [1,...,14]. |
Returns the D2 module exclusion region Y position for a given module. The method does not check the validity of the module identifier.
The values have been implemented from the MPE-FPM-4 file.
Definition at line 173 of file GCOMSupport.cpp.
Referenced by GCOMDri::compute_geometry(), and GCOMSelection::use_event().
int gammalib::com_tics | ( | const GTime & | time | ) |
Convert GTime in COMPTEL tics.
[in] | time | Time. |
Converts GTime object in COMPTEL tics (1/8 ms).
The method applies the CGRO clock correction. The CGRO clock was too fast by 2.042144 seconds before 8798:28800000 (1992-06-25T01:00:00). After that date the clock was corrected.
Definition at line 125 of file GCOMTools.cpp.
References GTime::mjd(), and sec2day.
Referenced by GCOMTim::print(), GCOMHkd::print(), GCOMEventList::print(), GCOMEventCube::print(), GCOMBvcs::tdelta(), GCOMTim::write(), and GCOMDri::write_attributes().
GTime gammalib::com_time | ( | const int & | tjd, |
const int & | tics | ||
) |
Convert TJD and COMPTEL tics in GTime object.
[in] | tjd | Truncated Julian Days (days). |
[in] | tics | COMPTEL tics (1/8 ms). |
Converts TJD and COMPTEL tics into a GTime object. COMPTEL times are given in UTC, i.e. 8393:0 converts into 1991-05-17T00:00:00 UT (see COM-RP-UNH-DRG-037).
The method applies the CGRO clock correction. The CGRO clock was too fast by 2.042144 seconds before 8798:28800000 (1992-06-25T01:00:00). After that date the clock was corrected.
Definition at line 55 of file GCOMTools.cpp.
References GTime::mjd(), and sec2day.
Referenced by GCOMTim::read(), GCOMOads::read(), GCOMBvcs::read(), GCOMHkds::read(), GCOMDri::read_attributes(), and GCOMEventAtom::time().
int gammalib::com_tjd | ( | const GTime & | time | ) |
Convert GTime in COMPTEL TJD.
[in] | time | Time. |
Converts GTime object in TJD.
The method applies the CGRO clock correction. The CGRO clock was too fast by 2.042144 seconds before 8798:28800000 (1992-06-25T01:00:00). After that date the clock was corrected.
Definition at line 91 of file GCOMTools.cpp.
References GTime::mjd(), and sec2day.
Referenced by GCOMTim::print(), GCOMHkd::print(), GCOMEventList::print(), GCOMEventCube::print(), GCOMBvcs::tdelta(), GCOMSelection::use_event(), GCOMTim::write(), and GCOMDri::write_attributes().
void gammalib::com_wcs_mer2car | ( | GSkyMap & | map | ) |
Changes Mercator's projection to cartesian projection.
[in,out] | map | Skymap. |
Changes the World Coordinate System of a sky map from Mercartor's projection to a cartesian projection. This transformation is needed to correct the wrong WCS headers that are found in the COMPTEL files distributed through the HEASARC web site.
The method operates only on sky maps that use Mercator's projection. Nothing is done for all other sky map. This method can thus be transparently be applied to the sky maps read from COMPTEL data files.
Definition at line 56 of file GCOMSupport.cpp.
References GWcs::cdelt(), GWcs::code(), GSkyProjection::coordsys(), GWcs::crpix(), GWcs::crval(), GSkyMap::nx(), GSkyMap::ny(), and GSkyMap::projection().
Referenced by GCOMObservation::load_drb(), GCOMObservation::load_drg(), GCOMObservation::load_drx(), and GCOMDri::read().
bool gammalib::compare | ( | const double & | a, |
const double & | b, | ||
const double & | tol | ||
) |
Compare two floating point values with tolerance.
[in] | a | First floating point value. |
[in] | b | Second floating point value. |
[in] | tol | Relative tolerance. |
This method tests whether a
is identical to b
within a given relative tolerance tol
. The test verifies whether
\[|a - b| \le |a \times tol|\]
for \(a \ne 0\) or whether
\[|a - b| \le |b \times tol|\]
for \(b \ne 0\). If both \(a = 0\) and \(b = 0\) the method returns true.
Definition at line 2190 of file GTools.cpp.
References abs().
bool gammalib::contains | ( | const std::string & | str, |
const std::string & | substring | ||
) |
Checks if a substring is in a string.
[in] | str | String you want to search in. |
[in] | substring | String you are looking for in str . |
Checks if substring is contained in str
Definition at line 1342 of file GTools.cpp.
Referenced by GCTAModelSpatialMultiplicative::append(), GModelSpectralComposite::append(), GModelSpatialComposite::append(), GModelSpectralMultiplicative::append(), GSkyRegionCircle::read(), GSkyRegionRectangle::read(), GSPIModelDataSpace::setup_detector_indices(), GSPIModelDataSpace::setup_energy_indices(), GSPIModelDataSpace::setup_pointing_indices(), GCTAModelSpatialMultiplicative::write(), GModelSpectralComposite::write(), and GModelSpectralMultiplicative::write().
bool gammalib::contains | ( | const std::vector< std::string > & | strings, |
const std::string & | string | ||
) |
Checks if a string is contained in a vector of strings.
[in] | strings | Vector of strings you want to search in. |
[in] | string | string you are looking for in strings. |
Checks if a string is contained in a vector of strings
Definition at line 1366 of file GTools.cpp.
double gammalib::cosd | ( | const double & | angle | ) |
Compute cosine of angle in degrees.
[in] | angle | Angle in degrees |
This code has been adapted from the WCSLIB function wcstrig.c::cosd().
Definition at line 134 of file GMath.cpp.
References abs(), cos(), and deg2rad.
Referenced by GWcs::cel_set(), GWcsSFL::prj_s2x(), GWcsSTG::prj_s2x(), GWcsTAN::prj_s2x(), GWcsSIN::prj_s2x(), GWcsAZP::prj_set(), GWcs::sph_s2x(), and GWcs::sph_x2s().
const GCTAInstDir & gammalib::cta_dir | ( | const std::string & | origin, |
const GEvent & | event | ||
) |
Retrieve CTA instrument direction from generic event.
[in] | origin | Method asking for pointer retrieval. |
[in] | event | Generic event. |
GException::invalid_argument | event does not contain a CTA instrument direction. |
Extract CTA Instrument Direction from an event.
Definition at line 804 of file GCTASupport.cpp.
Referenced by GCTAModelIrfBackground::eval(), GCTAModelAeffBackground::eval(), GCTAModelCubeBackground::eval(), GCTAModelRadialAcceptance::eval(), GCTAModelBackground::eval(), GCTAModelSkyCube::eval(), GCTAResponseIrf::irf(), GCTAResponseCube::irf(), GCTAResponseIrf::irf_diffuse(), GCTAResponseIrf::irf_elliptical(), and GCTAResponseIrf::irf_radial().
const GCTAEventCube & gammalib::cta_event_cube | ( | const std::string & | origin, |
const GObservation & | obs | ||
) |
Retrieve CTA event cube from generic observation.
[in] | origin | Method asking for pointer retrieval. |
[in] | obs | Generic observation. |
GException::invalid_argument | Observation obs does not contain a CTA event cube. |
Extract CTA event cube from a CTA observation.
Definition at line 770 of file GCTASupport.cpp.
References cta_obs(), and GObservation::events().
Referenced by GCTAResponseCube::irf_radial().
const GCTAEventList & gammalib::cta_event_list | ( | const std::string & | origin, |
const GObservation & | obs | ||
) |
Retrieve CTA event list from generic observation.
[in] | origin | Method asking for pointer retrieval. |
[in] | obs | Generic observation. |
GException::invalid_argument | Observation obs does not contain a CTA event list. |
Extract CTA event list from a CTA observation.
Definition at line 736 of file GCTASupport.cpp.
References cta_obs(), and GObservation::events().
Referenced by GCTAModelAeffBackground::aeff_integral(), GCTAModelIrfBackground::mc(), GCTAModelAeffBackground::mc(), GCTAModelBackground::mc(), GCTAResponseIrf::nirf(), GCTAModelIrfBackground::npred(), GCTAModelRadialAcceptance::npred(), GCTAModelSpatial::npred(), GCTAResponseIrf::nroi_diffuse(), GCTAResponseIrf::nroi_elliptical(), and GCTAResponseIrf::nroi_radial().
const GModelSpectral * gammalib::cta_model_spectral | ( | const GModelData & | model | ) |
Retrieve spectral component from CTA background model.
[in] | model | Data model. |
Retrieves the spectral component from a CTA background model. If the background model has no spectral component, a NULL pointer will be returned.
Definition at line 834 of file GCTASupport.cpp.
References GCTAModelIrfBackground::spectral(), GCTAModelAeffBackground::spectral(), GCTAModelCubeBackground::spectral(), GCTAModelRadialAcceptance::spectral(), and GCTAModelBackground::spectral().
Referenced by GCTAOnOffObservation::N_bgd().
const GModelTemporal * gammalib::cta_model_temporal | ( | const GModelData & | model | ) |
Retrieve temporal component from CTA background model.
[in] | model | Data model. |
Retrieves the temporal component from a CTA background model. If the background model has no temporal component, a NULL pointer will be returned.
Definition at line 878 of file GCTASupport.cpp.
References GCTAModelIrfBackground::temporal(), GCTAModelAeffBackground::temporal(), GCTAModelCubeBackground::temporal(), GCTAModelRadialAcceptance::temporal(), and GCTAModelBackground::temporal().
const GCTAObservation & gammalib::cta_obs | ( | const std::string & | origin, |
const GObservation & | obs | ||
) |
Retrieve CTA observation from generic observation.
[in] | origin | Method asking for pointer retrieval. |
[in] | obs | Generic observation. |
GException::invalid_argument | Observation obs is not a CTA observations. |
Dynamically casts generic observation into a CTA observation. If the generic observation is not a CTA observation, an exception is thrown.
Definition at line 516 of file GCTASupport.cpp.
References GObservation::id(), and GObservation::name().
Referenced by cta_event_cube(), cta_event_list(), cta_pnt(), cta_rsp_cube(), cta_rsp_irf(), GCTAModelBackground::mc(), GCTAResponseIrf::nirf(), GCTAResponseIrf::nroi_diffuse(), GCTAResponseIrf::nroi_elliptical(), and GCTAResponseIrf::nroi_radial().
const GCTAPointing & gammalib::cta_pnt | ( | const std::string & | origin, |
const GObservation & | obs | ||
) |
Retrieve CTA pointing from generic observation.
[in] | origin | Method asking for pointer retrieval. |
[in] | obs | Generic observation. |
Extract CTA pointing from a CTA observation.
Definition at line 546 of file GCTASupport.cpp.
References cta_obs(), and GCTAObservation::pointing().
Referenced by GCTAModelAeffBackground::aeff_integral(), GCTAModelIrfBackground::eval(), GCTAModelAeffBackground::eval(), GCTAModelRadialAcceptance::eval(), GCTAResponseIrf::irf(), GCTAResponseIrf::irf_diffuse(), GCTAResponseIrf::irf_elliptical(), GCTAResponseIrf::irf_radial(), GCTAModelIrfBackground::mc(), GCTAModelAeffBackground::mc(), GCTAModelRadialAcceptance::mc(), GCTAResponseIrf::mc(), GCTAModelIrfBackground::npred(), GCTAModelRadialAcceptance::npred(), and GCTAModelSpatial::npred().
const GCTAResponse * gammalib::cta_rsp | ( | const std::string & | origin, |
const GResponse & | rsp | ||
) |
Retrieve CTA response from generic observation.
[in] | origin | Method asking for pointer retrieval. |
[in] | rsp | Generic response. |
GException::invalid_argument | Response rsp is not a CTA response. |
Extract CTA response from a CTA observation.
Definition at line 569 of file GCTASupport.cpp.
Referenced by GCTAObservation::response(), and GCTAOnOffObservation::response().
const GCTAAeff & gammalib::cta_rsp_aeff | ( | const std::string & | origin, |
const GObservation & | obs | ||
) |
Retrieve CTA effective area response from generic observation.
[in] | origin | Method asking for pointer retrieval. |
[in] | obs | Generic observation. |
GException::invalid_argument | Observation obs does not contain a CTA effective area response. |
Extract CTA effective area response from a CTA observation.
Definition at line 672 of file GCTASupport.cpp.
References GCTAResponseIrf::aeff(), and cta_rsp_irf().
Referenced by GCTAModelAeffBackground::aeff_integral(), GCTAModelAeffBackground::eval(), and GCTAModelAeffBackground::mc().
const GCTABackground & gammalib::cta_rsp_bkg | ( | const std::string & | origin, |
const GObservation & | obs | ||
) |
Retrieve CTA background response from generic observation.
[in] | origin | Method asking for pointer retrieval. |
[in] | obs | Generic observation. |
GException::invalid_argument | Observation obs does not contain a CTA background response. |
Extract CTA background response from a CTA observation.
Definition at line 704 of file GCTASupport.cpp.
References GCTAResponseIrf::background(), and cta_rsp_irf().
Referenced by GCTAModelIrfBackground::eval(), GCTAModelIrfBackground::mc(), and GCTAModelIrfBackground::npred().
const GCTAResponseCube & gammalib::cta_rsp_cube | ( | const std::string & | origin, |
const GObservation & | obs | ||
) |
Retrieve CTA cube response from generic observation.
[in] | origin | Method asking for pointer retrieval. |
[in] | obs | Generic observation. |
GException::invalid_argument | Observation obs does not contain a CTA cube response. |
Extract CTA cube response from a CTA observation.
Definition at line 636 of file GCTASupport.cpp.
References cta_obs(), and GCTAObservation::response().
Referenced by GCTAModelCubeBackground::eval(), and GCTAModelCubeBackground::npred().
const GCTAResponseIrf & gammalib::cta_rsp_irf | ( | const std::string & | origin, |
const GObservation & | obs | ||
) |
Retrieve CTA IRF response from generic observation.
[in] | origin | Method asking for pointer retrieval. |
[in] | obs | Generic observation. |
GException::invalid_argument | Observation obs does not contain a CTA IRF response. |
Extract CTA IRF response from a CTA observation.
Definition at line 600 of file GCTASupport.cpp.
References cta_obs(), GObservation::id(), GObservation::name(), and GCTAObservation::response().
Referenced by GCTAOnOffObservation::compute_arf(), GCTAOnOffObservation::compute_arf_cut(), GCTAOnOffObservation::compute_rmf(), cta_rsp_aeff(), and cta_rsp_bkg().
bool gammalib::dir_exists | ( | const std::string & | dirname | ) |
Checks if directory exists.
[in] | dirname | Directory name. |
Checks if a directory exists. The function expands any environment variable prior to checking.
Definition at line 1312 of file GTools.cpp.
References expand_env().
Referenced by GCaldb::path(), and GCaldb::rootdir().
Computes log mean energy.
[in] | a | First energy. |
[in] | b | Second energy. |
Computes the logarithmic mean energy \(10^{0.5 * (\log E_{\rm a} + \log E_{\rm b})}\) for two energies.
Definition at line 1290 of file GTools.cpp.
References GEnergy::log10MeV(), GEnergy::MeV(), and pow().
Referenced by GLATEventCube::set_energies(), and GCTAEventCube::set_energies().
double gammalib::erf | ( | const double & | arg | ) |
double gammalib::erfc | ( | const double & | arg | ) |
Computes complementary error function.
[in] | arg | Argument. |
Reference: http://en.wikipedia.org/wiki/Complementary_error_function
Definition at line 450 of file GMath.cpp.
References erf().
Referenced by gauss_integral().
double gammalib::erfinv | ( | const double & | arg | ) |
std::string gammalib::expand_env | ( | const std::string & | arg | ) |
Expand environment variables in string.
[in] | arg | String. |
Expands any environment variable that is found in a string. Valid delimiters for environment variables are $ENV{<name>}, $ENV(<name>), ${<name>}, $(<name>) and $<name> (in the last case the terminating delimiter is either a / or a blank character or the end of the string). Environment variables occuring within single quotes (') are ignored. Environment variables that do not exist will be kept as specified.
The method also replaces ~ or ~user by the user's home directory, ~+ by the value of the PWD environment variable and ~- by the value of the OLDPWD variable. If the user or the PWD or OLDPWD variable are not found, no replacement is done.
This function has been inspired by the function ape_util_expand_env_var from ape_util.c in the ape software developed at HEASARC.
Definition at line 214 of file GTools.cpp.
References getenv().
Referenced by dir_exists(), GFilename::file(), GCaldb::GCaldb(), GCsv::load(), GUrlFile::open(), GFilename::path(), GFilename::protocol(), GCaldb::rootdir(), and GFilename::url().
std::string gammalib::filepath | ( | const std::string & | pathname, |
const std::string & | filename | ||
) |
Build file path from path name and file name.
[in] | pathname | Path name. |
[in] | filename | File name. |
Builds a file path by combining the pathname
and the filename
following
filepath = pathname/filename
If pathname
is an empty string, the method simply returns the filename
.
Definition at line 393 of file GTools.cpp.
Referenced by GCOMInstChars::load(), GCOMD1Response::load(), GCOMD2Response::load(), GCOMResponse::load(), GCTAResponseIrf::load(), spi_hdu(), and spi_num_hdus().
std::string gammalib::fill | ( | const std::string & | s, |
const int & | n | ||
) |
Fill string with n strings of same type.
[in] | s | String to be filled. |
[in] | n | Number of fillings. |
Replicates a given string n time.
Definition at line 1044 of file GTools.cpp.
Referenced by centre(), GLog::header(), left(), GApplication::log_header(), GApplication::log_parameters(), parformat(), GLog::prefix(), GXmlPI::print(), GXmlText::print(), GXmlComment::print(), GXmlDocument::print(), GXmlElement::print(), right(), and GTestSuites::run().
int gammalib::fits_move_to_hdu | ( | const std::string & | caller, |
void * | vptr, | ||
const int & | hdunum = 0 |
||
) |
Move to FITS extension.
[in] | caller | Name of caller. |
[in] | vptr | FITS file void pointer. |
[in] | hdunum | HDU number (optional) |
GException::fits_error | cfitsio error occured. |
If hdunum
is >0, moves the FITS file void pointer to the HDU specified by hdunum
. Otherwise, the FITS file void pointer is moved to the HDU specified by the HDUposition
attribute of the void pointer.
Definition at line 1774 of file GFits.cpp.
References __ffmahd, FPTR, and str().
Referenced by GFitsTable::data_open(), GFitsHeader::load(), GFitsHDU::move_to_hdu(), GFits::open(), GFitsHDU::open(), GFitsImage::open_image(), GFitsHeaderCard::read(), and GFitsHeaderCard::write().
std::string gammalib::gadf_hduclas4 | ( | const GFits & | fits, |
const std::string & | hduclas4 | ||
) |
Return extension name for GADF response table of given HDU class 4.
[in] | fits | FITS file. |
[in] | hduclas4 | HDU class 4. |
Returns the extension name for GADF response table of given HDU class 4. If the response table is not found, an empty extension name is returned.
Definition at line 374 of file GCTASupport.cpp.
References GFitsHDU::extname(), GFitsHDU::has_card(), GFits::size(), GFitsHDU::string(), and strip_whitespace().
Referenced by GCTAEdisp2D::fetch(), GCTABackground2D::load(), GCTABackground3D::load(), GCTAAeff2D::load(), GCTAPsfTable::load(), GCTAPsf2D::load(), GCTAPsfKing::load(), GCTAResponseIrf::load_aeff(), GCTAResponseIrf::load_edisp(), and GCTAResponseIrf::load_psf().
GFilename gammalib::gamma_filename | ( | const std::string & | name | ) |
Returns filename in .gamma directory.
[in] | name | Name of file in .gamma directory. |
Returns the filename of the name of a file in the .gamma directory.
Definition at line 2484 of file GTools.cpp.
References getenv().
Referenced by GDaemon::heartbeat_filename(), host_country(), GDaemon::lock_filename(), GDaemon::recover_valid_xml(), GDaemon::start(), GDaemon::update_host_country(), GDaemon::update_statistics(), and GApplication::write_statistics().
double gammalib::gammln | ( | const double & | arg | ) |
Computes logarithm of gamma function.
[in] | arg | Argument. |
Definition at line 383 of file GMath.cpp.
References log().
Referenced by GRan::poisson(), GModelSpatialRadialGeneralGauss::update(), and GModelSpatialEllipticalGeneralGauss::update().
double gammalib::gauss_integral | ( | const double & | x1, |
const double & | x2 | ||
) |
Returns the integral of a Gaussian function.
[in] | x1 | Lower x boundary (in units of Gaussian sigma). |
[in] | x2 | Upper x boundary (in units of Gaussian sigma). |
Analytically computes
\[\frac{1}{\sqrt{\pi}}\int_{x_1}^{x_2} e^{-\frac{1}{2}x^2} dx\]
Definition at line 605 of file GMath.cpp.
References erfc(), norm(), and sqrt_two.
Referenced by GModelSpectralGauss::flux(), and GCTAEdispPerfTable::prob_erecobin().
std::string gammalib::getenv | ( | const std::string & | arg | ) |
Return value of environment variable.
[in] | arg | Environment variable |
Returns the value of an environment variable arg
. If the environment variable is not found an empty string will be returned.
Definition at line 465 of file GTools.cpp.
Referenced by expand_env(), gamma_filename(), GVOClient::get_hub_lockfile(), GVOHub::get_hub_lockfile(), GApplicationPars::inpath(), GApplicationPars::outpath(), GApplicationPars::pfiles_path(), GCaldb::rootdir(), and tmpnam().
std::string gammalib::host_country | ( | const bool & | force_query = false | ) |
Return two-digit host country code.
[in] | force_query | Force query of host country code? |
Returns two-digit host country code, either by reading the code from the $HOME/.gamma/host-country file, or if the file does not exist, by using the http query http://ip-api.com/line/?fields=countryCode.
The result is saved in a static variable, hence once the country code is retrieved no queries will be executed anymore. The http query is issued using the http_query() method. If the query fails the method returns an empty string.
If no host-country file exists and the method retrieved a two-digit country code it will write the results into a host-country file.
Definition at line 2326 of file GTools.cpp.
References gamma_filename(), http_query(), split(), strip_chars(), and GFilename::url().
Referenced by GApplication::log_trailer(), GDaemon::update_host_country(), and GApplication::write_statistics().
std::string gammalib::http_query | ( | const std::string & | host, |
const std::string & | query | ||
) |
Return response to a HTTP query.
[in] | host | Host address. |
[in] | query | Query string. |
GException::runtime_error | Unable to open or to connect to socket. |
GException::invalid_argument | Host not found. |
Returns response to a HTTP query. Be aware that this method will not work for https servers.
Definition at line 2230 of file GTools.cpp.
References G_HTTP_QUERY.
Referenced by host_country().
|
inline |
Signal if argument is infinite.
[in] | x | Argument. |
x
is infinite, false otherwise.Signals if the argument x
is infinite.
This function has been copied from gnulib.
Definition at line 184 of file GTools.hpp.
Referenced by GCTAModelAeffBackground::aeff_integral(), GResponse::convolve(), GCOMModelDRM::eval(), GCTAModelSpatialGaussSpectrum::eval(), GCOMModelDRBPhibarNodes::eval(), GModelSpectralComposite::eval(), GCTAModelSpatialGradient::eval(), GCOMModelDRBPhibarBins::eval(), GModelSpatialRadialProfile::eval(), GModelSpectralMultiplicative::eval(), GCTAModelSpatialMultiplicative::eval(), GModelSpectralExponential::eval(), GModelSpatialRadialGauss::eval(), GModelSpatialRadialGeneralGauss::eval(), GModelSpatialRadialDisk::eval(), GModelSpatialRadialRing::eval(), GModelSpectralBins::eval(), GModelSpatialEllipticalDisk::eval(), GModelSpatialEllipticalGauss::eval(), GModelSpectralTable::eval(), GCTAModelRadialGauss::eval(), GCTAModelRadialPolynom::eval(), GModelSpatialEllipticalGeneralGauss::eval(), GCTAModelRadialProfile::eval(), GSPIModelDataSpace::eval(), GModelSpectralFunc::eval(), GModelSpectralGauss::eval(), GModelSpectralPlaw::eval(), GModelSpatialRadialShell::eval(), GModelSpectralExpPlaw::eval(), GModelSpectralLogParabola::eval(), GModelSpectralBrokenPlaw::eval(), GModelSpectralExpInvPlaw::eval(), GModelSpectralSuperExpPlaw::eval(), GModelSpectralPlawPhotonFlux::eval(), GModelSpectralPlawEnergyFlux::eval(), cta_npsf_kern_rad_azsym::eval(), GModelSpectralNodes::eval(), GCTAModelIrfBackground::npred_roi_kern_theta::eval(), GModelSpectralSmoothBrokenPlaw::eval(), GCTAModelAeffBackground::npred_roi_kern_theta::eval(), cta_psf_radial_kerns_phi::eval(), GCTAModelSpatial::npred_roi_kern_theta::eval(), GCTAModelIrfBackground::npred_roi_kern_phi::eval(), GCTAModelAeffBackground::npred_roi_kern_phi::eval(), GCTAModelSpatial::npred_roi_kern_phi::eval(), GResponse::edisp_kerns::eval(), GObservation::npred_spec_kern::eval(), cta_irf_radial_kern_rho::eval(), GCTAEdisp2D::edisp_ereco_kern::eval(), cta_irf_radial_kern_omega::eval(), cta_nroi_radial_kern_rho::eval(), cta_nroi_radial_kern_omega::eval(), cta_irf_elliptical_kern_rho::eval(), cta_irf_elliptical_kern_omega::eval(), cta_nroi_elliptical_kern_rho::eval(), cta_nroi_elliptical_kern_omega::eval(), cta_irf_diffuse_kern_theta::eval(), cta_irf_diffuse_kern_phi::eval(), cta_nroi_diffuse_kern_theta::eval(), cta_nroi_diffuse_kern_phi::eval(), cta_psf_radial_kern_rho::eval(), cta_psf_radial_kern_omega::eval(), cta_psf_radial_kern_delta::eval(), cta_psf_radial_kern_phi::eval(), cta_psf_elliptical_kern_rho::eval(), cta_psf_elliptical_kern_omega::eval(), cta_psf_diffuse_kern_delta::eval(), cta_psf_diffuse_kern_phi::eval(), GResponse::eval_prob(), GResponse::eval_probs(), GCOMResponse::irf(), GSPIResponse::irf(), GCTAResponseIrf::irf(), GCTAResponseCube::irf(), GCTAResponseCube::irf_diffuse(), GCTAResponseIrf::irf_diffuse(), GResponse::irf_elliptical(), GCTAResponseCube::irf_elliptical(), GCTAResponseIrf::irf_elliptical(), GCTAResponseCube::irf_ptsrc(), GResponse::irf_radial(), GCTAResponseCube::irf_radial(), GCTAResponseIrf::irf_radial(), GCTAOnOffObservation::likelihood_cstat(), GObservation::likelihood_gaussian_binned(), GObservation::likelihood_poisson_binned(), GObservation::likelihood_poisson_unbinned(), GCTAOnOffObservation::likelihood_wstat(), GCTAResponseIrf::nirf(), GCTAModelIrfBackground::npred(), GCTAModelAeffBackground::npred(), GCTAModelCubeBackground::npred(), GCTAModelSkyCube::npred(), GCTAModelSpatial::npred(), GModelSky::npred(), GObservation::npred_spec(), GCTAResponseIrf::npsf(), GCTAResponseIrf::nroi(), GCTAResponseIrf::nroi_diffuse(), GCTAResponseIrf::nroi_elliptical(), GCTAResponseIrf::nroi_radial(), GCTAPsfTable::precompute(), GModelSpatialDiffuseMap::prepare_map(), GCTAResponseCube::psf_elliptical(), GCTAResponseCube::psf_radial(), GCTAPsfKing::r_max(), roi_arclength(), GIntegral::romberg(), GIntegrals::romberg(), GModelSpatialRadialShell::update(), and GCTAOnOffObservation::wstat_value().
|
inline |
Signal if argument is not a number.
[in] | x | Argument. |
x
is not a number, false otherwise.Signals if the argument x
is not a number.
This function is a very simple kluge. It may not work on all systems.
Definition at line 201 of file GTools.hpp.
Referenced by GCTAModelAeffBackground::aeff_integral(), GResponse::convolve(), GCOMModelDRM::eval(), GCTAModelSpatialGaussSpectrum::eval(), GCOMModelDRBPhibarNodes::eval(), GModelSpectralComposite::eval(), GCTAModelSpatialGradient::eval(), GCOMModelDRBPhibarBins::eval(), GModelSpatialRadialProfile::eval(), GModelSpectralMultiplicative::eval(), GCTAModelSpatialMultiplicative::eval(), GModelSpectralExponential::eval(), GModelSpatialRadialGauss::eval(), GModelSpatialRadialDisk::eval(), GModelSpatialRadialGeneralGauss::eval(), GModelSpatialRadialRing::eval(), GModelSpectralBins::eval(), GModelSpatialEllipticalDisk::eval(), GModelSpatialEllipticalGauss::eval(), GModelSpectralTable::eval(), GCTAModelRadialGauss::eval(), GCTAModelRadialPolynom::eval(), GModelSpatialEllipticalGeneralGauss::eval(), GCTAModelRadialProfile::eval(), GSPIModelDataSpace::eval(), GModelSpectralFunc::eval(), GModelSpectralGauss::eval(), GModelSpectralPlaw::eval(), GModelSpatialRadialShell::eval(), GModelSpectralExpPlaw::eval(), GModelSpectralLogParabola::eval(), GModelSpectralBrokenPlaw::eval(), GModelSpectralExpInvPlaw::eval(), GModelSpectralSuperExpPlaw::eval(), GModelSpectralPlawEnergyFlux::eval(), GModelSpectralPlawPhotonFlux::eval(), cta_npsf_kern_rad_azsym::eval(), GModelSpectralNodes::eval(), GCTAModelIrfBackground::npred_roi_kern_theta::eval(), GModelSpectralSmoothBrokenPlaw::eval(), GCTAModelAeffBackground::npred_roi_kern_theta::eval(), cta_psf_radial_kerns_phi::eval(), GCTAModelSpatial::npred_roi_kern_theta::eval(), GCTAModelIrfBackground::npred_roi_kern_phi::eval(), GCTAModelAeffBackground::npred_roi_kern_phi::eval(), GCTAModelSpatial::npred_roi_kern_phi::eval(), GResponse::edisp_kerns::eval(), GObservation::npred_spec_kern::eval(), cta_irf_radial_kern_rho::eval(), GCTAEdisp2D::edisp_ereco_kern::eval(), cta_irf_radial_kern_omega::eval(), cta_nroi_radial_kern_rho::eval(), cta_nroi_radial_kern_omega::eval(), cta_irf_elliptical_kern_rho::eval(), cta_irf_elliptical_kern_omega::eval(), cta_nroi_elliptical_kern_rho::eval(), cta_nroi_elliptical_kern_omega::eval(), cta_irf_diffuse_kern_theta::eval(), cta_irf_diffuse_kern_phi::eval(), cta_nroi_diffuse_kern_theta::eval(), cta_nroi_diffuse_kern_phi::eval(), cta_psf_radial_kern_rho::eval(), cta_psf_radial_kern_omega::eval(), cta_psf_radial_kern_delta::eval(), cta_psf_radial_kern_phi::eval(), cta_psf_elliptical_kern_rho::eval(), cta_psf_elliptical_kern_omega::eval(), cta_psf_diffuse_kern_delta::eval(), cta_psf_diffuse_kern_phi::eval(), GResponse::eval_prob(), GResponse::eval_probs(), GCOMResponse::irf(), GSPIResponse::irf(), GCTAResponseIrf::irf(), GCTAResponseCube::irf(), GCTAResponseCube::irf_diffuse(), GCTAResponseIrf::irf_diffuse(), GResponse::irf_elliptical(), GCTAResponseCube::irf_elliptical(), GCTAResponseIrf::irf_elliptical(), GCTAResponseCube::irf_ptsrc(), GResponse::irf_radial(), GCTAResponseCube::irf_radial(), GCTAResponseIrf::irf_radial(), GCTAResponseIrf::nirf(), GCTAModelIrfBackground::npred(), GCTAModelAeffBackground::npred(), GCTAModelCubeBackground::npred(), GCTAModelSkyCube::npred(), GCTAModelSpatial::npred(), GModelSky::npred(), GObservation::npred_spec(), GCTAResponseIrf::npsf(), GCTAResponseIrf::nroi(), GCTAResponseIrf::nroi_diffuse(), GCTAResponseIrf::nroi_elliptical(), GCTAResponseIrf::nroi_radial(), GCTAPsfTable::precompute(), GModelSpatialDiffuseMap::prepare_map(), GCTAResponseCube::psf_elliptical(), GCTAResponseCube::psf_radial(), roi_arclength(), GIntegral::romberg(), GIntegrals::romberg(), GModelSpatialRadialShell::update(), and GCTAOnOffObservation::wstat_value().
int gammalib::iter_phi | ( | const double & | rho, |
const double & | resolution, | ||
const int & | iter_min, | ||
const int & | iter_max | ||
) |
Determine number of azimuthal Romberg iterations.
[in] | rho | Radial offset (radians). |
[in] | resolution | Requested angular resolution (radians). |
[in] | iter_min | Minimum number of iterations. |
[in] | iter_max | Maximum number of iterations. |
Determines the number of azimuthal Romberg iterations using the formula
\[ iter = \log_2 \left( \frac{2\pi \rho}{resolution} \right) + 1 \]
where \(\rho\) is the radial offset and \(resolution\) is the required angular resolution.
The result will be constrained to the interval [iter_min
,iter_max
].
Definition at line 478 of file GCTASupport.cpp.
References inv_ln2, log(), resolution(), and twopi.
Referenced by GCTAModelAeffBackground::aeff_integral(), GCTAModelSpatial::npred_roi_kern_theta::eval(), cta_irf_diffuse_kern_theta::eval(), cta_psf_diffuse_kern_delta::eval(), GCTAResponseIrf::irf_elliptical(), GCTAResponseIrf::irf_radial(), GCTAModelIrfBackground::npred(), GCTAResponseIrf::nroi_diffuse(), GCTAResponseIrf::nroi_elliptical(), GCTAResponseIrf::nroi_radial(), GCTAResponseCube::psf_elliptical(), and GCTAResponseCube::psf_radial().
int gammalib::iter_rho | ( | const double & | rho_max, |
const double & | resolution, | ||
const int & | iter_min, | ||
const int & | iter_max | ||
) |
Determine number of radial Romberg iterations.
[in] | rho_max | Maximum radial offset (radians). |
[in] | resolution | Requested angular resolution (radians). |
[in] | iter_min | Minimum number of iterations. |
[in] | iter_max | Maximum number of iterations. |
Determines the number of radial Romberg iterations using the formula
\[ iter = \log_2 \left( \frac{\rho_{\rm max}}{resolution} \right) + 1 \]
where \(\rho_{\rm max}\) is the maximum radial offset and \(resolution\) is the required angular resolution.
The result will be constrained to the interval [iter_min
,iter_max
].
Definition at line 432 of file GCTASupport.cpp.
References inv_ln2, log(), and resolution().
Referenced by GCTAResponseIrf::irf_diffuse(), GCOMResponse::irf_elliptical(), GCTAResponseIrf::irf_elliptical(), GCOMResponse::irf_radial(), GCTAResponseIrf::irf_radial(), GCTAModelSpatial::npred(), GCTAResponseIrf::nroi_diffuse(), GCTAResponseIrf::nroi_elliptical(), GCTAResponseIrf::nroi_radial(), GCTAResponseCube::psf_diffuse(), and GCTAResponseCube::psf_elliptical().
std::string gammalib::left | ( | const std::string & | s, |
const int & | n, | ||
const char & | c = ' ' |
||
) |
Left justify string to achieve a length of n characters.
[in] | s | String to be left justified. |
[in] | n | Requested total width. |
[in] | c | Fill character. |
Left justify string by adding c
to the right to achieve a length of n
characters.
Definition at line 1070 of file GTools.cpp.
References fill().
Referenced by GApplication::log_header(), GFitsHeaderCard::print(), GFitsTableByteCol::resize_data(), GFitsTableFloatCol::resize_data(), GFitsTableShortCol::resize_data(), GFitsTableLongCol::resize_data(), GFitsTableLongLongCol::resize_data(), GFitsTableDoubleCol::resize_data(), GFitsTableUShortCol::resize_data(), GFitsTableULongCol::resize_data(), GFitsTableCDoubleCol::resize_data(), GFitsTableCFloatCol::resize_data(), GFitsTableStringCol::resize_data(), and GFitsTableBoolCol::resize_data().
cta_omega_intervals gammalib::limit_omega | ( | const double & | min, |
const double & | max, | ||
const double & | domega | ||
) |
Limit omega interval.
[in] | min | Interval minimum (radians). |
[in] | max | Interval maximum (radians). |
[in] | domega | Half length of interval (radians). |
Limits an omega interval [min
,max
] to the interval specified by [-domega
,domega
]. This may lead to a split of [min
,max
] in several intervals. The method thus returns a vector of intervals that overlap with [-domega
,domega
]. If there is no overlap with the interval, the method returns an empty vector.
The method takes care of wrap arounds. It is assumed that on input [min
,max
] is contained within [-2pi,+2pi].
Definition at line 90 of file GCTAResponse_helpers.cpp.
References max(), min(), pi, and twopi.
Referenced by cta_irf_elliptical_kern_rho::eval(), cta_nroi_elliptical_kern_rho::eval(), and cta_psf_elliptical_kern_rho::eval().
double gammalib::modulo | ( | const double & | v1, |
const double & | v2 | ||
) |
Returns the remainder of the division.
[in] | v1 | Nominator. |
[in] | v2 | Denominator. |
Returns the remainder of the division v1/v2. The result is non-negative. v1 can be positive or negative; v2 must be positive.
Definition at line 526 of file GMath.cpp.
Referenced by GHealpix::ang2pix_z_phi_nest(), GHealpix::ang2pix_z_phi_ring(), GSkyDir::euler(), and GHealpix::interpolator().
std::string gammalib::number | ( | const std::string & | noun, |
const int & | number | ||
) |
Convert singular noun into number noun.
[in] | noun | Singular noun. |
[in] | number | Number of instance of noun. |
Converts a singular noun into a number noun by appending a "s" to the noun if the number
of the instances of the noun is not one.
Definition at line 1167 of file GTools.cpp.
Referenced by GMatrixSparse::add_to_column(), GMatrixSparse::column(), GSkyMap::create_healpix_hdu(), GFitsTable::data_open(), GModelAssociations::get_association_xml(), GModelAssociation::get_property_xml(), GOptimizerPars::GOptimizerPars(), GModelSpatialRadialProfile::num_nodes(), GCOMDri::num_skipped_superpackets(), GCOMDri::num_superpackets(), GCOMDri::num_used_superpackets(), GMatrixSparse::stack_push_column(), xml2str(), xml_check_parnum(), xml_get_par(), and xml_need_par().
std::string gammalib::parformat | ( | const std::string & | s, |
const int & | indent = 0 |
||
) |
Convert string in parameter format.
[in] | s | String to be converted. |
[in] | indent | Indentation of parameter. |
Converts and string into the parameter format of type "s ......: " with a total length of G_PARFORMAT_LENGTH.
Definition at line 1143 of file GTools.cpp.
References fill(), and G_PARFORMAT_LENGTH.
Referenced by GApplication::log_value(), GLATEfficiency::print(), GCOMRoi::print(), GLATRoi::print(), GCOMInstDir::print(), GPulsarEphemeris::print(), GCOMOad::print(), GCOMStatus::print(), GBilinear::print(), GCOMBvc::print(), GUrlFile::print(), GFftWavetable::print(), GEphemerides::print(), GDaemon::print(), GCOMSelection::print(), GUrlString::print(), GCTARoi::print(), GVOHub::print(), GModelSpectralTablePar::print(), GPhases::print(), GCOMTim::print(), GModelSpatialRadialProfileGauss::print(), GPhotons::print(), GTimes::print(), GModelSpatialRadialProfileDMBurkert::print(), GModelSpatialRadialProfileDMEinasto::print(), GModelSpatialRadialProfileDMZhao::print(), GCTAModelRadialRegistry::print(), GModelRegistry::print(), GObservationRegistry::print(), GPulsar::print(), GWcsRegistry::print(), GRan::print(), GCOMIaq::print(), GModelSpectralRegistry::print(), GModelTemporalRegistry::print(), GLATObservation::print(), GOptimizerLM::print(), GCTAModelSpatialRegistry::print(), GModelSpatialRegistry::print(), GCTAModelSpatialGaussSpectrum::print(), GCOMModelDRM::print(), GMWLObservation::print(), GCTAModelIrfBackground::print(), GModelAssociation::print(), GSkyDirs::print(), GCOMInstChars::print(), GCTAModelSpatialGradient::print(), GModelSpatialComposite::print(), GCTAModelAeffBackground::print(), GMWLSpectrum::print(), GCOMHkd::print(), GCTAModelSpatialMultiplicative::print(), GModelSpatialDiffuseConst::print(), GCTAAeffPerfTable::print(), GCOMModelDRBPhibarBins::print(), GCOMModelDRBPhibarNodes::print(), GCTABackgroundPerfTable::print(), GCOMEventList::print(), GHealpix::print(), GCOMD1Response::print(), GModelTemporalConst::print(), GSPIObservation::print(), GLATEventCube::print(), GCOMOads::print(), GResponseVectorCache::print(), GFitsTable::print(), GCTAAeffArf::print(), GModelSpectralTablePars::print(), GLATEventList::print(), GLATMeanPsf::print(), GLATResponse::print(), GFitsImage::print(), GModelAssociations::print(), GDerivative::print(), GCTAModelCubeBackground::print(), GCOMEventCube::print(), GModelSpectralComposite::print(), GModelSpectralMultiplicative::print(), GCOMD2Response::print(), GLATResponseTable::print(), GSPIEventCube::print(), GCTAModelRadialAcceptance::print(), GCTAModelRadialGauss::print(), GVOClient::print(), GCTABackground2D::print(), GCTAPointing::print(), GCTABackground3D::print(), GCTAModelRadialPolynom::print(), GCTAAeff2D::print(), GModelSpatialDiffuseMap::print(), GModelSpectralExponential::print(), GCOMBvcs::print(), GCOMHkds::print(), GCOMResponse::print(), GCTAModelRadialProfile::print(), GCOMDri::print(), GModelSpatialRadialGauss::print(), GLATPsf::print(), GCTAModelBackground::print(), GModelSpatialRadialDisk::print(), GModelSpatialRadialGeneralGauss::print(), GLATEdisp::print(), GModelTemporalLightCurve::print(), GIntegrals::print(), GCTAEventList::print(), GCOMDris::print(), GCTAModelSpatialLookup::print(), GModelSpatialRadialRing::print(), GModelSpectralBins::print(), GIntegral::print(), GSPIModelDataSpace::print(), GCTAModelSkyCube::print(), GModelSpatialEllipticalDisk::print(), GCTACubeBackground::print(), GModelSpectralTable::print(), GModelSpectralConst::print(), GSPIResponse::print(), GModelSpatialEllipticalGauss::print(), GOptimizerPars::print(), GFft::print(), GTestSuites::print(), GModelSpatialEllipticalGeneralGauss::print(), GSkyRegions::print(), GCsv::print(), GModelSpatialPointSource::print(), GCTAEventCube::print(), GSkyRegionCircle::print(), GModelSpatialDiffuseCube::print(), GLATLtCubeMap::print(), GModelSpectralFunc::print(), GModelSpectralGauss::print(), GLATAeff::print(), GCTAPsfVector::print(), GCTAPsfPerfTable::print(), GModelSpectralPlaw::print(), GCTAResponseIrf::print(), GCTACubeExposure::print(), GResponseCache::print(), GModelSpatialRadialShell::print(), GCTAObservation::print(), GCTAPsf2D::print(), GCTAPsfTable::print(), GCTAPsfKing::print(), GCaldb::print(), GTimeReference::print(), GFitsTableCol::print(), GModelSpectralExpPlaw::print(), GModelSpectralLogParabola::print(), GApplicationPar::print(), GModelSpectralBrokenPlaw::print(), GCTAEdispRmf::print(), GSkyRegionRectangle::print(), GEnergies::print(), GCTAResponseCube::print(), GModelSpectralExpInvPlaw::print(), GModelSpectralSuperExpPlaw::print(), GFilename::print(), GModelTemporalPhaseCurve::print(), GCTACubePsf::print(), GNodeArray::print(), GRmf::print(), GCOMObservation::print(), GCTACubeEdisp::print(), GGti::print(), GArf::print(), GCTAEdispPerfTable::print(), GModelSpectralPlawPhotonFlux::print(), GCTAResponseTable::print(), GModelSpectralPlawEnergyFlux::print(), GCTAOnOffObservation::print(), GModelSpectralNodes::print(), GModelSpectralSmoothBrokenPlaw::print(), GMatrixSymmetric::print(), GFits::print(), GTestSuite::print(), GEbounds::print(), GMatrix::print(), GApplication::print(), GCTAEdisp2D::print(), GObservations::print(), GPha::print(), GModelSky::print(), GOptimizerPar::print(), GSkyMap::print(), GModels::print(), GMatrixSparse::print(), GModel::print_attributes(), GMatrixBase::print_col_compression(), GFitsHDU::print_hdu(), GMatrixBase::print_row_compression(), and GWcs::wcs_print().
double gammalib::plaw_energy_flux | ( | const double & | emin, |
const double & | emax, | ||
const double & | epivot, | ||
const double & | gamma | ||
) |
Compute energy flux between two energies for a power law.
[in] | emin | Minimum energy. |
[in] | emax | Maximum energy. |
[in] | epivot | Pivot energy. |
[in] | gamma | Spectral index. |
Analytically computes
\[\int_{E_{\rm min}}^{E_{\rm max}} \left( E/E_{\rm pivot} \right)^{\gamma} E dE\]
where \(E_{\rm min}\) and \(E_{\rm max}\) are the minimum and maximum energy, respectively, and \(E_{\rm pivot}\) is the pivot energy, and \(\gamma\) is the spectral index.
Definition at line 1248 of file GTools.cpp.
References abs(), log(), and pow().
Referenced by GModelSpectralBins::eflux(), GModelSpectralTable::eflux(), GModelSpectralFunc::eflux(), GModelSpectralPlaw::eflux(), GModelSpectralBrokenPlaw::eflux(), GModelSpectralNodes::eflux(), GModelSpectralFunc::set_cache(), GModelSpectralNodes::set_flux_cache(), and GModelSpectralTable::update_flux().
double gammalib::plaw_integral | ( | const double & | x1, |
const double & | f1, | ||
const double & | x2, | ||
const double & | f2 | ||
) |
Returns the integral of a power law.
[in] | x1 | First x value. |
[in] | f1 | Power law value at first x value. |
[in] | x2 | Second x value. |
[in] | f2 | Power law value at second x value. |
Analytically computes
\[\int_{x_1}^{x_2} F_1 \left( \frac{x}{x_1} \right)^m dx\]
where
\[m = \frac{\ln (F_2 / F_1)}{\ln (x_2 / x_1)}\]
and \(F_1\) is the power law value at point \(x_1\) and \(F_2\) is the power law value at point \(x_2\).
Definition at line 566 of file GMath.cpp.
References abs(), log(), and pow().
Referenced by GCTABackgroundPerfTable::rate_ebin(), GCTABackground2D::rate_ebin(), and GCTABackground3D::rate_ebin().
double gammalib::plaw_photon_flux | ( | const double & | emin, |
const double & | emax, | ||
const double & | epivot, | ||
const double & | gamma | ||
) |
Compute photon flux between two energies for a power law.
[in] | emin | Minimum energy. |
[in] | emax | Maximum energy. |
[in] | epivot | Pivot energy. |
[in] | gamma | Spectral index. |
Analytically computes
\[\int_{E_{\rm min}}^{E_{\rm max}} \left( E/E_{\rm pivot} \right)^{\gamma} dE\]
where \(E_{\rm min}\) and \(E_{\rm max}\) are the minimum and maximum energy, respectively, and \(E_{\rm pivot}\) is the pivot energy, and \(\gamma\) is the spectral index.
Definition at line 1200 of file GTools.cpp.
References abs(), log(), and pow().
Referenced by GModelSpectralBins::flux(), GModelSpectralTable::flux(), GModelSpectralFunc::flux(), GModelSpectralPlaw::flux(), GModelSpectralBrokenPlaw::flux(), GModelSpectralNodes::flux(), GModelSpectralBins::mc_update(), GModelSpectralFunc::mc_update(), GModelSpectralNodes::mc_update(), GModelSpectralFunc::set_cache(), GModelSpectralNodes::set_flux_cache(), GModelSpectralTable::update_flux(), GModelSpectralTable::update_mc(), and GModelSpectralBrokenPlaw::update_mc_cache().
Read energy boundary data sub-space keywords.
[in] | hdu | FITS HDU |
GException::invalid_value | Invalid energy data sub-space encountered |
Reads the energy boundary data sub-space keywords by searching for a DSTYPx keyword named "ENERGY". The data sub-space information is expected to be in the format "200:50000", where the 2 arguments are the minimum and maximum energy. The energy unit is given by the keyword DSUNIx, which supports keV, MeV, GeV and TeV (case independent). No detailed syntax checking is performed.
Definition at line 180 of file GCTASupport.cpp.
References GEbounds::append(), G_READ_DS_EBOUNDS, GFitsHDU::has_card(), GFitsHDU::integer(), split(), str(), GFitsHDU::string(), and todouble().
Referenced by GCTAEventList::read().
std::string gammalib::read_ds_gti_extname | ( | const GFitsHDU & | hdu | ) |
Return Good Time Intervals extension name from data sub-space keywords.
[in] | hdu | FITS HDU |
GException::invalid_value | Invalid Good Time Intervals data sub-space encountered |
Returns the name of the FITS extension that contains the Good Time Intervals by screening the data sub-space keywords that are present in the FITS header. The method searches for a DSTYPx keyword named "TIME" and a corresponding DSVALx keyword named "TABLE", and the extension name is extracted from the corresponding DSREFx keyword. Note that by convention the extension name is preceeded by a colon, which is stripped by this method.
Definition at line 308 of file GCTASupport.cpp.
References G_READ_DS_GTI, GFitsHDU::has_card(), GFitsHDU::integer(), str(), GFitsHDU::string(), strip_chars(), and strip_whitespace().
Referenced by GCTAEventList::read().
Read phase boundary data sub-space keywords.
[in] | hdu | FITS HDU |
GException::invalid_value | Invalid phase data sub-space encountered |
Reads the phase boundary data sub-space keywords by searching for a DSTYPx keyword named "PHASE". The data sub-space information is expected to be in the format "0.1:0.3,0.5:0.7", where each subset of numbers represents the minimum and maximum phase. No detailed syntax checking is performed.
Definition at line 242 of file GCTASupport.cpp.
References GPhases::append(), G_READ_DS_PHASE, GFitsHDU::has_card(), GFitsHDU::integer(), split(), str(), GFitsHDU::string(), and todouble().
Referenced by GCTAEventList::read().
Extract ROI from data sub-space keywords.
[in] | hdu | FITS HDU |
GException::invalid_value | Invalid ROI data sub-space encountered |
Reads the ROI data sub-space keywords by searching for a DSTYPx keyword named "POS(RA,DEC)". The data sub-space information is expected to be in the format "CIRCLE(267.0208,-24.78,4.5)", where the 3 arguments are Right Ascension, Declination and radius in units of degrees. No detailed syntax checking is performed.
If no ROI information has been found, an GCTARoi object with initial values will be returned.
Definition at line 92 of file GCTASupport.cpp.
References GCTARoi::centre(), G_READ_DS_ROI, GFitsHDU::has_card(), GCTAPointing::instdir(), GFitsHDU::integer(), GSkyDir::radec_deg(), GCTARoi::radius(), GFitsHDU::real(), split(), str(), GFitsHDU::string(), strip_chars(), and todouble().
Referenced by GCTAEventList::read().
int gammalib::recv | ( | int | fd, |
char * | buffer, | ||
int | len, | ||
int | flags, | ||
int | timeout | ||
) |
Checks whether a parameter has occured once.
[in] | fd | Socket file descriptor. |
[out] | buffer | Buffer to hold data. |
[in] | len | Maximum number of bytes to recv(). |
[in] | flags | Flags (as the fourth param to recv() ). |
[in] | timeout | Timeout in milliseconds. |
This function implements the recv() function with a timeout. The timeout is specified in milliseconds.
Definition at line 2036 of file GTools.cpp.
Referenced by GVOHub::handle_request(), and GVOClient::receive_string().
Reduce chattiness by one level.
[in] | chatter | Chattiness. |
Definition at line 65 of file GTypemaps.hpp.
References EXPLICIT, NORMAL, SILENT, TERSE, and VERBOSE.
Referenced by GLATObservation::print(), GSPIObservation::print(), GFitsTable::print(), GCOMOads::print(), GLATEventCube::print(), GLATResponse::print(), GFitsImage::print(), GCOMDri::print(), GCOMBvcs::print(), GCTAEventList::print(), GLATLtCube::print(), GCTAEventCube::print(), GLATLtCubeMap::print(), GCTAResponseIrf::print(), GCTAObservation::print(), GCTAResponseCube::print(), GCOMObservation::print(), GCTAEdispPerfTable::print(), GCTAOnOffObservation::print(), GFits::print(), GObservations::print(), and GSkyMap::print().
std::string gammalib::replace_segment | ( | const std::string & | arg, |
const std::string & | segment, | ||
const std::string & | replacement | ||
) |
Replace string segment in string.
[in] | arg | String in which character segements are to be replaced |
[in] | segment | String segment to be replaced. |
[in] | replacement | Replacement string. |
Replaces string segments by a replacement string in a given string.
If the input string arg
is "Wonderful", the segment
is "onder" and the replacement
is "ish" the method will return "Wishful".
Definition at line 168 of file GTools.cpp.
Referenced by GPulsar::load_psrtime(), and GFitsTable::update_header().
double gammalib::resolution | ( | const GModelSpatial * | model | ) |
Determine resolution of spatial model.
[in] | model | Pointer to spatial model. |
Determine the resolution of a spatial model. So far the method only works for a spatial map or cube model holding a WCS projection. If a constant spatial model is encountered a resolution of 180 deg is returned.
If the resolution of the model could not be determined, the method returns a resolution of 0.01 deg.
Definition at line 178 of file GCTAResponse_helpers.cpp.
References abs(), GWcs::cdelt(), GModelSpatialDiffuseCube::cube(), deg2rad, GModelSpatialDiffuseMap::map(), pi, and GSkyMap::projection().
Referenced by GCTAResponseIrf::irf_diffuse(), iter_phi(), iter_rho(), GCTAResponseCube::psf_diffuse(), and GSkyRegionMap::set_region_circle().
std::string gammalib::right | ( | const std::string & | s, |
const int & | n, | ||
const char & | c = ' ' |
||
) |
Right justify string to achieve a length of n characters.
[in] | s | String to be right justified. |
[in] | n | Requested total width. |
[in] | c | Fill character. |
Right justify string by adding c
to the left to achieve a length of n
characters.
Definition at line 1094 of file GTools.cpp.
References fill().
Referenced by GFitsHeaderCard::print(), and GFitsTableCol::print().
double gammalib::roi_arclength | ( | const double & | rad, |
const double & | dist, | ||
const double & | cosdist, | ||
const double & | sindist, | ||
const double & | roi, | ||
const double & | cosroi | ||
) |
Returns length of circular arc within circular ROI.
[in] | rad | Circle radius in radians (<pi). |
[in] | dist | Circle centre distance to ROI centre (<pi). |
[in] | cosdist | Cosine of circle centre distance to ROI centre. |
[in] | sindist | Sinus of circle centre distance to ROI centre. |
[in] | roi | Radius of ROI in radians. |
[in] | cosroi | Cosine of ROI radius. |
This method returns the arclength in radians of a circle of radius 'rad' with a centre that is offset by 'dist' from the ROI centre, where the ROI radius is given by 'roi'. To speed-up computations, the cosines and sinus of 'roi' and 'psf' should be calculated by the client and be passed to the method.
Definition at line 2107 of file GTools.cpp.
References acos(), cos(), is_infinite(), is_notanumber(), sin(), and twopi.
Referenced by cta_psf_radial_kerns_delta::eval(), cta_npsf_kern_rad_azsym::eval(), GCTAModelRadialAcceptance::roi_kern::eval(), cta_irf_radial_kern_rho::eval(), cta_nroi_radial_kern_rho::eval(), cta_irf_elliptical_kern_rho::eval(), cta_nroi_elliptical_kern_rho::eval(), cta_psf_radial_kern_rho::eval(), cta_psf_radial_kern_delta::eval(), and cta_psf_elliptical_kern_rho::eval().
std::string gammalib::rstrip_chars | ( | const std::string & | arg, |
const std::string & | chars | ||
) |
Strip trailing character from string.
[in] | arg | String from which character should be stripped. |
[in] | chars | Character(s) to be stripped. |
Definition at line 131 of file GTools.cpp.
Referenced by GPulsar::load_parfile().
void gammalib::sincosd | ( | const double & | angle, |
double * | s, | ||
double * | c | ||
) |
Compute sine and cosine of angle in degrees.
[in] | angle | Angle [degrees]. |
[out] | s | Sine of angle. |
[out] | c | Cosine of angle. |
This code has been adapted from the WCSLIB function wcstrig.c::sincosd().
Definition at line 342 of file GMath.cpp.
References abs(), cos(), deg2rad, and sin().
Referenced by GWcs::cel_set(), GWcsTAN::prj_s2x(), GWcsAIT::prj_s2x(), GWcsSIN::prj_s2x(), GWcsSTG::prj_s2x(), GWcsARC::prj_s2x(), GWcsAZP::prj_s2x(), GWcs::sph_s2x(), and GWcs::sph_x2s().
double gammalib::sind | ( | const double & | angle | ) |
Compute sine of angle in degrees.
[in] | angle | Angle in degrees |
This code has been adapted from the WCSLIB function wcstrig.c::sind().
Definition at line 163 of file GMath.cpp.
References abs(), deg2rad, and sin().
Referenced by GWcs::cel_set(), GWcsTAN::prj_s2x(), GWcsSTG::prj_s2x(), GWcsSIN::prj_s2x(), and GWcsAZP::prj_set().
GTimes gammalib::spi_annealing_start_times | ( | void | ) |
Return start time of annealing operations.
Returns the start time of the SPI annealing operations.
Source: https://www.cosmos.esa.int/web/integral/long-term-plan
Definition at line 248 of file GSPITools.cpp.
References GTimes::append().
Referenced by GSPIModelDataSpace::add_gedanneal().
GTimes gammalib::spi_gedfail_times | ( | void | ) |
Return times of detector failures.
Returns the times of detector failures.
Definition at line 301 of file GSPITools.cpp.
References GTimes::append().
Referenced by GSPIModelDataSpace::add_gedfail().
const GFitsTable * gammalib::spi_hdu | ( | const GFits & | fits, |
const std::string & | extname, | ||
const int & | extver = 1 |
||
) |
Return FITS table.
[in] | fits | FITS file. |
[in] | extname | Extension name. |
[in] | extver | Extension version. |
Returns the HDU with a specific extension name and version from the FITS file. The method searched in the FITS file as well as grouping tables and nested grouping tables.
The method allocates a copy of the HDU, hence the client needs to deallocate the HDU after usage.
Definition at line 57 of file GSPITools.cpp.
References GFitsTable::clone(), GFitsHDU::extname(), GFits::filename(), filepath(), GFitsHDU::has_card(), GFitsHDU::integer(), GFitsTable::nrows(), GFilename::path(), GFits::size(), and GFitsHDU::string().
Referenced by GSPIResponse::load_irfs(), GSPIEventCube::read(), and GSPIEventCube::read_models().
GTime gammalib::spi_ijd2time | ( | const double & | ijd | ) |
Convert IJD to GTime.
[in] | ijd | INTEGRAL Julian Days (days). |
Converts time given in INTEGRAL Julian Days into a GTime object.
Definition at line 225 of file GSPITools.cpp.
References GTime::mjd().
Referenced by GSPIEventCube::read_gti().
int gammalib::spi_num_hdus | ( | const GFits & | fits, |
const std::string & | extname | ||
) |
Return number of HDU versions.
[in] | fits | FITS file. |
[in] | extname | Extension name. |
Returns the number of HDU versions with a specific extension name in the FITS file and associated or nested grouping tables.
Definition at line 166 of file GSPITools.cpp.
References GFitsHDU::extname(), GFits::filename(), filepath(), GFitsTable::nrows(), GFilename::path(), GFits::size(), and GFitsHDU::string().
Referenced by GSPIResponse::load_irfs(), and GSPIEventCube::read().
std::vector< std::string > gammalib::split | ( | const std::string & | s, |
const std::string & | sep | ||
) |
Split string.
[in] | s | String to be splitted. |
[in] | sep | Separator(s). |
Splits a string on the basis of one or multiple separator characters. The separator characters are provided by the sep
argument. Subsequent separator characters that are not seperated by some other characters will lead to an empty string element, except for a blank separator where subsequent blanks are takens as a single separator. Below a few examples that illustrate how the function will split a given string.
"Name;RA;DEC" => ["Name","RA","DEC"] (sep=";") "My house is red" => ["My","house","is","red"] (sep=" ") "IRF::FRONT" => ["IRF","","FRONT"] (sep=":") "Fields;RA,DEC,Flux" => ["Fields","RA","DEC","Flux"] (sep=";,") "Last;Field;" => ["Last","Field",""] (sep=";")
Definition at line 983 of file GTools.cpp.
Referenced by GApplicationPar::check_options(), GFitsTable::data_open(), GXmlNode::element(), host_country(), GModel::ids(), GApplicationPars::inpath(), GModel::instruments(), GCTABackgroundPerfTable::load(), GCTAAeffPerfTable::load(), GCTAPsfPerfTable::load(), GPulsar::load(), GCsv::load(), GCTAEdispPerfTable::load(), GLATResponse::load(), GPulsar::load_parfile(), GPulsar::load_psrtime(), GApplicationPars::outpath(), GApplicationPars::pfiles_path(), GSkyRegionCircle::read(), GSkyRegionRectangle::read(), read_ds_ebounds(), read_ds_phase(), read_ds_roi(), GCTAObservation::save(), GCTAModelSpatialMultiplicative::write(), GModelSpectralComposite::write(), and GModelSpectralMultiplicative::write().
std::string gammalib::str | ( | const unsigned short int & | value | ) |
Convert unsigned short integer value into string.
[in] | value | Unsigned short integer to be converted into string. |
Definition at line 489 of file GTools.cpp.
Referenced by GIntegral::adaptive_simpson(), GMatrixSymmetric::add_to_column(), GMatrix::add_to_column(), GMatrixSparse::add_to_column(), GMatrixSymmetric::add_to_row(), GMatrix::add_to_row(), GCTAModelAeffBackground::aeff_integral(), GMatrixSymmetric::alloc_members(), angle(), GModelAssociations::append(), GModelSpectralTablePars::append(), GApplicationPars::append(), GCTAModelSpatialMultiplicative::append(), GCsv::append(), GModelSpatialComposite::append(), GModelSpectralComposite::append(), GModelSpectralMultiplicative::append(), GArf::append(), GModelSpectralFunc::append(), GPha::append(), GObservations::append(), GModelSpectralNodes::append(), GModels::append(), GCTAResponseTable::append_axis(), GCTAEventList::append_column(), GCTAOnOffObservation::arf_rad_max(), GFitsTableCDoubleCol::ascii_format(), GFitsTableCFloatCol::ascii_format(), GFitsTableStringCol::ascii_format(), GFitsTableBitCol::ascii_format(), GFitsTableBoolCol::ascii_format(), GFits::at(), GNdarray::at(), GFft::backward(), GWcs::cel_set(), check_prj_s2x_status(), check_prj_x2s_status(), GMatrixSymmetric::cholesky_decompose(), GSparseNumeric::cholesky_numeric_analysis(), GMatrixSymmetric::cholesky_solver(), GMatrixSparse::cholesky_solver(), GSparseSymbolic::cholesky_symbolic_analysis(), GMatrixSymmetric::column(), GMatrix::column(), GMatrixSparse::column(), GCOMDri::compute_dre(), GCOMDris::compute_drws(), GCOMDri::compute_tof_correction(), GCTAPsfVector::containment_radius(), GCTAPsfPerfTable::containment_radius(), GCTAPsfTable::containment_radius(), GCTAPsf2D::containment_radius(), GCTAPsfKing::containment_radius(), GResponse::convolve(), GFitsHeaderCard::copy_dtype(), cross(), GSparseSymbolic::cs_amd(), GCOMStatus::d1status(), GCOMStatus::d2status(), GFitsTable::data_open(), GFitsTable::data_save(), GFitsTableCol::elements(), GModelSpatialDiffuseCube::energies(), GEphemerides::ephemeris(), GPulsar::ephemeris(), GCOMModelDRBPhibarBins::eval(), GModelSpatialRadialGauss::eval(), GModelSpatialRadialGeneralGauss::eval(), GModelSpectralPlaw::eval(), GModelData::eval(), GCTAModelIrfBackground::npred_roi_kern_theta::eval(), GCTAModelAeffBackground::npred_roi_kern_theta::eval(), cta_psf_radial_kerns_phi::eval(), GCTAModelSpatial::npred_roi_kern_theta::eval(), GCTAModelIrfBackground::npred_roi_kern_phi::eval(), GCTAModelAeffBackground::npred_roi_kern_phi::eval(), GCTAModelSpatial::npred_roi_kern_phi::eval(), GModelAssociations::extend(), GModelSpectralTablePars::extend(), GApplicationPars::extend(), GObservations::extend(), GModels::extend(), GSkyMap::extract(), GMatrix::extract_lower_triangle(), GTime::extract_timesys(), GMatrix::extract_upper_triangle(), GOptimizerPar::factor_max(), GOptimizerPar::factor_min(), GOptimizerPar::factor_value(), GCTAEventList::fetch(), GVOTable::field_from_fits_column(), GException::fits_error::fits_error(), fits_move_to_hdu(), GFft::forward(), GCOMSelection::fpmtflag(), GFitsHeaderCard::free_dtype(), GIntegral::gauss_kronrod(), GCTACubeEdisp::GCTACubeEdisp(), GCTAModelRadialPolynom::GCTAModelRadialPolynom(), GCTAModelSpatialLookup::GCTAModelSpatialLookup(), GModelAssociations::get_association_xml(), GModelAssociation::get_property_xml(), GVOHub::get_socket(), GFitsTable::get_tform(), GHealpix::GHealpix(), GMatrix::GMatrix(), GMatrixSparse::GMatrixSparse(), GMatrixSymmetric::GMatrixSymmetric(), GModelSpectralTable::GModelSpectralTable(), GSkyMap::GSkyMap(), GVector::GVector(), GXmlElement::GXmlElement(), GSkyRegionRectangle::height(), GFits::image(), GModelAssociations::insert(), GFitsTable::insert(), GModelSpectralTablePars::insert(), GApplicationPars::insert(), GModelSpectralFunc::insert(), GObservations::insert(), GModelSpectralNodes::insert(), GModels::insert(), GPhases::insert_interval(), GMatrixSparse::insert_row(), GApplicationPar::integer(), GCsv::integer(), GModelSpectralFunc::intensity(), GModelSpectralNodes::intensity(), GNodeArray::interpolate(), GHealpix::interpolator(), GLATResponse::irf(), GCOMResponse::irf_diffuse(), GCOMResponse::irf_elliptical(), GCOMResponse::irf_ptsrc(), GCOMResponse::irf_radial(), GCTAResponseCube::irf_radial(), GWcs::lin_matinv(), GCsv::load(), GFitsTableBitCol::load_column(), GFitsTableCol::load_column_fixed(), GFitsTableCol::load_column_variable(), GModelSpatialDiffuseCube::load_cube(), GModelTemporalLightCurve::load_nodes(), GModelSpectralFunc::load_nodes(), GModelTemporalPhaseCurve::load_nodes(), GPulsar::load_parfile(), GOptimizerPar::max(), GCTABackground3D::mc(), GCTABackground2D::mc(), GCTAResponseIrf::mc(), GCTAEdisp2D::mc(), GModelSpatialDiffuseConst::mc_norm(), GOptimizerPar::min(), GDerivative::minuit2(), GObservation::model(), GFits::new_image(), GModelTemporalPhaseCurve::normalize_nodes(), GVOHub::notify(), GCTAModelIrfBackground::npred(), GCTAModelAeffBackground::npred(), GCTAModelCubeBackground::npred(), GCTAModelSkyCube::npred(), GCTAModelSpatial::npred(), GObservation::npred(), GFitsImage::offset(), GFits::open(), GCTAResponseTable::operator()(), GSkyMap::operator()(), GMatrixSymmetric::operator*(), GMatrix::operator*(), GMatrixSparse::operator*(), operator*(), GMatrix::operator*=(), GSkyMap::operator*=(), GMatrixSparse::operator*=(), GVector::operator+=(), GMatrixSymmetric::operator+=(), GMatrix::operator+=(), GSkyMap::operator+=(), GMatrixSparse::operator+=(), GVector::operator-=(), GMatrixSymmetric::operator-=(), GMatrix::operator-=(), GSkyMap::operator-=(), GMatrixSparse::operator-=(), GSkyMap::operator/=(), GOptimizerLM::optimize(), GException::out_of_range::out_of_range(), GApplicationPars::parse(), GXml::parse(), GApplicationPars::pickle(), GApplicationPar::pickle(), GIntegrals::polint(), GIntegral::polint(), GVOClient::post_string(), GVOHub::post_string(), GLATEfficiency::print(), GCOMRoi::print(), GCOMInstDir::print(), GLATRoi::print(), GCOMEventAtom::print(), GPulsarEphemeris::print(), GBilinear::print(), GCOMStatus::print(), GCOMBvc::print(), GCOMOad::print(), GUrlFile::print(), GLATInstDir::print(), GUrlString::print(), GCOMSelection::print(), GFftWavetable::print(), GEphemerides::print(), GDaemon::print(), GCTARoi::print(), GModelSpatialRadialProfileGauss::print(), GModelSpectralTablePar::print(), GCOMTim::print(), GPhases::print(), GModelSpatialRadialProfileDMBurkert::print(), GModelSpatialRadialProfileDMEinasto::print(), GModelSpatialRadialProfileDMZhao::print(), GSPIInstDir::print(), GPhotons::print(), GTimes::print(), GModelRegistry::print(), GCTAModelRadialRegistry::print(), GRan::print(), GWcsRegistry::print(), GObservationRegistry::print(), GPulsar::print(), GCOMIaq::print(), GMWLDatum::print(), GLATObservation::print(), GModelSpatialRegistry::print(), GModelSpectralRegistry::print(), GModelTemporalRegistry::print(), GOptimizerLM::print(), GCTAModelSpatialRegistry::print(), GLATEventBin::print(), GCOMEventBin::print(), GModelAssociation::print(), GCTAModelIrfBackground::print(), GCOMModelDRM::print(), GCOMInstChars::print(), GModelSpatialComposite::print(), GCTAModelSpatialGradient::print(), GPhoton::print(), GSkyDirs::print(), GCTAEventBin::print(), GCTABackgroundPerfTable::print(), GModelSpatialDiffuseConst::print(), GCTAModelAeffBackground::print(), GMWLSpectrum::print(), GCTAModelSpatialMultiplicative::print(), GCOMModelDRBPhibarBins::print(), GCOMModelDRBPhibarNodes::print(), GCTAAeffPerfTable::print(), GCOMHkd::print(), GCOMD1Response::print(), GHealpix::print(), GCOMEventList::print(), GSPIObservation::print(), GModelTemporalConst::print(), GCOMOads::print(), GLATEventCube::print(), GFitsTable::print(), GCTAAeffArf::print(), GResponseVectorCache::print(), GModelAssociations::print(), GLATEventList::print(), GLATMeanPsf::print(), GModelSpectralTablePars::print(), GFitsImage::print(), GCOMEventCube::print(), GCTAInstDir::print(), GModelSpectralComposite::print(), GCTAModelCubeBackground::print(), GDerivative::print(), GLATResponseTable::print(), GSPIEventCube::print(), GCOMD2Response::print(), GModelSpectralMultiplicative::print(), GCTAModelRadialAcceptance::print(), GCTAModelRadialGauss::print(), GCTABackground2D::print(), GCTABackground3D::print(), GCTAModelRadialPolynom::print(), GModelSpatialDiffuseMap::print(), GModelSpectralExponential::print(), GCTAAeff2D::print(), GHorizDir::print(), GCOMHkds::print(), GCOMResponse::print(), GModelSpatialRadialGauss::print(), GCOMBvcs::print(), GCOMDri::print(), GCTAModelRadialProfile::print(), GCTAModelBackground::print(), GModelSpatialRadialDisk::print(), GLATPsf::print(), GModelSpatialRadialGeneralGauss::print(), GLATEdisp::print(), GCTAEventList::print(), GCOMDris::print(), GModelSpatialRadialRing::print(), GModelSpectralBins::print(), GSPIEventBin::print(), GModelTemporalLightCurve::print(), GIntegrals::print(), GCTAModelSpatialLookup::print(), GModelSpatialEllipticalDisk::print(), GSPIModelDataSpace::print(), GIntegral::print(), GCTAModelSkyCube::print(), GModelSpectralTable::print(), GModelSpectralConst::print(), GModelSpatialEllipticalGauss::print(), GOptimizerPars::print(), GSPIResponse::print(), GTestSuites::print(), GModelSpatialEllipticalGeneralGauss::print(), GFft::print(), GModelSpatialPointSource::print(), GFitsHeader::print(), GSkyRegions::print(), GCsv::print(), GLATLtCubeMap::print(), GCTAEventCube::print(), GModelSpatialDiffuseCube::print(), GSkyRegionCircle::print(), GModelSpectralFunc::print(), GLATAeff::print(), GModelSpectralGauss::print(), GCTAPsfPerfTable::print(), GCTAPsfVector::print(), GModelSpectralPlaw::print(), GFitsHeaderCard::print(), GModelSpatialRadialShell::print(), GCTACubeExposure::print(), GResponseCache::print(), GCTAResponseIrf::print(), GCTAObservation::print(), GCTAPsfTable::print(), GCTAPsf2D::print(), GCTAPsfKing::print(), GTimeReference::print(), GCaldb::print(), GFitsTableCol::print(), GModelSpectralExpPlaw::print(), GModelSpectralLogParabola::print(), GCTAEdispRmf::print(), GModelSpectralBrokenPlaw::print(), GSkyRegionRectangle::print(), GEnergies::print(), GFilename::print(), GModelSpectralSuperExpPlaw::print(), GModelSpectralExpInvPlaw::print(), GModelTemporalPhaseCurve::print(), GCTACubePsf::print(), GRmf::print(), GNodeArray::print(), GEnergy::print(), GSkyPixel::print(), GCOMObservation::print(), GCTACubeEdisp::print(), GSkyDir::print(), GArf::print(), GGti::print(), GCTAEdispPerfTable::print(), GCTAResponseTable::print(), GModelSpectralPlawEnergyFlux::print(), GModelSpectralPlawPhotonFlux::print(), GCTAOnOffObservation::print(), GVector::print(), GModelSpectralNodes::print(), GModelSpectralSmoothBrokenPlaw::print(), GMatrixSymmetric::print(), GFits::print(), GTime::print(), GTestSuite::print(), GNdarray::print(), GEbounds::print(), GMatrix::print(), GApplication::print(), GCTAEdisp2D::print(), GObservations::print(), GPha::print(), GModelSky::print(), GOptimizerPar::print(), GModels::print(), GSkyMap::print(), GMatrixSparse::print(), GModel::print_attributes(), GMatrixBase::print_col_compression(), GMatrixBase::print_elements(), GFitsHDU::print_hdu(), GMatrixBase::print_row_compression(), GCTARoi::radius(), GSkyRegionCircle::radius(), GVOHub::random_string(), GLATPsfV1::read(), GLATPsfV3::read(), GCOMModelDRBPhibarBins::read(), GCOMModelDRBPhibarNodes::read(), GLATPsf::read(), GCOMOads::read(), GCTAModelRadialPolynom::read(), GModelSpectralBins::read(), GSkyRegionCircle::read(), GCTAAeff2D::read(), GCTAModelSpatialLookup::read(), GCTAObservation::read(), GSkyRegionRectangle::read(), GModelPar::read(), GCTAPsfTable::read(), GCTAPsf2D::read(), GCTAPsfKing::read(), GCOMSelection::read(), GFitsHeaderCard::read(), GModelSpectralNodes::read(), GModelSpatialDiffuseCube::read(), GPha::read(), GCTAEdisp2D::read(), GLATAeff::read_aeff(), GCTAResponseTable::read_axes(), read_ds_ebounds(), read_ds_gti_extname(), read_ds_phase(), read_ds_roi(), GSPIEventCube::read_ebds(), GMWLSpectrum::read_fits(), GSkyMap::read_healpix(), GSPIEventCube::read_models(), GSPIEventCube::read_pnt(), GLATEventCube::read_srcmap(), GCTAResponseTable::read_tables(), GSkyMap::read_wcs(), GApplicationPar::real(), GCsv::real(), GVOClient::register_to_hub(), GVOHub::request_register(), GFft::require_same_shape(), GNdarray::require_same_shape(), GIntegral::romberg(), GIntegrals::romberg(), GMatrix::row(), GModelSpectralFunc::save(), GFitsTableBitCol::save_column(), GFitsTableCol::save_column_fixed(), GFitsTableCol::save_column_variable(), GModelSpectralTablePars::set(), GCOMHkds::set(), GEnergies::set(), GObservations::set(), GTime::set(), GModels::set(), GLATEventCube::set_bin(), GCTAEventCube::set_bin(), GFftWavetable::set_factors(), GCTAEventList::set_mc_id_names(), GFftWavetable::set_members(), GCTABackground2D::set_members(), GCTABackground3D::set_members(), GApplicationPar::set_status(), GSPIModelDataSpace::setup_date(), GSPIModelDataSpace::setup_dete(), GSPIModelDataSpace::setup_ebin(), GSPIModelDataSpace::setup_evtclass(), GSPIModelDataSpace::setup_point(), GNdarray::shape(), GSkyMap::shape(), GDerivative::smooth_robust(), GMatrixSparse::stack_push_column(), GVOHub::start_hub(), GFitsTableULongCol::string(), GFitsTableDoubleCol::string(), GFitsTableLongCol::string(), GFitsTableLongLongCol::string(), GFitsTableUShortCol::string(), GFitsTableShortCol::string(), GFitsTableFloatCol::string(), GFitsTableByteCol::string(), GFitsTableCFloatCol::string(), GFitsTableCDoubleCol::string(), GFits::table(), GCOMBvcs::tdelta(), GTestSuite::test_value(), GFitsTableCol::tform_binary(), tochar(), GIntegral::trapzd(), GIntegrals::trapzd(), GCOMStatus::update_cache(), GDaemon::update_countries_data(), GDaemon::update_daily(), GFitsTable::update_header(), GModelSpectralBins::update_pars(), GModelSpectralNodes::update_pars(), GDaemon::update_versions_data(), GCOMSelection::use_d1(), GCOMSelection::use_d2(), GTime::utc(), GXmlElement::value(), GDerivative::value(), GFitsHeaderCard::value(), GWcs::wcs_p2s(), GWcs::wcs_print(), GWcs::wcs_print_value(), GWcs::wcs_s2p(), GWcs::wcs_set_ctype(), GSkyRegionRectangle::width(), GModelSpatialComposite::write(), GCTAModelSpatialMultiplicative::write(), GCOMModelDRBPhibarNodes::write(), GCOMModelDRBPhibarBins::write(), GCTARoi::write(), GSPIObservation::write(), GWcs::write(), GModelSpectralComposite::write(), GModelSpectralMultiplicative::write(), GCTAPointing::write(), GCTAModelRadialPolynom::write(), GTimeReference::write(), GModelSpectralBins::write(), GSPIModelDataSpace::write(), GSkyRegionCircle::write(), GCTAResponseIrf::write(), GCTAObservation::write(), GTestSuites::write(), GGti::write(), GSkyRegionRectangle::write(), GModelPar::write(), GCOMObservation::write(), GCOMSelection::write(), GFitsHeaderCard::write(), GEbounds::write(), GModelSpectralNodes::write(), GModel::write_attributes(), GCTAEventList::write_ds_keys(), GCTAEventList::write_mc_ids(), GModel::write_scales(), xml_check_par(), and xml_check_parnum().
std::string gammalib::str | ( | const unsigned int & | value | ) |
Convert unsigned integer value into string.
[in] | value | Unsigned integer to be converted into string. |
Definition at line 503 of file GTools.cpp.
std::string gammalib::str | ( | const unsigned long int & | value | ) |
Convert unsigned long integer value into string.
[in] | value | Unsigned long integer to be converted into string. |
Definition at line 517 of file GTools.cpp.
std::string gammalib::str | ( | const unsigned long long int & | value | ) |
Convert unsigned long long integer value into string.
[in] | value | Unsigned long long integer to be converted into string. |
Definition at line 531 of file GTools.cpp.
std::string gammalib::str | ( | const short int & | value | ) |
Convert short integer value into string.
[in] | value | Short integer to be converted into string. |
Definition at line 545 of file GTools.cpp.
std::string gammalib::str | ( | const int & | value, |
const std::string & | fmt = "%d" |
||
) |
Convert integer value into string.
[in] | value | Integer to be converted into string. |
[in] | fmt | Format string. |
Definition at line 560 of file GTools.cpp.
References G_CHAR_BUFFER.
std::string gammalib::str | ( | const long int & | value | ) |
Convert long integer value into string.
[in] | value | Long integer to be converted into string. |
Definition at line 582 of file GTools.cpp.
std::string gammalib::str | ( | const long long int & | value | ) |
Convert long long integer value into string.
[in] | value | Long long integer to be converted into string. |
Definition at line 596 of file GTools.cpp.
std::string gammalib::str | ( | const float & | value, |
const int & | precision = 0 |
||
) |
Convert single precision value into string.
[in] | value | Single precision value to be converted into string. |
[in] | precision | Floating point precision. |
Converts a single precision value into a string. Any positive precision
argument specifies the exact number of digits after the comma.
Definition at line 615 of file GTools.cpp.
std::string gammalib::str | ( | const double & | value, |
const int & | precision = 0 |
||
) |
Convert double precision value into string.
[in] | value | Double precision value to be converted into string. |
[in] | precision | Floating point precision. |
Converts a double precision value into a string. Any positive precision
argument specifies the exact number of digits after the comma.
Definition at line 652 of file GTools.cpp.
std::string gammalib::str | ( | const std::complex< double > & | value, |
const int & | precision = 0 |
||
) |
Convert complex value into string.
[in] | value | Complex value to be converted into string. |
[in] | precision | Floating point precision. |
Converts a complex value into a string. Any positive precision
argument specifies the exact number of digits after the comma.
Definition at line 688 of file GTools.cpp.
References abs().
std::string gammalib::str2xml | ( | const std::string & | arg | ) |
Convert special characters in string to XML character references.
[in] | arg | String. |
Converts all special characters found in a string into character references. For more information about XML character references read http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
Definition at line 1549 of file GTools.cpp.
Referenced by GXmlText::write(), and GXmlAttribute::write().
std::string gammalib::strdate | ( | void | ) |
Return current date.
Returns the current date as string in the format yyyy-mm-ddThh:mm:ss.
Definition at line 727 of file GTools.cpp.
Referenced by GLog::prefix(), and GApplication::write_statistics().
std::string gammalib::strip_chars | ( | const std::string & | arg, |
const std::string & | chars | ||
) |
Strip leading and trailing character from string.
[in] | arg | String from which character should be stripped. |
[in] | chars | Character(s) to be stripped. |
Definition at line 94 of file GTools.cpp.
Referenced by GFitsTable::data_open(), GVOClient::find_hub(), host_country(), GCsv::load(), GApplicationPars::parse(), read_ds_gti_extname(), read_ds_roi(), and strip_whitespace().
std::string gammalib::strip_whitespace | ( | const std::string & | arg | ) |
Strip leading and trailing whitespace from string.
[in] | arg | String from which whitespace should be stripped. |
Definition at line 80 of file GTools.cpp.
References strip_chars().
Referenced by GApplicationPar::check_options(), GMWLSpectrum::conv_flux(), GFitsTable::data_open(), GFitsTable::data_save(), GXmlNode::element(), GTime::extract_timesys(), gadf_hduclas4(), GApplication::GApplication(), GModel::ids(), GModel::instruments(), GCTABackgroundPerfTable::load(), GCTAAeffPerfTable::load(), GCTAPsfPerfTable::load(), GCsv::load(), GCTAEdispPerfTable::load(), GLATResponse::load(), GFitsHDU::open(), GEnergy::operator()(), GException::out_of_range::out_of_range(), GApplicationPars::parse(), GApplicationPar::query(), GLATPsf::read(), GLATLtCubeMap::read(), GCTAAeffArf::read(), GCTAResponseIrf::read(), GCTAPsfVector::read(), GArf::read(), GCOMSelection::read(), GLATAeff::read_aeff(), read_ds_gti_extname(), GLATEventCube::read_gti(), GModel::read_scales(), GCTAObservation::save(), GModel::scale(), GTime::set(), GFilename::set_filename(), GCTAEdisp2D::set_table(), GFitsHeaderCard::string(), GFitsHeaderCard::value(), and GWcs::write().
double gammalib::tand | ( | const double & | angle | ) |
Compute tangens of angle in degrees.
[in] | angle | Angle in degrees |
This code has been adapted from the WCSLIB function wcstrig.c::tand().
Definition at line 192 of file GMath.cpp.
References abs(), deg2rad, and tan().
Referenced by GWcsMER::prj_s2x().
std::string gammalib::tmpnam | ( | void | ) |
Return temporary file name.
Returns a temporary file name.
Definition at line 421 of file GTools.cpp.
References getenv().
Referenced by GVOClient::publish().
char * gammalib::tochar | ( | const std::string & | arg | ) |
Convert string to C string.
[in] | arg | String to be converted. |
Allocates a C string with the content of a C++ string.
Definition at line 767 of file GTools.cpp.
References str().
Referenced by GExceptionHandler::what().
double gammalib::todouble | ( | const std::string & | arg | ) |
Convert string into double precision value.
[in] | arg | String to be converted. |
Definition at line 926 of file GTools.cpp.
Referenced by GApplicationPar::check_value_real(), GTime::extract_timeval(), GSPIModelDataSpace::get_date_time(), GCTABackgroundPerfTable::load(), GCTAAeffPerfTable::load(), GCTAPsfPerfTable::load(), GCTAEdispPerfTable::load(), GPulsar::load_parfile(), GPulsar::load_psrtime(), GModelSpatialComposite::read(), GCTARoi::read(), GSPIObservation::read(), GCTAPointing::read(), GTimeReference::read(), GSkyRegionCircle::read(), GCTAResponseIrf::read(), GCTAObservation::read(), GGti::read(), GSkyRegionRectangle::read(), GModelPar::read(), GEbounds::read(), GModel::read_attributes(), read_ds_ebounds(), read_ds_phase(), read_ds_roi(), GFitsTableStringCol::real(), GXmlElement::real(), GCsv::real(), GApplicationPar::real(), GFitsHeaderCard::real(), GFitsHeaderCard::set_dtype(), GDaemon::update_countries_data(), GDaemon::update_daily(), and GDaemon::update_versions_data().
float gammalib::tofloat | ( | const std::string & | arg | ) |
Convert string into single precision value.
[in] | arg | String to be converted. |
Definition at line 911 of file GTools.cpp.
int gammalib::toint | ( | const std::string & | arg | ) |
Convert string into integer value.
[in] | arg | String to be converted. |
Definition at line 821 of file GTools.cpp.
Referenced by GApplicationPar::check_value_int(), GFitsTable::data_open(), GXmlNode::extract_index(), GFitsTableStringCol::integer(), GXmlElement::integer(), GCsv::integer(), GApplicationPar::integer(), GFitsHeaderCard::integer(), GDaemon::lock_pid(), GApplicationPars::pickle(), GApplicationPar::pickle(), GModelSpatialComposite::read(), GCTAModelRadialPolynom::read(), GTimeReference::read(), GSPIModelDataSpace::read(), GCOMObservation::read(), GVOClient::response_error_code(), GFilename::set_filename(), GDaemon::update_countries_data(), GDaemon::update_daily(), GDaemon::update_versions_data(), and xml2str().
long gammalib::tolong | ( | const std::string & | arg | ) |
Convert string into long value.
[in] | arg | String to be converted. |
Definition at line 851 of file GTools.cpp.
long long gammalib::tolonglong | ( | const std::string & | arg | ) |
Convert string into long long value.
[in] | arg | String to be converted. |
Definition at line 881 of file GTools.cpp.
Referenced by GFitsHeaderCard::set_dtype().
std::string gammalib::tolower | ( | const std::string & | arg | ) |
Convert string to lower case.
[in] | arg | String to be converted to upper case. |
Definition at line 955 of file GTools.cpp.
Referenced by GApplicationPar::check_value_bool(), GTime::GTime(), GLATResponse::load(), GEnergy::log10(), GEnergy::operator()(), GException::out_of_range::out_of_range(), GCaldb::path(), GModelSpatialDiffuseMap::read(), GCTAAeffArf::read(), GCTAResponseIrf::read(), GCTAPsfVector::read(), GModelPar::read(), GArf::read(), GModelTemporalPhaseCurve::read(), GPha::read(), GTimeReference::set(), GApplicationPar::set_status(), GSPIModelDataSpace::setup_detector_indices(), GSPIModelDataSpace::setup_energy_indices(), and GSPIModelDataSpace::setup_pointing_indices().
short gammalib::toshort | ( | const std::string & | arg | ) |
Convert string into short value.
[in] | arg | String to be converted. |
Definition at line 791 of file GTools.cpp.
unsigned int gammalib::touint | ( | const std::string & | arg | ) |
Convert string into unsigned integer value.
[in] | arg | String to be converted. |
Definition at line 836 of file GTools.cpp.
unsigned long gammalib::toulong | ( | const std::string & | arg | ) |
Convert string into unsigned long value.
[in] | arg | String to be converted. |
Definition at line 866 of file GTools.cpp.
unsigned long long gammalib::toulonglong | ( | const std::string & | arg | ) |
Convert string into unsigned long long value.
[in] | arg | String to be converted. |
Definition at line 896 of file GTools.cpp.
Referenced by GFitsHeaderCard::set_dtype().
std::string gammalib::toupper | ( | const std::string & | arg | ) |
Convert string to upper case.
[in] | arg | String to be converted to upper case. |
Definition at line 941 of file GTools.cpp.
Referenced by GApplicationPar::boolean(), GApplicationPar::check_options(), GMWLSpectrum::conv_flux(), GTime::convert(), GSkyMap::convolution_kernel(), GSkyProjection::coordsys(), GFits::extno(), GTime::extract_timesys(), GCaldb::filename(), GObservation::likelihood(), GCTAOnOffObservation::likelihood(), GLATResponse::load(), GCTAOnOffObservation::model_background(), GHealpix::ordering(), GCaldb::path(), GCaldb::print(), GLATPsf::read(), GLATLtCubeMap::read(), GCTAObservation::read(), GCTAOnOffObservation::read(), GTimeReference::set(), GEnergies::set(), GTime::set(), GCTAOnOffObservation::set(), GFilename::set_filename(), and GSkyMap::set_wcs().
unsigned short gammalib::toushort | ( | const std::string & | arg | ) |
Convert string into unsigned short value.
[in] | arg | String to be converted. |
Definition at line 806 of file GTools.cpp.
void gammalib::warning | ( | const std::string & | origin, |
const std::string & | message | ||
) |
Emits warning.
[in] | origin | Name of method that emits warning. |
[in] | message | Warning message. |
Writes a warning to the console.
Definition at line 1386 of file GTools.cpp.
Referenced by GIntegral::adaptive_simpson(), GCTAModelAeffBackground::aeff_integral(), GCOMDri::compute_dre(), GCOMDri::compute_tof_correction(), GCTAPsf2D::containment_radius(), GFitsHeaderCard::copy_dtype(), GModelSpatialRadialGauss::eval(), GModelSpatialRadialGeneralGauss::eval(), GModelSpectralPlaw::eval(), GCTAModelIrfBackground::npred_roi_kern_theta::eval(), GCTAModelAeffBackground::npred_roi_kern_theta::eval(), cta_psf_radial_kerns_phi::eval(), GCTAModelSpatial::npred_roi_kern_theta::eval(), GCTAModelIrfBackground::npred_roi_kern_phi::eval(), GCTAModelAeffBackground::npred_roi_kern_phi::eval(), GCTAModelSpatial::npred_roi_kern_phi::eval(), GFitsHeaderCard::free_dtype(), GIntegral::gauss_kronrod(), GCTABackground2D::mc(), GCTABackground3D::mc(), GCTAResponseIrf::mc(), GDerivative::minuit2(), GCTAModelIrfBackground::npred(), GCTAModelAeffBackground::npred(), GCTAModelCubeBackground::npred(), GCTAModelSkyCube::npred(), GCTAModelSpatial::npred(), GIntegrals::polint(), GIntegral::polint(), GCOMOads::read(), GIntegral::romberg(), GIntegrals::romberg(), GIntegral::trapzd(), GIntegrals::trapzd(), GDerivative::value(), and GFitsHeaderCard::write().
std::string gammalib::xml2str | ( | const std::string & | arg | ) |
Convert XML character references in string to characters.
[in] | arg | String containing XML character references. |
Converts all character references found in a string in their respective characters. For more information about XML character references read http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
Definition at line 1416 of file GTools.cpp.
References G_XML2STRING, number(), and toint().
Referenced by GXmlAttribute::GXmlAttribute(), and GXmlText::GXmlText().
void gammalib::xml_check_par | ( | const std::string & | origin, |
const std::string & | name, | ||
const int & | number | ||
) |
Checks whether a parameter has occured once.
[in] | origin | Method performing the check. |
[in] | name | Parameter name. |
[in] | number | Number of occurences of parameter. |
GException::invalid_value | Invalid XML format encountered. |
Throws an exception if a given parameter has not exactly occured once. The exception text is adapted to the case that none or multiple parameters have been found.
Definition at line 1855 of file GTools.cpp.
References str().
Referenced by GCTAObservation::read(), xml_get_par(), and xml_need_par().
void gammalib::xml_check_parnum | ( | const std::string & | origin, |
const GXmlElement & | xml, | ||
const int & | number | ||
) |
Checks number of parameters.
[in] | origin | Method performing the check. |
[in] | xml | XML element. |
[in] | number | Expected number of parameters. |
GException::invalid_value | Invalid XML format encountered. |
Checks the number of parameter in an XML element.
Definition at line 1777 of file GTools.cpp.
References GXmlNode::elements(), number(), and str().
Referenced by GModelSpatialRadialProfileGauss::read(), GModelSpatialRadialProfileDMBurkert::read(), GModelSpatialRadialProfileDMEinasto::read(), GModelSpatialRadialProfileDMZhao::read(), GLATObservation::read(), GCOMModelDRM::read(), GModelSpatialDiffuseConst::read(), GModelTemporalConst::read(), GCTAModelRadialGauss::read(), GModelSpatialDiffuseMap::read(), GCTAModelRadialProfile::read(), GModelSpatialRadialGauss::read(), GModelSpatialRadialDisk::read(), GModelSpatialRadialGeneralGauss::read(), GModelTemporalLightCurve::read(), GModelSpatialRadialRing::read(), GModelSpatialEllipticalDisk::read(), GModelSpatialEllipticalGauss::read(), GModelSpectralConst::read(), GModelSpatialEllipticalGeneralGauss::read(), GModelSpatialPointSource::read(), GModelSpatialDiffuseCube::read(), GModelSpectralFunc::read(), GModelSpectralGauss::read(), GModelSpectralPlaw::read(), GModelSpatialRadialShell::read(), GModelSpectralExpPlaw::read(), GModelSpectralLogParabola::read(), GModelSpectralBrokenPlaw::read(), GModelSpectralSuperExpPlaw::read(), GModelSpectralExpInvPlaw::read(), GModelTemporalPhaseCurve::read(), GModelSpectralPlawPhotonFlux::read(), GModelSpectralPlawEnergyFlux::read(), GModelSpectralSmoothBrokenPlaw::read(), and GLATObservation::write().
void gammalib::xml_check_type | ( | const std::string & | origin, |
GXmlElement & | xml, | ||
const std::string & | type | ||
) |
Checks the model type.
[in] | origin | Method performing the check. |
[in,out] | xml | XML element. |
[in] | type | Expected model typeN. |
GException::invalid_value | Invalid XML format encountered. |
Checks the number of parameter in an XML element.
Definition at line 1819 of file GTools.cpp.
References GXmlElement::attribute().
Referenced by GModelSpatialRadialProfileGauss::write(), GModelSpatialRadialProfileDMBurkert::write(), GModelSpatialRadialProfileDMEinasto::write(), GModelSpatialRadialProfileDMZhao::write(), GCOMModelDRM::write(), GCTAModelSpatialGradient::write(), GModelSpatialComposite::write(), GModelSpatialDiffuseConst::write(), GCTAModelSpatialMultiplicative::write(), GModelTemporalConst::write(), GModelSpectralComposite::write(), GModelSpectralMultiplicative::write(), GCTAModelRadialGauss::write(), GModelSpatialDiffuseMap::write(), GCTAModelRadialPolynom::write(), GModelSpectralExponential::write(), GCTAModelRadialProfile::write(), GModelSpatialRadialDisk::write(), GModelTemporalLightCurve::write(), GModelSpatialRadialRing::write(), GModelSpectralBins::write(), GModelSpatialEllipticalDisk::write(), GModelSpectralTable::write(), GModelSpectralConst::write(), GModelSpatialEllipticalGauss::write(), GModelSpatialEllipticalGeneralGauss::write(), GModelSpatialElliptical::write(), GModelSpatialPointSource::write(), GModelSpatialRadial::write(), GModelSpatialDiffuseCube::write(), GModelSpectralFunc::write(), GModelSpectralGauss::write(), GModelSpectralPlaw::write(), GModelSpatialRadialShell::write(), GModelSpectralExpPlaw::write(), GModelSpectralLogParabola::write(), GModelSpectralBrokenPlaw::write(), GModelSpectralExpInvPlaw::write(), GModelSpectralSuperExpPlaw::write(), GModelTemporalPhaseCurve::write(), GModelSpectralPlawEnergyFlux::write(), GModelSpectralPlawPhotonFlux::write(), GModelSpectralNodes::write(), and GModelSpectralSmoothBrokenPlaw::write().
GFilename gammalib::xml_file_expand | ( | const GXmlElement & | xml, |
const std::string & | filename | ||
) |
Expand file name provided as XML attribute for loading.
[in] | xml | XML element. |
[in] | filename | File name. |
Expands file name provided as XML attribute for loading. The XML file access path will be prepended to the file name access path if the file name has not an absolute path and if the file name access path does not start with the XML file access path.
Definition at line 1889 of file GTools.cpp.
References GXmlNode::filename(), GFilename::is_empty(), and GFilename::path().
Referenced by GLATObservation::read(), GCOMModelDRM::read(), GMWLObservation::read(), GSPIObservation::read(), GModelSpatialDiffuseMap::read(), GCTAModelSpatialLookup::read(), GModelTemporalLightCurve::read(), GModelSpectralTable::read(), GModelSpatialDiffuseCube::read(), GModelSpectralFunc::read(), GCTAObservation::read(), GCTAResponseCube::read(), GModelTemporalPhaseCurve::read(), GCOMObservation::read(), GCTAOnOffObservation::read(), and GCTAModelSkyCube::read_xml_spatial().
GFilename gammalib::xml_file_reduce | ( | const GXmlElement & | xml, |
const std::string & | filename | ||
) |
Reduce file name provided for writing as XML attribute.
[in] | xml | XML element. |
[in] | filename | File name. |
Reduces file name provided for writing as XML attribute. If the file name is not empty and its access path starts has the same access path as the XML file the XML file access path is stripped from the file name.
Definition at line 1946 of file GTools.cpp.
References GFilename::file(), GXmlNode::filename(), GFilename::is_empty(), and GFilename::path().
Referenced by GLATObservation::write(), GCOMModelDRM::write(), GMWLObservation::write(), GSPIObservation::write(), GModelSpatialDiffuseMap::write(), GCTAModelSpatialLookup::write(), GModelTemporalLightCurve::write(), GModelSpectralTable::write(), GModelSpatialDiffuseCube::write(), GModelSpectralFunc::write(), GCTAObservation::write(), GCTAResponseCube::write(), GModelTemporalPhaseCurve::write(), GCOMObservation::write(), GCTAOnOffObservation::write(), and GCTAModelSkyCube::write_xml_spatial().
std::string gammalib::xml_get_attr | ( | const std::string & | origin, |
const GXmlElement & | xml, | ||
const std::string & | name, | ||
const std::string & | attribute | ||
) |
Return attribute value for a given parameter in XML element.
[in] | origin | Method requesting parameter. |
[in] | xml | XML element. |
[in] | name | Parameter name. |
[in] | attribute | Attribute name. |
GException::invalid_value | Attribute not found. |
Returns the value of attribute
of parameter name
in XML element. The function checks whether the parameter has been found and throws an exception if no parameter or multiple occurences of a parameter with given name
are found. The function furthermore checks whether the attribute exists.
Definition at line 1738 of file GTools.cpp.
References GXmlElement::attribute(), GXmlElement::has_attribute(), and xml_get_par().
Referenced by GMWLObservation::read(), GSPIObservation::read(), GCOMObservation::read(), and GCTAOnOffObservation::read().
void gammalib::xml_get_name_value_pair | ( | const GXmlNode * | node, |
std::string & | name, | ||
std::string & | value | ||
) |
Extract name / value pair from XML node.
[in] | node | Pointer to XML node. |
[out] | name | Name string. |
[out] | value | Value string. |
Extracts a name / value pair from a XML node. If the XML node pointer is NULL, the name and value strings will be empty.
Definition at line 1988 of file GTools.cpp.
References GXmlNode::element(), and GXmlText::text().
Referenced by GVOClient::get_response_value(), and GVOHub::get_response_value().
const GXmlElement * gammalib::xml_get_par | ( | const std::string & | origin, |
const GXmlElement & | xml, | ||
const std::string & | name | ||
) |
Return pointer to parameter with given name in XML element.
[in] | origin | Method requesting parameter. |
[in] | xml | XML element. |
[in] | name | Parameter name. |
GException::invalid_value | Invalid XML format encountered. |
Returns pointer to parameter with given name
in XML element. The function checks whether the parameter has been found and throws an exception if no parameter or multiple occurences of a parameter with given name
are found.
Definition at line 1689 of file GTools.cpp.
References GXmlElement::attribute(), GXmlNode::element(), GXmlNode::elements(), number(), and xml_check_par().
Referenced by GModelSpatialRadialProfileGauss::read(), GModelSpatialRadialProfileDMBurkert::read(), GModelSpatialRadialProfileDMEinasto::read(), GModelSpatialRadialProfileDMZhao::read(), GCOMModelDRM::read(), GCTAModelSpatialGradient::read(), GCOMModelDRBPhibarNodes::read(), GModelSpatialDiffuseConst::read(), GCTARoi::read(), GModelTemporalConst::read(), GSPIObservation::read(), GCTAPointing::read(), GCTAModelRadialGauss::read(), GModelSpatialDiffuseMap::read(), GCTAModelRadialProfile::read(), GModelSpatialRadialGauss::read(), GTimeReference::read(), GModelSpatialRadialDisk::read(), GModelSpatialRadialGeneralGauss::read(), GModelSpectralBins::read(), GModelTemporalLightCurve::read(), GCTAModelSpatialLookup::read(), GModelSpatialRadialRing::read(), GModelSpatialEllipticalDisk::read(), GModelSpectralConst::read(), GModelSpatialEllipticalGauss::read(), GModelSpectralTable::read(), GModelSpatialEllipticalGeneralGauss::read(), GModelSpatialElliptical::read(), GModelSpatialPointSource::read(), GModelSpatialRadial::read(), GModelSpatialDiffuseCube::read(), GModelSpectralFunc::read(), GModelSpectralGauss::read(), GModelSpectralPlaw::read(), GCTAResponseIrf::read(), GModelSpatialRadialShell::read(), GCTAObservation::read(), GGti::read(), GModelSpectralExpPlaw::read(), GModelSpectralLogParabola::read(), GModelSpectralBrokenPlaw::read(), GCTAResponseCube::read(), GModelSpectralExpInvPlaw::read(), GModelSpectralSuperExpPlaw::read(), GModelTemporalPhaseCurve::read(), GModelSpectralPlawPhotonFlux::read(), GModelSpectralPlawEnergyFlux::read(), GEbounds::read(), GModelSpectralNodes::read(), GModelSpectralSmoothBrokenPlaw::read(), GCTAModelSkyCube::read_xml_spatial(), and xml_get_attr().
bool gammalib::xml_has_par | ( | const GXmlElement & | xml, |
const std::string & | name | ||
) |
Checks if parameter with given name in XML element exists.
[in] | xml | XML element. |
[in] | name | Parameter name. |
Checks whether a parameter with given name
exists in XML element.
Definition at line 1596 of file GTools.cpp.
References GXmlElement::attribute(), GXmlNode::element(), and GXmlNode::elements().
Referenced by GModelSpectralRegistry::alloc(), GSPIObservation::read(), GModelSpatialDiffuseMap::read(), GModelSpectralTable::read(), GModelSpatialElliptical::read(), GModelSpatialPointSource::read(), GModelSpatialRadial::read(), GModelSpatialDiffuseCube::read(), GCTAResponseIrf::read(), GCTAObservation::read(), GModelSpectralLogParabola::read(), GCTAResponseCube::read(), and GCOMObservation::read().
GXmlElement * gammalib::xml_need_par | ( | const std::string & | origin, |
GXmlElement & | xml, | ||
const std::string & | name | ||
) |
Return pointer to parameter with given name in XML element.
[in] | origin | Method requesting parameter. |
[in] | xml | XML element. |
[in] | name | Parameter name. |
GException::invalid_value | Invalid XML format encountered. |
Returns pointer to parameter with given name
in XML element. If the name
is not found, a parameter with the given name
is added. In that respect the function differs from xml_get_par which does not add a parameter element.
The function checks for multiple occurences of a parameter and throws an exception in case that more than one parameter with a given name is found.
Definition at line 1637 of file GTools.cpp.
References GXmlNode::append(), GXmlElement::attribute(), GXmlNode::element(), GXmlNode::elements(), number(), and xml_check_par().
Referenced by GModelSpatialRadialProfileGauss::write(), GModelSpatialRadialProfileDMBurkert::write(), GModelSpatialRadialProfileDMZhao::write(), GModelSpatialRadialProfileDMEinasto::write(), GMWLObservation::write(), GCOMModelDRM::write(), GCTAModelSpatialGradient::write(), GCOMModelDRBPhibarNodes::write(), GModelSpatialDiffuseConst::write(), GCTARoi::write(), GSPIObservation::write(), GModelTemporalConst::write(), GCTAModelRadialGauss::write(), GCTAPointing::write(), GCTAModelRadialPolynom::write(), GModelSpatialDiffuseMap::write(), GCTAModelRadialProfile::write(), GModelSpatialRadialGauss::write(), GTimeReference::write(), GModelSpatialRadialDisk::write(), GModelSpatialRadialGeneralGauss::write(), GModelSpatialRadialRing::write(), GCTAModelSpatialLookup::write(), GModelSpectralBins::write(), GModelTemporalLightCurve::write(), GModelSpatialEllipticalDisk::write(), GModelSpectralConst::write(), GModelSpatialEllipticalGauss::write(), GModelSpectralTable::write(), GModelSpatialEllipticalGeneralGauss::write(), GModelSpatialPointSource::write(), GModelSpatialElliptical::write(), GModelSpatialRadial::write(), GModelSpatialDiffuseCube::write(), GModelSpectralFunc::write(), GModelSpectralGauss::write(), GModelSpectralPlaw::write(), GModelSpatialRadialShell::write(), GCTAResponseIrf::write(), GCTAObservation::write(), GGti::write(), GModelSpectralExpPlaw::write(), GModelSpectralLogParabola::write(), GModelSpectralBrokenPlaw::write(), GCTAResponseCube::write(), GModelSpectralExpInvPlaw::write(), GModelSpectralSuperExpPlaw::write(), GModelTemporalPhaseCurve::write(), GCOMObservation::write(), GModelSpectralPlawEnergyFlux::write(), GModelSpectralPlawPhotonFlux::write(), GCTAOnOffObservation::write(), GEbounds::write(), GModelSpectralNodes::write(), GModelSpectralSmoothBrokenPlaw::write(), and GCTAModelSkyCube::write_xml_spatial().
const double gammalib::deg2rad = 0.0174532925199432954743717 |
Definition at line 43 of file GMath.hpp.
Referenced by GCTAModelAeffBackground::aeff_integral(), GHorizDir::altaz_deg(), GCTAResponseTable::axis_radians(), com_energy2(), GCOMIaq::compton_kinematics(), GCOMDri::compute_drx(), GCOMDri::compute_geometry(), GSkyRegionCircle::compute_solid_angle(), GSkyRegionRectangle::compute_solid_angle(), GCTAPsfTable::containment_radius(), GModelSpatialRadialProfile::contains(), GModelSpatialRadialGauss::contains(), GModelSpatialRadialDisk::contains(), GModelSpatialRadialGeneralGauss::contains(), GModelSpatialRadialRing::contains(), GModelSpatialEllipticalDisk::contains(), GModelSpatialEllipticalGauss::contains(), GModelSpatialEllipticalGeneralGauss::contains(), GModelSpatialPointSource::contains(), GModelSpatialRadialShell::contains(), GSkyRegionRectangle::corner(), cosd(), GCTACubePsf::delta_max(), GSkyRegionRectangle::dir_to_local(), GMatrix::eulerx(), GMatrix::eulery(), GMatrix::eulerz(), GModelSpatialEllipticalDisk::eval(), GModelSpatialEllipticalGauss::eval(), GModelSpatialEllipticalGeneralGauss::eval(), cta_irf_elliptical_kern_omega::eval(), cta_nroi_elliptical_kern_omega::eval(), cta_psf_elliptical_kern_omega::eval(), GCTACubePsf::fill_cube(), GModelSpatial::flux(), GTime::gast(), GSPIResponse::init_members(), GLATMeanPsf::integral(), GCOMResponse::irf_diffuse(), GCOMResponse::irf_elliptical(), GCTAResponseIrf::irf_elliptical(), GCOMResponse::irf_radial(), GCTAResponseIrf::irf_radial(), GCOMIaq::klein_nishina_bin(), GSkyDir::lb_deg(), GCTABackgroundPerfTable::load(), GCTAPsfPerfTable::load(), GSPIResponse::load_irf(), GSkyRegionRectangle::local_to_dir(), GCOMIaq::location_spread(), GCTAAeff2D::max(), GCTABackgroundPerfTable::mc(), GCTAModelAeffBackground::mc(), GModelSpatialRadialDisk::mc(), GCTAModelRadialGauss::mc(), GCTAModelRadialPolynom::mc(), GCTAModelRadialProfile::mc(), GModelSpatialEllipticalDisk::mc(), GCTAModelSpatial::mc(), GModelSpatialDiffuseMap::mc_cone(), GModelSpatialDiffuseCube::mc_cone(), GCTAModelRadialPolynom::mc_max_value(), GCTAModelRadialProfile::mc_max_value(), GModelSpatialDiffuseConst::mc_norm(), GSkyDir::moon(), GCOMInstChars::multi_scatter(), GCTAModelIrfBackground::npred(), GCTAModelRadialAcceptance::npred(), GCTAModelSpatial::npred(), GCTAResponseIrf::npsf(), GCTAResponseIrf::nroi_diffuse(), GCTAResponseIrf::nroi_elliptical(), GCTAResponseIrf::nroi_radial(), GCTAModelRadialGauss::omega(), GCTAModelRadialPolynom::omega(), GCTAModelRadialProfile::omega(), GCTAPsfTable::precompute(), GWcsSIN::prj_s2x(), GWcsMOL::prj_s2x(), GWcsARC::prj_set(), GWcsCAR::prj_set(), GWcsMER::prj_set(), GWcsSFL::prj_set(), GModelSpatialRadialProfileGauss::profile_value(), GLATPsfV1::psf(), GLATPsfV3::psf(), GCTAResponseCube::psf_elliptical(), GSkyDir::radec_deg(), GCOMResponse::read(), GCTAPsfVector::read(), GCTAPsf2D::read(), GCTAPsfKing::read(), GCTAEventList::read_events(), GCTAAeffArf::remove_thetacut(), resolution(), GHorizDir::rotate_deg(), GSkyDir::rotate_deg(), GCTAAeff2D::set_boundaries(), GCTAEdisp2D::set_boundaries(), GCTACubePsf::set_delta_axis(), GCTAModelSpatialLookup::set_from_buffer(), GCTABackground2D::set_members(), GCTABackground3D::set_members(), GSPIResponse::set_wcs(), sincosd(), sind(), GWcs::solidangle(), GCTABackgroundPerfTable::solidangle(), GSkyDir::sun(), tand(), GCTAEdisp2D::theta(), GModelSpatialRadialProfileGauss::theta_max(), GModelSpatialRadialProfileDMZhao::theta_max(), GModelSpatialRadialProfileDMEinasto::theta_max(), GModelSpatialRadialProfileDMBurkert::theta_max(), GModelSpatialRadialGauss::theta_max(), GModelSpatialRadialGeneralGauss::theta_max(), GModelSpatialRadialDisk::theta_max(), GModelSpatialRadialRing::theta_max(), GModelSpatialEllipticalDisk::theta_max(), GModelSpatialEllipticalGauss::theta_max(), GModelSpatialEllipticalGeneralGauss::theta_max(), GModelSpatialRadialShell::theta_max(), GModelSpatialRadialRing::theta_min(), GModelSpatialEllipticalDisk::update(), GModelSpatialRadialGauss::update(), GModelSpatialRadialDisk::update(), GModelSpatialEllipticalGauss::update(), GModelSpatialRadialGeneralGauss::update(), GModelSpatialEllipticalGeneralGauss::update(), GModelSpatialRadialShell::update(), GCTAPsfKing::update(), and GCOMResponse::write().
const double gammalib::erg2MeV = 624150.96 |
Definition at line 46 of file GTools.hpp.
Referenced by GMWLSpectrum::conv_flux(), GEnergy::erg(), GModelSpectralPlawEnergyFlux::eval(), and GModelSpectralPlawEnergyFlux::flux().
const std::string gammalib::extname_arf = "SPECRESP" |
Definition at line 45 of file GArf.hpp.
Referenced by GCTAAeffArf::load(), GCTAResponseIrf::load_aeff(), GArf::read(), and GArf::write().
const std::string gammalib::extname_cta_aeff2d = "EFFECTIVE AREA" |
Definition at line 43 of file GCTAAeff2D.hpp.
Referenced by GCTAAeff2D::load(), GCTAResponseIrf::load_aeff(), and GCTAAeff2D::save().
const std::string gammalib::extname_cta_background2d = "BKG" |
Definition at line 44 of file GCTABackground2D.hpp.
Referenced by GCTABackground2D::load(), GCTAResponseIrf::load_background(), and GCTABackground2D::save().
const std::string gammalib::extname_cta_background3d = "BACKGROUND" |
Definition at line 44 of file GCTABackground3D.hpp.
Referenced by GCTABackground3D::load(), GCTAResponseIrf::load_background(), and GCTABackground3D::save().
const std::string gammalib::extname_cta_counts = "COUNTS" |
Definition at line 50 of file GCTAEventCube.hpp.
Referenced by GCTAEventCube::read(), and GCTAEventCube::write().
const std::string gammalib::extname_cta_edisp2d = "ENERGY DISPERSION" |
Definition at line 46 of file GCTAEdisp2D.hpp.
Referenced by GCTAEdisp2D::fetch(), GCTAResponseIrf::load_edisp(), and GCTAEdisp2D::save().
const std::string gammalib::extname_cta_events = "EVENTS" |
Definition at line 49 of file GCTAEventList.hpp.
Referenced by GCTAEventList::fetch(), GCTAEventList::read(), GCTAObservation::read(), GCTAObservation::save(), GCTAEventList::write(), and GCTAEventList::write_events().
const std::string gammalib::extname_cta_migras = "MIGRAS" |
Definition at line 48 of file GCTACubeEdisp.hpp.
Referenced by GCTACubeEdisp::read(), and GCTACubeEdisp::write().
const std::string gammalib::extname_cta_psf2d = "POINT SPREAD FUNCTION" |
Definition at line 42 of file GCTAPsf2D.hpp.
Referenced by GCTAPsf2D::load(), and GCTAPsf2D::save().
const std::string gammalib::extname_cta_psfking = "POINT SPREAD FUNCTION" |
Definition at line 42 of file GCTAPsfKing.hpp.
Referenced by GCTAPsfKing::load(), and GCTAPsfKing::save().
const std::string gammalib::extname_cta_psftable = "PSF_2D_TABLE" |
Definition at line 42 of file GCTAPsfTable.hpp.
Referenced by GCTAPsfTable::load(), and GCTAPsfTable::save().
const std::string gammalib::extname_cta_spatial_lookup = "RADIAL BACKGROUND LOOKUP" |
Definition at line 49 of file GCTAModelSpatialLookup.hpp.
Referenced by GCTAModelSpatialLookup::save().
const std::string gammalib::extname_cta_weights = "WEIGHTS" |
Definition at line 51 of file GCTAEventCube.hpp.
Referenced by GCTAEventCube::read(), and GCTAEventCube::write().
const std::string gammalib::extname_deltas = "DELTAS" |
Definition at line 47 of file GCTACubePsf.hpp.
Referenced by GCTACubePsf::read(), and GCTACubePsf::write().
const std::string gammalib::extname_dri = "DRI" |
Definition at line 53 of file GCOMDri.hpp.
Referenced by GCOMDri::save().
const std::string gammalib::extname_ebounds = "EBOUNDS" |
Definition at line 44 of file GEbounds.hpp.
Referenced by GCTAModelSkyCube::load(), GEbounds::load(), GLATEventCube::read(), GCTACubeBackground::read(), GCTAEventCube::read(), GRmf::read(), GPha::read(), GSPIResponse::read_energies(), GEbounds::save(), GCTAEventCube::write(), GRmf::write(), GPha::write(), and GSPIResponse::write_energies().
const std::string gammalib::extname_energies = "ENERGIES" |
Definition at line 44 of file GEnergies.hpp.
Referenced by GEnergies::load(), GCTACubeExposure::read(), GCTACubePsf::read(), GCTACubeEdisp::read(), GModelSpatialDiffuseCube::read(), GSPIResponse::read_energies(), GEnergies::save(), GCTACubeEdisp::write(), and GSPIResponse::write_energies().
const std::string gammalib::extname_gti = "GTI" |
Definition at line 44 of file GGti.hpp.
Referenced by GCTAEventList::init_members(), GGti::load(), GLATEventList::read(), GLATEventCube::read(), GCTAEventList::read(), GLATLtCube::read(), GCTAEventCube::read(), GCTACubeExposure::read(), GGti::save(), GCTAObservation::save(), GCTAEventList::write(), GLATLtCube::write(), and GCTAEventCube::write().
const std::string gammalib::extname_lat_aeff = "EFFECTIVE AREA" |
Definition at line 45 of file GLATAeff.hpp.
Referenced by GLATAeff::read(), and GLATAeff::write_aeff().
const std::string gammalib::extname_lat_cthetabounds = "CTHETABOUNDS" |
Definition at line 47 of file GLATLtCube.hpp.
const std::string gammalib::extname_lat_edisp = "ENERGY DISPERSION" |
Definition at line 43 of file GLATEdisp.hpp.
Referenced by GLATEdisp::read(), and GLATEdisp::write_edisp().
const std::string gammalib::extname_lat_edisp_scale = "EDISP_SCALING_PARAMS" |
Definition at line 44 of file GLATEdisp.hpp.
const std::string gammalib::extname_lat_efficiency = "EFFICIENCY_PARAMS" |
Definition at line 46 of file GLATAeff.hpp.
Referenced by GLATAeff::read(), and GLATAeff::write_efficiency().
const std::string gammalib::extname_lat_events = "EVENTS" |
Definition at line 45 of file GLATEventList.hpp.
Referenced by GLATEventList::read().
const std::string gammalib::extname_lat_exposure = "EXPOSURE" |
Definition at line 45 of file GLATLtCube.hpp.
Referenced by GLATLtCube::read(), and GLATLtCube::write().
const std::string gammalib::extname_lat_ltcubemap = "EXPOSURE" |
Definition at line 44 of file GLATLtCubeMap.hpp.
const std::string gammalib::extname_lat_wgtexposure = "WEIGHTED_EXPOSURE" |
Definition at line 46 of file GLATLtCube.hpp.
Referenced by GLATLtCube::read(), and GLATLtCube::write().
const std::string gammalib::extname_pha = "SPECTRUM" |
Definition at line 45 of file GPha.hpp.
Referenced by GPha::read(), and GPha::write().
const std::string gammalib::extname_rmf = "MATRIX" |
Definition at line 44 of file GRmf.hpp.
Referenced by GCTAResponseIrf::load_edisp(), GRmf::read(), and GRmf::write().
const double gammalib::fourpi = 12.56637061435917295385057353311801153679 |
Definition at line 37 of file GMath.hpp.
Referenced by GSkyDir::euler(), GModelSpatialDiffuseConst::eval(), GModelSpatialDiffuseConst::flux(), GHealpix::GHealpix(), GHealpix::read(), GCOMResponse::read(), and GCOMResponse::write().
const double gammalib::gkw10[5] |
Definition at line 61 of file GIntegral.cpp.
Referenced by GIntegral::gauss_kronrod().
const double gammalib::gkw21a[5] |
Definition at line 79 of file GIntegral.cpp.
Referenced by GIntegral::gauss_kronrod().
const double gammalib::gkw21b[6] |
Definition at line 88 of file GIntegral.cpp.
Referenced by GIntegral::gauss_kronrod().
const double gammalib::gkw43a[10] |
Definition at line 113 of file GIntegral.cpp.
Referenced by GIntegral::gauss_kronrod().
const double gammalib::gkw43b[12] |
Definition at line 127 of file GIntegral.cpp.
Referenced by GIntegral::gauss_kronrod().
const double gammalib::gkw87a[21] |
Definition at line 169 of file GIntegral.cpp.
Referenced by GIntegral::gauss_kronrod().
const double gammalib::gkw87b[23] |
Definition at line 194 of file GIntegral.cpp.
Referenced by GIntegral::gauss_kronrod().
const double gammalib::gkx1[5] |
Definition at line 52 of file GIntegral.cpp.
Referenced by GIntegral::gauss_kronrod().
const double gammalib::gkx2[5] |
Definition at line 70 of file GIntegral.cpp.
Referenced by GIntegral::gauss_kronrod().
const double gammalib::gkx3[11] |
Definition at line 98 of file GIntegral.cpp.
Referenced by GIntegral::gauss_kronrod().
const double gammalib::gkx4[22] |
Definition at line 143 of file GIntegral.cpp.
Referenced by GIntegral::gauss_kronrod().
const double gammalib::inv_ln10 = 1.0/ln10 |
Definition at line 48 of file GMath.hpp.
Referenced by GCTAEdispPerfTable::load().
const double gammalib::inv_ln2 = 1.4426950408889634073599246810018921 |
Definition at line 47 of file GMath.hpp.
Referenced by iter_phi(), and iter_rho().
const double gammalib::inv_loge = 1.0/std::log10(std::exp(1.0)) |
const double gammalib::inv_pihalf = 0.6366197723675813430755350534900574 |
Definition at line 39 of file GMath.hpp.
Referenced by GHealpix::ang2pix_z_phi_nest(), and GHealpix::ang2pix_z_phi_ring().
const double gammalib::inv_sqrt2pi = 0.3989422804014327028632180827116826549172 |
Definition at line 41 of file GMath.hpp.
Referenced by GModelSpectralGauss::eval(), GCOMD2Response::kn_gauss_kernel::eval(), GModelSpectralGauss::eflux_kernel::eval(), GCOMD2Response::bkg_gauss_kernel::eval(), GCTAEdispPerfTable::update(), and GCOMD2Response::update_cache().
const double gammalib::inv_sqrt4pi = 0.2820947917738781434740397257803862929220 |
const double gammalib::ln10 = 2.3025850929940456840179914546843642 |
Definition at line 46 of file GMath.hpp.
Referenced by GSPIResponse::compute_irf(), GModelSpectralTable::eval(), GModelSpectralPlawEnergyFlux::eval(), GModelSpectralPlawPhotonFlux::eval(), GCTAEdisp2D::edisp_ereco_kern::eval(), GSPIResponse::irf_weight(), and GCTAEdispPerfTable::operator()().
const double gammalib::ln2 = 0.6931471805599453094172321214581766 |
Definition at line 45 of file GMath.hpp.
Referenced by GCOMD2Response::operator()().
const double gammalib::mec2 = 0.5109989461 |
Definition at line 52 of file GTools.hpp.
Referenced by com_energy2(), GCOMD2Response::kn_gauss_kernel::eval(), GCOMIaq::response_kernel::eval(), GCOMIaq::klein_nishina_bin(), GCOMInstChars::multi_scatter(), GCOMInstChars::ne213a_mfpath(), and GCOMD2Response::update_cache().
const double gammalib::MeV2Angstrom = 1.239841875e-2 |
Definition at line 47 of file GTools.hpp.
Referenced by GEnergy::Angstrom().
const double gammalib::MeV2erg = 1.6021765e-6 |
Definition at line 45 of file GTools.hpp.
Referenced by GModelSpectralBins::eflux(), GModelSpectralConst::eflux(), GModelSpectralTable::eflux(), GModelSpectralFunc::eflux(), GModelSpectralGauss::eflux(), GModelSpectralPlaw::eflux(), GModelSpectralExpPlaw::eflux(), GModelSpectralLogParabola::eflux(), GModelSpectralBrokenPlaw::eflux(), GModelSpectralSuperExpPlaw::eflux(), GModelSpectralExpInvPlaw::eflux(), GModelSpectralPlawPhotonFlux::eflux(), GModelSpectralNodes::eflux(), GModelSpectralSmoothBrokenPlaw::eflux(), GEnergy::erg(), GModelSky::eflux_kern::eval(), GEnergy::log10erg(), GModelSpectralFunc::set_cache(), GModelSpectralNodes::set_flux_cache(), and GModelSpectralTable::update_flux().
const double gammalib::onethird = 1.0/3.0 |
Definition at line 50 of file GMath.hpp.
Referenced by GSkyMap::flux().
const double gammalib::pc2cm = 3.08568025e18 |
Definition at line 48 of file GTools.hpp.
const double gammalib::pi = 3.141592653589793238462643383279502884197 |
Definition at line 35 of file GMath.hpp.
Referenced by acos(), atan2(), GCOMDri::compute_geometry(), GCOMDri::compute_overlap(), GCOMDri::compute_surface(), GCTAPsfPerfTable::containment_radius(), GCTAPsfVector::containment_radius(), GCTAPsf2D::containment_radius(), erfinv(), cta_irf_elliptical_kern_rho::eval(), cta_nroi_elliptical_kern_rho::eval(), cta_psf_elliptical_kern_rho::eval(), GHealpix::get_ring_info(), GHealpix::interpolator(), limit_omega(), GHealpix::max_pixrad(), GCOMInstChars::multi_scatter(), GCTAModelRadialGauss::omega(), GLATLtCubeMap::phi(), GHealpix::pix2ang_ring(), GRan::poisson(), GSkyDir::precess(), GWcsMOL::prj_s2x(), GWcsMOL::prj_set(), GWcsMOL::prj_x2s(), GXml::process_markup(), resolution(), GCTAModelSpatialLookup::set_from_buffer(), GWcs::solidangle(), GCTABackgroundPerfTable::solidangle(), GModelSpatialRadialProfileDMEinasto::theta_max(), GModelSpatialRadialProfileDMBurkert::theta_max(), and GModelSpatialRadialProfileDMZhao::theta_max().
const double gammalib::pihalf = 1.570796326794896619231321691639751442099 |
Definition at line 38 of file GMath.hpp.
Referenced by acos(), atan2(), GHealpix::dir2pix(), GLATPsfV3::integrate_psf(), GHealpix::interpolator(), GCTAResponseIrf::irf_elliptical(), GSkyRegionRectangle::local_to_dir(), GLATPsfV3::normalize_psf(), GCTAResponseIrf::nroi_elliptical(), GHealpix::pix2ang_nest(), GHealpix::pix2dir(), GLATPsfV1::psf(), GCTAResponseCube::psf_elliptical(), GSPIResponse::set_cache(), GCTABackground2D::solid_angle(), GCTABackground3D::solid_angle(), GHealpix::xyf2loc(), and GHorizDir::zenith().
const double gammalib::rad2deg = 57.295779513082322864647722 |
Definition at line 44 of file GMath.hpp.
Referenced by acosd(), GHorizDir::alt_deg(), asind(), atan2d(), atand(), GHorizDir::az_deg(), GSkyDir::b_deg(), GSkyRegionRectangle::contains(), GSkyDir::dec_deg(), GHorizDir::dist_deg(), GSkyDir::dist_deg(), GCTAModelRadial::eval(), GCTAModelSpatialGaussSpectrum::eval(), GCTAModelSpatialGradient::eval(), GCTAModelRadialPolynom::integrand::eval(), GCTAModelRadialProfile::integrand::eval(), GCTAModelRadialAcceptance::roi_kern::eval(), cta_irf_radial_kern_rho::eval(), cta_nroi_radial_kern_rho::eval(), cta_irf_elliptical_kern_omega::eval(), cta_nroi_elliptical_kern_omega::eval(), cta_irf_diffuse_kern_theta::eval(), cta_nroi_diffuse_kern_theta::eval(), cta_psf_radial_kern_rho::eval(), cta_psf_radial_kern_phi::eval(), cta_psf_elliptical_kern_omega::eval(), GCTAModelSpatialLookup::fill_buffer(), GCTAResponseCube::irf_diffuse(), GCTAResponseIrf::irf_radial(), GSkyDir::l_deg(), GCOMIaq::location_spread(), GModelSpatialDiffuseConst::mc(), GCTAModelAeffBackground::mc(), GModelSpatialRadialProfile::mc(), GModelSpatialDiffuseMap::mc(), GCTABackground2D::mc(), GCTABackground3D::mc(), GModelSpatialRadialDisk::mc(), GModelSpatialRadialGeneralGauss::mc(), GModelSpatialRadialRing::mc(), GModelSpatialEllipticalDisk::mc(), GModelSpatialEllipticalGeneralGauss::mc(), GModelSpatialDiffuseCube::mc(), GModelSpatialRadialShell::mc(), GCTAResponseIrf::mc(), GCTAEdisp2D::mc(), GCTAModelSpatialGradient::mc_max_value(), GSkyDir::moon(), GCTAResponseIrf::npsf(), GCTABackgroundPerfTable::operator()(), GCTAAeffPerfTable::operator()(), GCTAAeffArf::operator()(), GSkyRegionRectangle::overlaps(), GSkyDir::posang_deg(), GHorizDir::print(), GSPIResponse::print(), GSkyDir::print(), GWcsMOL::prj_set(), GWcsAIT::prj_set(), GWcsTAN::prj_set(), GWcsSTG::prj_set(), GWcsCAR::prj_set(), GWcsAZP::prj_set(), GWcsSIN::prj_set(), GWcsARC::prj_set(), GWcsMER::prj_set(), GWcsSFL::prj_set(), GWcsSIN::prj_x2s(), GWcsMOL::prj_x2s(), GSkyDir::ra_deg(), GCTABackgroundPerfTable::rate_ebin(), GCOMOads::read(), GCOMEventList::read_events(), GSkyDir::rotate(), GHorizDir::rotate_deg(), GModelSpatialRadialProfile::set_region(), GSkyRegionMap::set_region_rectangle(), GSkyDir::sun(), GCTAPsf2D::write(), GCTAPsfKing::write(), GCTAEventList::write_events(), and GHorizDir::zenith_deg().
const double gammalib::sec2day = 1.0 / sec_in_day |
Definition at line 50 of file GTools.hpp.
Referenced by com_tics(), com_time(), com_tjd(), GTime::convert(), GTime::days(), GEphemerides::ephemeris(), GTime::jd(), GTime::mjd(), GTime::secs(), and GTime::utc().
const double gammalib::sec_in_day = 86400.0 |
Definition at line 49 of file GTools.hpp.
Referenced by GTime::convert(), GTime::days(), GTime::jd(), GPulsar::load_fermi(), GPulsar::load_psrtime(), GTime::mjd(), GCOMSelection::orbital_period(), GTime::set(), GTimeReference::unitseconds(), and GTime::utc().
const double gammalib::speed_of_light = 299792458.0 |
Definition at line 53 of file GTools.hpp.
Referenced by GEphemerides::geo2ssb().
const double gammalib::sqrt_two = std::sqrt(2.0) |
Definition at line 54 of file GMath.hpp.
Referenced by GModelSpatialRadialShell::f2(), gauss_integral(), GWcsMOL::prj_set(), and GModelSpatialRadialShell::update().
Definition at line 56 of file GMath.hpp.
Referenced by GCOMD1Response::update_cache().
const double gammalib::tai2tt = 32.184 |
Definition at line 51 of file GTools.hpp.
Referenced by GTime::convert(), GTime::secs(), GTime::set(), GTime::utc(), and GTime::utc2tt().
const double gammalib::twopi = 6.283185307179586476925286766559005768394 |
Definition at line 36 of file GMath.hpp.
Referenced by GHealpix::ang2pix_z_phi_nest(), GHealpix::ang2pix_z_phi_ring(), GSPIResponse::azimuth(), GModelSpatialRadialProfile::cache_index(), GSkyRegionCircle::compute_solid_angle(), GCTAPsfTable::containment_radius(), GSkyDir::euler(), com_radial_kerns_rho::eval(), GCTAModelIrfBackground::npred_roi_kern_theta::eval(), GCTAModelAeffBackground::npred_roi_kern_theta::eval(), GCTAModelSpatial::npred_roi_kern_theta::eval(), GModelSpatial::circle_int_kern_rho::eval(), com_elliptical_kerns_rho::eval(), GResponse::irf_radial_kern_theta::eval(), GResponse::irf_elliptical_kern_theta::eval(), cta_irf_diffuse_kern_theta::eval(), cta_nroi_diffuse_kern_theta::eval(), cta_psf_diffuse_kern_delta::eval(), GFft::factor5(), GFft::factor7(), GLATMeanPsf::integral(), GLATPsfV3::integrate_psf(), GHealpix::interpolator(), GCOMResponse::irf_diffuse(), iter_phi(), GModelSpatialRadialProfileDMBurkert::jfactor(), GModelSpatialRadialProfileDMEinasto::jfactor(), GModelSpatialRadialProfileDMZhao::jfactor(), limit_omega(), GCTABackgroundPerfTable::load(), GCTABackgroundPerfTable::mc(), GCTAModelAeffBackground::mc(), GModelSpatialEllipticalGeneralGauss::mc(), GLATPsfV3::normalize_psf(), GCTAModelRadialGauss::omega(), GCTAModelRadialPolynom::omega(), GCTAModelRadialProfile::omega(), GCTAPsfTable::precompute(), GModelSpatialRadialProfileGauss::profile_value(), GLATPsfV1::psf(), roi_arclength(), GFftWavetable::set_members(), GWcs::solidangle(), GCTABackgroundPerfTable::solidangle(), GModelSpatialEllipticalDisk::update(), GModelSpatialRadialGauss::update(), GModelSpatialEllipticalGauss::update(), GModelSpatialRadialDisk::update(), GModelSpatialRadialGeneralGauss::update(), GModelSpatialRadialRing::update(), GModelSpatialEllipticalGeneralGauss::update(), GCTAPsfPerfTable::update(), GCTAPsfVector::update(), GModelSpatialRadialShell::update(), GCTAPsf2D::update(), and GCTAPsfKing::update().
const double gammalib::twothird = 2.0/3.0 |
Definition at line 51 of file GMath.hpp.
Referenced by GHealpix::ang2pix_z_phi_nest(), GHealpix::ang2pix_z_phi_ring(), and GHealpix::ring_above().