GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GSPIEventCube Class Reference

INTEGRAL/SPI event bin container class. More...

#include <GSPIEventCube.hpp>

Inheritance diagram for GSPIEventCube:
GEventCube GEvents GBase

Public Member Functions

 GSPIEventCube (void)
 Void constructor. More...
 
 GSPIEventCube (const GFilename &filename)
 Observation Group constructor. More...
 
 GSPIEventCube (const GSPIEventCube &cube)
 Copy constructor. More...
 
virtual ~GSPIEventCube (void)
 Destructor. More...
 
virtual GSPIEventCubeoperator= (const GSPIEventCube &cube)
 Assignment operator. More...
 
virtual GSPIEventBinoperator[] (const int &index)
 Event bin access operator. More...
 
virtual const GSPIEventBinoperator[] (const int &index) const
 Event bin access operator (const version) More...
 
virtual void clear (void)
 Clear INTEGRAL/SPI event cube. More...
 
virtual GSPIEventCubeclone (void) const
 Clone event cube. More...
 
virtual std::string classname (void) const
 Return class name. More...
 
virtual int size (void) const
 Return event cube size. More...
 
virtual int dim (void) const
 Return event cube dimension. More...
 
virtual int naxis (const int &axis) const
 Return number of bins in axis. More...
 
virtual void load (const GFilename &filename)
 Load INTEGRAL/SPI event cube from Observation Group. More...
 
virtual void save (const GFilename &filename, const bool &clobber=false) const
 Save INTEGRAL/SPI event cube into FITS file. More...
 
virtual void read (const GFits &file)
 Read INTEGRAL/SPI event cube from Observation Group FITS file. More...
 
virtual void write (GFits &file) const
 Write INTEGRAL/SPI event cube into FITS file. More...
 
virtual int number (void) const
 Return number of events in cube. More...
 
virtual std::string print (const GChatter &chatter=NORMAL) const
 Print INTEGRAL/SPI event cube information. More...
 
double ontime (void) const
 Return total ontime. More...
 
double livetime (void) const
 Return total livetime. More...
 
double model_counts (const int &index) const
 Return number of events in model. More...
 
int models (void) const
 Return number of models. More...
 
const std::string & ptid (const int &ipt) const
 Return pointing identifier. More...
 
const GSPIInstDirdir (const int &ipt, const int &idet) const
 Return instrument direction. More...
 
const GSkyDirspi_x (const int &ipt) const
 Return SPI X direction (pointing direction) More...
 
const GSkyDirspi_z (const int &ipt) const
 Return SPI Z direction. More...
 
- Public Member Functions inherited from GEventCube
 GEventCube (void)
 Void constructor. More...
 
 GEventCube (const GEventCube &cube)
 Copy constructor. More...
 
virtual ~GEventCube (void)
 Destructor. More...
 
virtual GEventCubeoperator= (const GEventCube &cube)
 Assignment operator. More...
 
- Public Member Functions inherited from GEvents
 GEvents (void)
 Void constructor. More...
 
 GEvents (const GEvents &events)
 Copy constructor. More...
 
virtual ~GEvents (void)
 Destructor. More...
 
virtual GEventsoperator= (const GEvents &events)
 Assignment operator. More...
 
void ebounds (const GEbounds &ebounds)
 Set energy boundaries. More...
 
void gti (const GGti &gti)
 Set Good Time Intervals. More...
 
const GEboundsebounds (void) const
 Return energy boundaries. More...
 
const GGtigti (void) const
 Return Good Time Intervals. More...
 
const GTimetstart (void) const
 Return start time. More...
 
const GTimetstop (void) const
 Return stop time. More...
 
const GEnergyemin (void) const
 Return minimum energy. More...
 
const GEnergyemax (void) const
 Return maximum energy. More...
 
- Public Member Functions inherited from GBase
virtual ~GBase (void)
 Destructor. More...
 

Protected Member Functions

void init_members (void)
 Initialise class members. More...
 
void copy_members (const GSPIEventCube &cube)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
void alloc_data (void)
 Allocate data. More...
 
void read_ebds (const GFitsTable *ebds)
 Read data from INTEGRAL/SPI "SPI.-EBDS-SET" extension. More...
 
void read_pnt (const GFitsTable *pnt, const GFitsTable *gti)
 Read pointing information. More...
 
