116 const std::string& usage,
117 const std::string& mode)
123 load(filename, usage, mode);
219 const std::string& usage,
220 const std::string& mode)
223 GFits fits(filename);
229 read(hdu, usage, mode);
248 const bool& clobber)
const
281 const std::string& usage,
282 const std::string& mode)
288 int num = table.
nrows();
302 for (
int i = 0; i < num; ++i) {
305 if (!usage.empty() && ptr_usage->
string(i) != usage) {
310 if (!mode.empty() && ptr_mode->
string(i) != mode) {
363 col_start_tjd.
unit(
"d");
364 col_end_tjd.
unit(
"d");
367 for (
int i = 0; i <size; ++i) {
373 col_usage(i) =
"YES";
374 col_mode(i) =
"NORMAL";
380 table.
append(col_start_tjd);
381 table.
append(col_start_tic);
382 table.
append(col_end_tjd);
383 table.
append(col_end_tic);
387 table.
append(col_descrip);
417 result.append(
"=== GCOMTim ===");
432 result.append(
" - ");
438 result.append(
" - ");
442 result.append(
" - ");
Implementation of support function used by COMPTEL classes.
COMPTEL Good Time Intervals class definition.
FITS binary table class definition.
FITS table string column class interface definition.
FITS table unsigned long integer column class interface definition.
FITS table abstract base class interface definition.
FITS file class interface definition.
COMPTEL Good Time Intervals class.
GGti m_gti
Good Time intervals.
const GGti & gti(void) const
Return Good Time Intervals.
void write(GFitsBinTable &table) const
Write COMPTEL Good Time Intervals into FITS binary table.
GCOMTim(void)
Void constructor.
virtual void clear(void)
Clear COMPTEL good time intervals.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print COMPTEL Good Time Intervals.
void load(const GFilename &filename, const std::string &usage="YES", const std::string &mode="NORMAL")
Load COMPTEL Good Time Intervals from FITS file.
void init_members(void)
Initialise class members.
virtual ~GCOMTim(void)
Destructor.
GCOMTim & operator=(const GCOMTim &tim)
Assignment operator.
void free_members(void)
Delete class members.
void copy_members(const GCOMTim &tim)
Copy class members.
void save(const GFilename &filename, const bool &clobber=false) const
Save Good Time Intervals into FITS file.
void read(const GFitsTable &table, const std::string &usage="YES", const std::string &mode="NORMAL")
Read COMPTEL Good Time Intervals from FITS table.
virtual GCOMTim * clone(void) const
Clone COMPTEL good time intervals.
std::string url(void) const
Return Uniform Resource Locator (URL)
const std::string & extname(void) const
Return extension name.
Abstract interface for FITS table column.
virtual int integer(const int &row, const int &inx=0) const =0
virtual std::string string(const int &row, const int &inx=0) const =0
void unit(const std::string &unit)
Set column unit.
FITS table string column.
FITS table unsigned long integer column.
Abstract interface for FITS table.
GFitsTableCol * append(const GFitsTableCol &column)
Append column to the table.
const int & nrows(void) const
Return number of rows in table.
void saveto(const GFilename &filename, const bool &clobber=false)
Saves to specified FITS file.
GFitsHDU * append(const GFitsHDU &hdu)
Append HDU to FITS file.
void close(void)
Close FITS file.
GFitsTable * table(const int &extno)
Get pointer to table HDU.
Good Time Interval class.
void insert(const GTime &tstart, const GTime &tstop)
Insert Good Time Interval.
const double & telapse(void) const
Returns elapsed time.
const GTime & tstop(void) const
Returns latest stop time in Good Time Intervals.
int size(void) const
Return number of Good Time Intervals.
const double & ontime(void) const
Returns ontime.
void merge(void)
Merge all overlapping Good Time Intervals.
const GTime & tstart(void) const
Returns earliest start time in Good Time Intervals.
void clear(void)
Clear Good Time Intervals.
double mjd(void) const
Return time in Modified Julian Days (TT)
std::string utc(const int &precision=0) const
Return time as string in UTC time system.
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.
int com_tics(const GTime &time)
Convert GTime in COMPTEL tics.
int com_tjd(const GTime &time)
Convert GTime in COMPTEL TJD.
GTime com_time(const int &tjd, const int &tics)
Convert TJD and COMPTEL tics in GTime object.