BasicIntegration.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2002 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/Base/Classes/Pulsar/BasicIntegration.h
10 
11 #ifndef __BasicIntegration_h
12 #define __BasicIntegration_h
13 
14 #include "Pulsar/Integration.h"
15 
16 namespace Pulsar {
17 
19  class BasicIntegration : public Integration {
20 
21  public:
22 
25 
27  BasicIntegration (const BasicIntegration& subint);
28 
30  BasicIntegration (const Integration* subint);
31 
33  virtual ~BasicIntegration () { }
34 
36  virtual Integration* clone () const;
37 
39 
40  virtual unsigned get_nchan () const { return nchan; }
41 
43 
44  virtual unsigned get_npol () const { return npol; }
45 
47 
48  virtual unsigned get_nbin () const { return nbin; }
49 
51  virtual MJD get_epoch() const { return epoch; }
53  virtual void set_epoch (const MJD& mjd) { epoch = mjd; }
54 
56  virtual double get_duration() const { return duration; }
58  virtual void set_duration (double seconds) { duration = seconds; }
59 
61  virtual double get_folding_period() const { return pfold; }
63  virtual void set_folding_period (double seconds) { pfold = seconds; }
64 
66  virtual double get_gate_duty_cycle() const { return gate; }
68  virtual void set_gate_duty_cycle (double turns) { gate = turns; }
69 
70  protected:
71 
73 
74  virtual void set_nbin (unsigned numbins) { nbin = numbins; }
75 
77 
78  virtual void set_nchan (unsigned numchan) { nchan = numchan; }
79 
81 
82  virtual void set_npol (unsigned numpol) { npol = numpol; }
83 
85  unsigned npol;
86 
88  unsigned nchan;
89 
91  unsigned nbin;
92 
94  MJD epoch;
95 
97  double duration;
98 
100  double pfold;
101 
103  double gate;
104 
106  void init();
107 
108  };
109 
110 }
111 
112 #endif
virtual Integration * clone() const
Return the pointer to a new copy of self.
Definition: BasicIntegration.C:38
double duration
duration of integration
Definition: BasicIntegration.h:107
virtual void set_nbin(unsigned numbins)
Set the number of pulsar phase bins.
Definition: BasicIntegration.h:84
unsigned nbin
number of bins
Definition: BasicIntegration.h:101
static bool verbose
flag controls the amount output to stderr by Integration methods
Definition: Integration.h:42
virtual double get_duration() const
Get the total time integrated (in seconds)
Definition: BasicIntegration.h:66
virtual unsigned get_nchan() const
Get the number of chans.
Definition: BasicIntegration.h:50
unsigned nchan
number of sub-chans
Definition: BasicIntegration.h:98
virtual void set_nchan(unsigned numchan)
Set the number of frequency channels.
Definition: BasicIntegration.h:88
BasicIntegration()
null constructor
Definition: BasicIntegration.h:34
Array of Profiles integrated over the same time interval.
Definition: Integration.h:37
void init()
initialize all attributes to null
Definition: BasicIntegration.C:12
virtual void set_epoch(const MJD &mjd)
Set the epoch of the rising edge of bin zero.
Definition: BasicIntegration.h:63
BasicIntegration class.
Definition: BasicIntegration.h:24
virtual void set_gate_duty_cycle(double turns)
Set the fraction of the pulse period recorded (in turns)
Definition: BasicIntegration.h:78
unsigned npol
number of polarization measurments
Definition: BasicIntegration.h:95
virtual double get_folding_period() const
Get the folding period (in seconds)
Definition: BasicIntegration.h:71
virtual void set_folding_period(double seconds)
Set the folding period (in seconds)
Definition: BasicIntegration.h:73
virtual double get_gate_duty_cycle() const
Get the fraction of the pulse period recorded (in turns)
Definition: BasicIntegration.h:76
virtual void set_npol(unsigned numpol)
Set the number of polarization measurements.
Definition: BasicIntegration.h:92
virtual MJD get_epoch() const
Get the epoch of the rising edge of bin zero.
Definition: BasicIntegration.h:61
virtual unsigned get_npol() const
Get the number of polarization measurements.
Definition: BasicIntegration.h:54
Defines the PSRCHIVE library.
Definition: CalSource.h:17
virtual ~BasicIntegration()
destructor
Definition: BasicIntegration.h:43
double gate
gate duty cycle (in turns)
Definition: BasicIntegration.h:113
virtual void set_duration(double seconds)
Set the total time integrated (in seconds)
Definition: BasicIntegration.h:68
MJD epoch
Epoch of the rising edge of bin zero.
Definition: BasicIntegration.h:104
double pfold
folding period (in seconds)
Definition: BasicIntegration.h:110
virtual unsigned get_nbin() const
Get the number of bins in each profile.
Definition: BasicIntegration.h:58

Generated using doxygen 1.8.17