void read_gti (const GFitsTable *gti)
 Read data from INTEGRAL/SPI "SPI.-OBS.-GTI" extension. More...
 
void read_dti (const GFitsTable *dti)
 Read data from INTEGRAL/SPI "SPI.-OBS.-DTI" extension. More...
 
void read_dsp (const GFitsTable *dsp)
 Read data from INTEGRAL/SPI "SPI.-OBS.-DSP" extension. More...
 
void read_models (const GFits &file)
 Read models from INTEGRAL/SPI Observation Group. More...
 
virtual void set_energies (void)
 Set energies. More...
 
virtual void set_times (void)
 Set times. More...
 
void init_bin (void)
 Initialise event bin. More...
 
void set_bin (const int &index)
 Set event bin. More...
 
- Protected Member Functions inherited from GEventCube
void init_members (void)
 Initialise class members. More...
 
void copy_members (const GEventCube &cube)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
- Protected Member Functions inherited from GEvents
void init_members (void)
 Initialise class members. More...
 
void copy_members (const GEvents &events)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 

Protected Attributes

GSPIEventBin m_bin
 Actual event bin. More...
 
int m_num_pt
 Number of pointings. More...
 
int m_num_det
 Number of detectors. More...
 
int m_num_ebin
 Number of energy bins. More...
 
int m_num_sky
 Number of sky models. More...
 
int m_num_bgm
 Number of background models. More...
 
int m_gti_size
 Size of GTI arrays. More...
 
int m_dsp_size
 Size of DSP arrays. More...
 
int m_model_size
 Size of model arrays. More...
 
double * m_ontime
 Ontime array. More...
 
double * m_livetime
 Livetime array. More...
 
double * m_counts
 Counts array. More...
 
double * m_stat_err
 Statistical error array. More...
 
double * m_models
 Models array. More...
 
double * m_size
 Event bin size array. More...
 
GSPIInstDirm_dir
 Event direction array. More...
 
GTimem_time
 Time array. More...
 
GEnergym_energy
 Energy array. More...
 
GEnergym_ewidth
 Energy bin width array. More...
 
GSkyDirm_spix
 SPI X axis array. More...
 
GSkyDirm_spiz
 SPI Z axis array. More...
 
std::string * m_ptid
 Pointing identifiers. More...
 
std::vector< std::string > m_modnames
 Model names. More...
 
- Protected Attributes inherited from GEvents
GEbounds m_ebounds
 Energy boundaries covered by events. More...
 
GGti m_gti
 Good time intervals covered by events. More...
 

Detailed Description

INTEGRAL/SPI event bin container class.

This class is a container class for INTEGRAL/SPI event bins.

Definition at line 56 of file GSPIEventCube.hpp.

Constructor & Destructor Documentation

GSPIEventCube::GSPIEventCube ( void  )

Void constructor.

Constructs an empty INTEGRAL/SPI event cube.

Definition at line 72 of file GSPIEventCube.cpp.

References init_members().

Referenced by clone().

GSPIEventCube::GSPIEventCube ( const GFilename filename)
explicit

Observation Group constructor.

Parameters
[in]filenameObservation Group FITS file name.

Construct an INTEGRAL/SPI event cube from an Observation Group.

Definition at line 89 of file GSPIEventCube.cpp.

References init_members(), and load().

GSPIEventCube::GSPIEventCube ( const GSPIEventCube cube)

Copy constructor.

Parameters
[in]cubeINTEGRAL/SPI event cube.

Definition at line 107 of file GSPIEventCube.cpp.

References copy_members(), and init_members().

GSPIEventCube::~GSPIEventCube ( void  )
virtual

Destructor.

Definition at line 123 of file GSPIEventCube.cpp.

References free_members().

Member Function Documentation

std::string GSPIEventCube::classname ( void  ) const
inlinevirtual

Return class name.

Returns
String containing the class name ("GSPIEventCube").

Implements GEventCube.

Definition at line 145 of file GSPIEventCube.hpp.

void GSPIEventCube::clear ( void  )
virtual

Clear INTEGRAL/SPI event cube.

Clears INTEGRAL/SPI event cube by resetting all class members to an initial state. Any information that was present before will be lost.

Implements GEventCube.

Definition at line 221 of file GSPIEventCube.cpp.

References GEventCube::free_members(), free_members(), GEvents::free_members(), GEventCube::init_members(), init_members(), and GEvents::init_members().

Referenced by load(), and read().

GSPIEventCube * GSPIEventCube::clone ( void  ) const
virtual

Clone event cube.

Returns
Pointer to deep copy of INTEGRAL/SPI event cube.

Implements GEventCube.

Definition at line 243 of file GSPIEventCube.cpp.

References GSPIEventCube().

void GSPIEventCube::copy_members ( const GSPIEventCube cube)
protected

Copy class members.

Parameters
[in]cubeINTEGRAL/SPI event cube.

This method copies the class members from another event cube in the actual object. It also prepares the event bin member that will be returned in case of an operator access to the class.

Definition at line 871 of file GSPIEventCube.cpp.

References init_bin(), m_counts, m_dir, m_dsp_size, m_energy, m_ewidth, m_gti_size, m_livetime, m_model_size, m_models, m_modnames, m_num_bgm, m_num_det, m_num_ebin, m_num_pt, m_num_sky, m_ontime, m_ptid, m_size, m_spix, m_spiz, m_stat_err, and m_time.

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

int GSPIEventCube::dim ( void  ) const
inlinevirtual

Return event cube dimension.

Returns
Number of dimensions in event cube.

Returns the dimension of the event cube which is always 3.

Implements GEventCube.

Definition at line 173 of file GSPIEventCube.hpp.

Referenced by naxis().

const GSPIInstDir & GSPIEventCube::dir ( const int &  ipt,
const int &  idet 
) const

Return instrument direction.

Parameters
[in]iptPointing index.
[in]idetDetector index.
Returns
Instrument direction.
Exceptions
GException::out_of_rangeInvalid pointing or detector index

Returns the instrument direction for the specified pointing and detector index.

Definition at line 685 of file GSPIEventCube.cpp.

References G_DIR, m_dir, m_num_det, and m_num_pt.

Referenced by GSPIResponse::set_detids(), and GSPIModelDataSpace::setup_evtclass().

void GSPIEventCube::free_members ( void  )
protected

Delete class members.

Definition at line 946 of file GSPIEventCube.cpp.

References m_counts, m_dir, m_energy, m_ewidth, m_livetime, m_models, m_ontime, m_ptid, m_size, m_spix, m_spiz, m_stat_err, and m_time.

Referenced by alloc_data(), clear(), operator=(), and ~GSPIEventCube().

void GSPIEventCube::init_bin ( void  )
protected

Initialise event bin.

Initialises the event bin. All fixed content is set here, the content that depends on the bin index is set by the set_bin() method which is called before any event bin access.

< Set by set_bin method

< Set by set_bin method

< Set by set_bin method

< Set by set_bin method

< Set by set_bin method

< Set by set_bin method

< Set by set_bin method

< Set by set_bin method

< Set by set_bin method

< Set by set_bin method

< Set by set_bin method

< Set by set_bin method

Definition at line 1459 of file GSPIEventCube.cpp.

References GSPIEventBin::free_members(), m_bin, GSPIEventBin::m_counts, GSPIEventBin::m_dir, GSPIEventBin::m_energy, GSPIEventBin::m_idir, GSPIEventBin::m_iebin, GSPIEventBin::m_index, GSPIEventBin::m_ipt, GSPIEventBin::m_livetime, GSPIEventBin::m_models, m_num_bgm, GSPIEventBin::m_num_models, m_num_sky, GSPIEventBin::m_ontime, GSPIEventBin::m_size, and GSPIEventBin::m_time.

Referenced by copy_members(), init_members(), and read().

void GSPIEventCube::init_members ( void  )
protected
double GSPIEventCube::livetime ( void  ) const

Return total livetime.

Returns
Total livetime.

Returns the total livetime in the event cube. The total livetime is the sum of the livetime of all pointings and detectors, divided by the number of detectors that were active (determine by positive livetime values).

Definition at line 561 of file GSPIEventCube.cpp.

References m_livetime, m_num_det, and m_num_pt.

Referenced by print(), GSPIObservation::read(), and read_dti().

void GSPIEventCube::load ( const GFilename filename)
virtual

Load INTEGRAL/SPI event cube from Observation Group.

Parameters
[in]filenameObservation Group FITS file name.

Loads data from an Observation Group FITS file into an INTEGRAL/SPI event cube.

Implements GEventCube.

Definition at line 289 of file GSPIEventCube.cpp.

References clear(), GFits::close(), and read().

Referenced by GSPIEventCube().

double GSPIEventCube::model_counts ( const int &  index) const

Return number of events in model.

Parameters
[in]indexModel index.
Returns
Number of events in event cube.
Exceptions
GException::out_of_rangeInvalid model index

Returns the total number of counts in model.

Definition at line 618 of file GSPIEventCube.cpp.

References G_MODEL_COUNTS, m_dsp_size, m_models, m_num_bgm, and m_num_sky.

Referenced by print().

int GSPIEventCube::models ( void  ) const
inline

Return number of models.

Returns
Number of models.

Returns the number of models in the event cube.

Definition at line 211 of file GSPIEventCube.hpp.

References m_num_bgm, and m_num_sky.

Referenced by GSPIModelDataSpace::GSPIModelDataSpace().

int GSPIEventCube::naxis ( const int &  axis) const
virtual

Return number of bins in axis.

Parameters
[in]axisAxis [0,...,dim()-1].
Returns
Number of bins in axis.
Exceptions
GException::out_of_rangeAxis is out of range.

Returns the number of bins along a given event cube axis.

Implements GEventCube.

Definition at line 260 of file GSPIEventCube.cpp.

References dim(), G_NAXIS, m_num_det, m_num_ebin, and m_num_pt.

Referenced by GSPIResponse::set(), GSPIResponse::set_cache(), GSPIResponse::set_detids(), and GSPIModelDataSpace::setup_pars().

int GSPIEventCube::number ( void  ) const
virtual

Return number of events in cube.

Returns
Number of events in event cube.

This method returns the number of events in the event cube rounded to the nearest integer.

Implements GEventCube.

Definition at line 480 of file GSPIEventCube.cpp.

References m_counts, and m_dsp_size.

Referenced by print().

double GSPIEventCube::ontime ( void  ) const

Return total ontime.

Returns
Total ontime.

Returns the total ontime in the event cube. The total ontime is the sum of the ontime of all pointings and detectors, divided by the number of detectors that were active (determine by positive ontime values).

Definition at line 506 of file GSPIEventCube.cpp.

References m_num_det, m_num_pt, and m_ontime.

Referenced by print(), GSPIObservation::read(), and read_gti().

GSPIEventCube & GSPIEventCube::operator= ( const GSPIEventCube cube)
virtual

Assignment operator.

Parameters
[in]cubeINTEGRAL/SPI event cube.
Returns
INTEGRAL/SPI event cube.

Definition at line 145 of file GSPIEventCube.cpp.

References copy_members(), free_members(), init_members(), and GEventCube::operator=().

GSPIEventBin * GSPIEventCube::operator[] ( const int &  index)
virtual

Event bin access operator.

Parameters
[in]indexEvent index [0,...,size()-1].
Returns
Pointer to event bin.

Returns pointer to an event bin. Note that the returned pointer is in fact always the same, but the method sets the pointers within the event bin so that they point to the appropriate information.

Implements GEventCube.

Definition at line 179 of file GSPIEventCube.cpp.

References m_bin, and set_bin().

const GSPIEventBin * GSPIEventCube::operator[] ( const int &  index) const
virtual

Event bin access operator (const version)

Parameters
[in]indexEvent index [0,...,size()-1].
Returns
Const pointer to event bin.

Returns pointer to an event bin. Note that the returned pointer is in fact always the same, but the method sets the pointers within the event bin so that they point to the appropriate information.

Implements GEventCube.

Definition at line 199 of file GSPIEventCube.cpp.

References m_bin, and set_bin().

std::string GSPIEventCube::print ( const GChatter chatter = NORMAL) const
virtual

Print INTEGRAL/SPI event cube information.

Parameters
[in]chatterChattiness.
Returns
String containing INTEGRAL/SPI event cube information.

Implements GEventCube.

Definition at line 763 of file GSPIEventCube.cpp.

References GEvents::emax(), GEvents::emin(), livetime(), m_modnames, m_num_bgm, m_num_det, m_num_ebin, m_num_pt, m_num_sky, model_counts(), number(), ontime(), gammalib::parformat(), SILENT, size(), gammalib::str(), GEvents::tstart(), and GEvents::tstop().

const std::string & GSPIEventCube::ptid ( const int &  ipt) const

Return pointing identifier.

Parameters
[in]iptPointing index.
Returns
Pointing identifier.
Exceptions
GException::out_of_rangeInvalid pointing index

Returns the pointing identifier for the specified index.

Definition at line 657 of file GSPIEventCube.cpp.

References G_PTID, m_num_pt, and m_ptid.

Referenced by GSPIModelDataSpace::setup_orbit().

void GSPIEventCube::read ( const GFits fits)
virtual

Read INTEGRAL/SPI event cube from Observation Group FITS file.

Parameters
[in]fitsObservation Group FITS file.
Exceptions
GException::invalid_valueObservation Group FITS file invalid.

Reads an INTEGRAL/SPI event cube from an Observation Group FITS file. The following extension are mandatory

"SPI.-EBDS-SET"
"SPI.-OBS.-PNT"
"SPI.-OBS.-GTI"
"SPI.-OBS.-DSP"
"SPI.-OBS.-DTI"

Optional extensions are

"SPI.-SDET-SPE"
"SPI.-BMOD-DSP"

Implements GEventCube.

Definition at line 361 of file GSPIEventCube.cpp.

References alloc_data(), clear(), GFits::filename(), G_READ_FITS, GEvents::gti(), init_bin(), GFitsHDU::integer(), m_num_bgm, m_num_det, m_num_ebin, m_num_pt, m_num_sky, read_dsp(), read_dti(), read_ebds(), read_gti(), read_models(), read_pnt(), gammalib::spi_hdu(), gammalib::spi_num_hdus(), and GFilename::url().

Referenced by load(), and GSPIObservation::read().

void GSPIEventCube::read_dsp ( const GFitsTable dsp)
protected

Read data from INTEGRAL/SPI "SPI.-OBS.-DSP" extension.

Parameters
[in]dspDSP FITS table.

Reads data from an INTEGRAL/SPI "SPI.-OBS.-DSP" extension. The method sets up the m_counts, m_stat_err and m_size arrays.

Note that the computation of the m_size arrays needs ontime and energy width information that has been previously setup in the read_ebds() and read_gti() methods.

Definition at line 1296 of file GSPIEventCube.cpp.

References m_counts, m_ewidth, m_livetime, m_num_det, m_num_ebin, m_num_pt, m_size, m_stat_err, GEnergy::MeV(), and GFitsTableCol::real().

Referenced by read().

void GSPIEventCube::read_dti ( const GFitsTable dti)
protected

Read data from INTEGRAL/SPI "SPI.-OBS.-DTI" extension.

Parameters
[in]dtiPointer to Dead time information FITS table.

Reads data from an INTEGRAL/SPI "SPI.-OBS.-DTI" extension. The method sets up the m_ontime array and the m_gti member.

Definition at line 1253 of file GSPIEventCube.cpp.

References livetime(), m_livetime, m_num_det, m_num_pt, and GFitsTableCol::real().

Referenced by read().

void GSPIEventCube::read_ebds ( const GFitsTable ebds)
protected

Read data from INTEGRAL/SPI "SPI.-EBDS-SET" extension.

Parameters
[in]ebdsPointer to energy boundaries FITS table.
Exceptions
GException::invalid_valueIncompatible number of energy bins encountered

Reads data from an INTEGRAL/SPI "SPI.-EBDS-SET" extension. The method sets up the m_energy array and the m_ebounds member.

Definition at line 1068 of file GSPIEventCube.cpp.

References GEbounds::emean(), GEbounds::ewidth(), G_READ_EBDS, GEvents::m_ebounds, m_energy, m_ewidth, m_num_det, m_num_ebin, GEbounds::read(), GEbounds::size(), and gammalib::str().

Referenced by read().

void GSPIEventCube::read_gti ( const GFitsTable gti)
protected

Read data from INTEGRAL/SPI "SPI.-OBS.-GTI" extension.

Parameters
[in]gtiPointer to GTI FITS table.

Reads data from an INTEGRAL/SPI "SPI.-OBS.-GTI" extension. The method sets up the m_ontime array and the m_gti member.

Definition at line 1185 of file GSPIEventCube.cpp.

References GGti::append(), GEvents::m_gti, m_num_det, m_num_pt, m_ontime, m_time, ontime(), GFitsTableCol::real(), gammalib::spi_ijd2time(), GEvents::tstart(), and GEvents::tstop().

Referenced by read().

void GSPIEventCube::read_models ( const GFits fits)
protected

Read models from INTEGRAL/SPI Observation Group.

Parameters
[in]fitsObservation Group FITS file.

Definition at line 1340 of file GSPIEventCube.cpp.

References GFits::filename(), G_READ_MODELS, GFitsHDU::has_card(), m_models, m_modnames, m_num_bgm, m_num_det, m_num_ebin, m_num_pt, m_num_sky, GFitsTableCol::real(), gammalib::spi_hdu(), gammalib::str(), GFitsHDU::string(), and GFilename::url().

Referenced by read().

void GSPIEventCube::read_pnt ( const GFitsTable pnt,
const GFitsTable gti 
)
protected

Read pointing information.

Parameters
[in]pntPointer to pointing FITS table.
[in]gtiPointer to GTI FITS table.
Exceptions
GException::invalid_valueIncompatible PTID_SPI pointing identifiers encountered

Reads pointing information from "SPI.-OBS.-PNT" and "SPI.-OBS.-GTI" extensions. The method sets up the m_dir array.

Definition at line 1116 of file GSPIEventCube.cpp.

References GSPIInstDir::detid(), GSPIInstDir::dir(), G_READ_PNT, GFitsTableCol::integer(), m_dir, m_num_det, m_num_pt, m_ptid, m_spix, m_spiz, GSkyDir::radec_deg(), GFitsTableCol::real(), gammalib::str(), and GFitsTableCol::string().

Referenced by read().

void GSPIEventCube::save ( const GFilename filename,
const bool &  clobber = false 
) const
virtual

Save INTEGRAL/SPI event cube into FITS file.

Parameters
[in]filenameFITS file name.
[in]clobberOverwrite existing FITS file?

Saves the INTEGRAL/SPI event cube into a FITS file.

Implements GEventCube.

Definition at line 319 of file GSPIEventCube.cpp.

References GFits::close(), GFits::saveto(), and write().

void GSPIEventCube::set_bin ( const int &  index)
protected

Set event bin.

Parameters
[in]indexEvent index [0,...,size()[.
Exceptions
GException::out_of_rangeEvent index is outside valid range.

Sets the pointers of the event bin to the event cube cell that corresponds to the specified index.

The event bin is in fact physically stored in the event cube, and only a single event bin is indeed allocated. This method sets up the pointers in the event bin so that a client can easily access the information of individual bins as if they were stored in an array.

Definition at line 1498 of file GSPIEventCube.cpp.

References G_SET_BIN, m_bin, GSPIEventBin::m_counts, m_counts, GSPIEventBin::m_dir, m_dir, GSPIEventBin::m_energy, m_energy, GSPIEventBin::m_idir, GSPIEventBin::m_iebin, GSPIEventBin::m_index, GSPIEventBin::m_ipt, GSPIEventBin::m_livetime, m_livetime, GSPIEventBin::m_models, m_models, m_num_det, m_num_ebin, GSPIEventBin::m_num_models, GSPIEventBin::m_ontime, m_ontime, GSPIEventBin::m_size, m_size, GSPIEventBin::m_time, m_time, and size().

Referenced by operator[]().

void GSPIEventCube::set_energies ( void  )
inlineprotectedvirtual

Set energies.

Sets energies.

Reimplemented from GEventCube.

Definition at line 185 of file GSPIEventCube.hpp.

void GSPIEventCube::set_times ( void  )
inlineprotectedvirtual

Set times.

Sets times.

Reimplemented from GEventCube.

Definition at line 197 of file GSPIEventCube.hpp.

int GSPIEventCube::size ( void  ) const
inlinevirtual

Return event cube size.

Returns
Number of bins in event cube.

Returns number of bins in event cube.

Implements GEventCube.

Definition at line 159 of file GSPIEventCube.hpp.

References m_dsp_size.

Referenced by print(), and set_bin().

const GSkyDir & GSPIEventCube::spi_x ( const int &  ipt) const

Return SPI X direction (pointing direction)

Parameters
[in]iptPointing index.
Returns
SPI X direction.
Exceptions
GException::out_of_rangeInvalid pointing index

Returns the SPI X direction for the specified index. The SPI X direction is the SPI pointing direction.

Definition at line 716 of file GSPIEventCube.cpp.

References G_SPI_X, m_num_pt, and m_spix.

Referenced by GSPIResponse::set_cache().

const GSkyDir & GSPIEventCube::spi_z ( const int &  ipt) const

Return SPI Z direction.

Parameters
[in]iptPointing index.
Returns
SPI Z direction.
Exceptions
GException::out_of_rangeInvalid pointing index

Returns the SPI Z direction for the specified index.

Definition at line 742 of file GSPIEventCube.cpp.

References G_SPI_Z, m_num_pt, and m_spiz.

Referenced by GSPIResponse::set_cache().

void GSPIEventCube::write ( GFits file) const
virtual

Write INTEGRAL/SPI event cube into FITS file.

Parameters
[in]fileFITS file.

Writes the INTEGRAL/SPI event cube into a FITS file.

Implements GEventCube.

Definition at line 462 of file GSPIEventCube.cpp.

Referenced by save().

Member Data Documentation

GSPIEventBin GSPIEventCube::m_bin
protected

Actual event bin.

Definition at line 113 of file GSPIEventCube.hpp.

Referenced by init_bin(), init_members(), operator[](), and set_bin().

double* GSPIEventCube::m_counts
protected

Counts array.

Definition at line 124 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), free_members(), init_members(), number(), read_dsp(), and set_bin().

GSPIInstDir* GSPIEventCube::m_dir
protected

Event direction array.

Definition at line 128 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), dir(), free_members(), init_members(), read_pnt(), and set_bin().

int GSPIEventCube::m_dsp_size
protected

Size of DSP arrays.

Definition at line 120 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), init_members(), model_counts(), number(), and size().

GEnergy* GSPIEventCube::m_energy
protected

Energy array.

Definition at line 130 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), free_members(), init_members(), read_ebds(), and set_bin().

GEnergy* GSPIEventCube::m_ewidth
protected

Energy bin width array.

Definition at line 131 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), free_members(), init_members(), read_dsp(), and read_ebds().

int GSPIEventCube::m_gti_size
protected

Size of GTI arrays.

Definition at line 119 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), and init_members().

double* GSPIEventCube::m_livetime
protected

Livetime array.

Definition at line 123 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), free_members(), init_members(), livetime(), read_dsp(), read_dti(), and set_bin().

int GSPIEventCube::m_model_size
protected

Size of model arrays.

Definition at line 121 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), and init_members().

double* GSPIEventCube::m_models
protected

Models array.

Definition at line 126 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), free_members(), init_members(), model_counts(), read_models(), and set_bin().

std::vector<std::string> GSPIEventCube::m_modnames
protected

Model names.

Definition at line 135 of file GSPIEventCube.hpp.

Referenced by copy_members(), print(), and read_models().

int GSPIEventCube::m_num_bgm
protected

Number of background models.

Definition at line 118 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), init_bin(), init_members(), model_counts(), models(), print(), read(), and read_models().

int GSPIEventCube::m_num_det
protected
int GSPIEventCube::m_num_ebin
protected

Number of energy bins.

Definition at line 116 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), init_members(), naxis(), print(), read(), read_dsp(), read_ebds(), read_models(), and set_bin().

int GSPIEventCube::m_num_pt
protected
int GSPIEventCube::m_num_sky
protected

Number of sky models.

Definition at line 117 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), init_bin(), init_members(), model_counts(), models(), print(), read(), and read_models().

double* GSPIEventCube::m_ontime
protected

Ontime array.

Definition at line 122 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), free_members(), init_members(), ontime(), read_gti(), and set_bin().

std::string* GSPIEventCube::m_ptid
protected

Pointing identifiers.

Definition at line 134 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), free_members(), init_members(), ptid(), and read_pnt().

double* GSPIEventCube::m_size
protected

Event bin size array.

Definition at line 127 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), free_members(), init_members(), read_dsp(), and set_bin().

GSkyDir* GSPIEventCube::m_spix
protected

SPI X axis array.

Definition at line 132 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), free_members(), init_members(), read_pnt(), and spi_x().

GSkyDir* GSPIEventCube::m_spiz
protected

SPI Z axis array.

Definition at line 133 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), free_members(), init_members(), read_pnt(), and spi_z().

double* GSPIEventCube::m_stat_err
protected

Statistical error array.

Definition at line 125 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), free_members(), init_members(), and read_dsp().

GTime* GSPIEventCube::m_time
protected

Time array.

Definition at line 129 of file GSPIEventCube.hpp.

Referenced by alloc_data(), copy_members(), free_members(), init_members(), read_gti(), and set_bin().


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