BasicArchive.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2002 by Aidan Hotan
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/Base/Classes/Pulsar/BasicArchive.h
10 
11 #ifndef __BasicArchive_h
12 #define __BasicArchive_h
13 
14 #include "Pulsar/Archive.h"
15 
16 namespace Pulsar {
17 
19 
32  class BasicArchive : public Archive {
33 
34  public:
35 
38 
40  BasicArchive (const BasicArchive& archive);
41 
43  const BasicArchive& operator = (const BasicArchive& archive);
44 
46  ~BasicArchive ();
47 
48  // //////////////////////////////////////////////////////////////////
49  //
50  // implement the pure virtual methods of the Archive base class
51  //
52 
54  virtual std::string get_telescope () const;
56  virtual void set_telescope (const std::string&);
57 
59  virtual Signal::State get_state () const;
61  virtual void set_state (Signal::State state);
62 
64  virtual Signal::Scale get_scale () const;
66  virtual void set_scale (Signal::Scale scale);
67 
69  virtual Signal::Source get_type () const;
71  virtual void set_type (Signal::Source type);
72 
74  virtual std::string get_source () const;
76  virtual void set_source (const std::string& source);
77 
79  virtual sky_coord get_coordinates () const;
81  virtual void set_coordinates (const sky_coord& coordinates);
82 
84 
85  virtual unsigned get_nbin () const;
86 
88 
89  virtual unsigned get_nchan () const;
90 
92 
93  virtual unsigned get_npol () const;
94 
96 
97  virtual unsigned get_nsubint () const;
98 
100  virtual double get_bandwidth () const;
102  virtual void set_bandwidth (double bw);
103 
105  virtual double get_centre_frequency () const;
107  virtual void set_centre_frequency (double cf);
108 
110  virtual double get_dispersion_measure () const;
112  virtual void set_dispersion_measure (double dm);
113 
115  virtual bool get_dedispersed () const;
117  virtual void set_dedispersed (bool done = true);
118 
120  virtual double get_rotation_measure () const;
122  virtual void set_rotation_measure (double rm);
123 
125  virtual bool get_faraday_corrected () const;
127  virtual void set_faraday_corrected (bool done = true);
128 
130  virtual bool get_poln_calibrated () const;
132  virtual void set_poln_calibrated (bool done = true);
133 
135 
137  static void ensure_linkage ();
138 
139  protected:
140 
142 
143  virtual void set_nbin (unsigned nbin);
144 
146 
147  virtual void set_nchan (unsigned nchan);
148 
150 
151  virtual void set_npol (unsigned npol);
152 
154 
155  virtual void set_nsubint (unsigned nsubint);
156 
158  std::string telescope;
159 
162 
165 
168 
171 
173  std::string source;
174 
177 
179 
180  unsigned nbin;
181 
183 
184  unsigned nchan;
185 
187 
188  unsigned npol;
189 
191 
192  unsigned nsubint;
193 
195  double bandwidth;
196 
199 
201  double dispersion_measure;
202 
204  double rotation_measure;
205 
207  bool dedispersed;
208 
210  bool faraday_corrected;
211 
213  bool poln_calibrated;
214 
216  Integration* new_Integration (const Integration* copy_this = 0);
217 
218  };
219 
220 }
221 
222 #endif
223 
virtual unsigned get_nsubint() const
Get the number of sub-integrations stored in the file.
Definition: BasicArchive.C:90
Integration * new_Integration(const Integration *copy_this=0)
Return a pointer to a new BasicIntegration.
Definition: BasicArchive.C:74
virtual unsigned get_nbin() const
Get the number of pulsar phase bins used.
Definition: BasicArchive.C:126
double centre_frequency
The centre frequency of the observation.
Definition: BasicArchive.h:208
virtual bool get_faraday_corrected() const
data have been corrected for ISM faraday rotation
Definition: BasicArchive.C:267
virtual Signal::Scale get_scale() const
Get the scale in which flux density is measured.
Definition: BasicArchive.C:220
virtual void set_bandwidth(double bw)
Set the overall bandwidth of the observation.
Definition: BasicArchive.C:190
static void ensure_linkage()
Ensure that BasicArchive code is linked.
Definition: BasicArchive.C:13
virtual unsigned get_npol() const
Get the number of frequency channels used.
Definition: BasicArchive.C:102
virtual double get_centre_frequency() const
Get the centre frequency of the observation.
Definition: BasicArchive.C:196
BasicArchive()
null constructor
Definition: BasicArchive.C:18
double dispersion_measure
The dispersion measure (in )
Definition: BasicArchive.h:211
Signal::Basis basis
The feed configuration of the receiver.
Definition: BasicArchive.h:171
virtual void set_dispersion_measure(double dm)
Set the dispersion measure (in )
Definition: BasicArchive.C:238
Signal::Source type
The observation type (psr, cal)
Definition: BasicArchive.h:180
Signal::Scale scale
The scale in which flux density is measured.
Definition: BasicArchive.h:177
virtual void set_telescope(const std::string &)
 Set the name of the telescope
Definition: BasicArchive.C:144
virtual Signal::State get_state() const
Get the state of the profiles.
Definition: BasicArchive.C:208
virtual void set_coordinates(const sky_coord &coordinates)
Set the coordinates of the source.
Definition: BasicArchive.C:178
virtual unsigned get_nchan() const
Get the number of frequency channels used.
Definition: BasicArchive.C:114
virtual std::string get_source() const
Get the source name.
Definition: BasicArchive.C:155
virtual Signal::Source get_type() const
Get the observation type (psr, cal)
Definition: BasicArchive.C:150
virtual void set_scale(Signal::Scale scale)
Set the scale in which flux density is measured.
Definition: BasicArchive.C:226
unsigned nchan
The number of frequency channels used.
Definition: BasicArchive.h:194
virtual void set_nsubint(unsigned nsubint)
Set the number of sub-integrations stored in the file.
Definition: BasicArchive.C:96
virtual void set_npol(unsigned npol)
Set the number of frequency channels used.
Definition: BasicArchive.C:108
std::string source
The source name.
Definition: BasicArchive.h:183
virtual double get_dispersion_measure() const
Get the dispersion measure (in )
Definition: BasicArchive.C:232
virtual void set_nchan(unsigned nchan)
Set the number of frequency channels used.
Definition: BasicArchive.C:120
bool poln_calibrated
Data has been poln calibrated.
Definition: BasicArchive.h:223
Array of Profiles integrated over the same time interval.
Definition: Integration.h:37
virtual sky_coord get_coordinates() const
Get the coordinates of the source.
Definition: BasicArchive.C:172
virtual std::string get_telescope() const
 Get the name of the telescope
Definition: BasicArchive.C:138
virtual void set_centre_frequency(double cf)
Set the centre frequency of the observation.
Definition: BasicArchive.C:202
BasicIntegration class.
Definition: BasicIntegration.h:24
bool faraday_corrected
data have been corrected for ISM faraday rotation
Definition: BasicArchive.h:220
unsigned npol
The number of frequency channels used.
Definition: BasicArchive.h:198
virtual double get_bandwidth() const
Get the overall bandwidth of the observation.
Definition: BasicArchive.C:184
unsigned nbin
The number of pulsar phase bins used.
Definition: BasicArchive.h:190
virtual void set_type(Signal::Source type)
Set the observation type (psr, cal)
Definition: BasicArchive.C:161
virtual bool get_dedispersed() const
Inter-channel dispersion delay has been removed.
Definition: BasicArchive.C:279
const BasicArchive & operator=(const BasicArchive &archive)
assignment operator
Definition: BasicArchive.C:42
double bandwidth
The overall bandwidth of the observation.
Definition: BasicArchive.h:205
virtual bool get_poln_calibrated() const
Data has been poln calibrated.
Definition: BasicArchive.C:254
~BasicArchive()
destructor
Definition: BasicArchive.C:63
unsigned nsubint
The number of sub-integrations stored in the file.
Definition: BasicArchive.h:202
Defines the pure virtual methods declared in Pulsar::Archive.
Definition: BasicArchive.h:37
virtual double get_rotation_measure() const
Get the rotation measure (in )
Definition: BasicArchive.C:243
Defines the PSRCHIVE library.
Definition: CalSource.h:17
virtual void set_state(Signal::State state)
Set the state of the profiles.
Definition: BasicArchive.C:214
virtual void set_faraday_corrected(bool done=true)
Set the status of the ISM RM flag.
Definition: BasicArchive.C:273
virtual void set_poln_calibrated(bool done=true)
Set the status of the poln calibrated flag.
Definition: BasicArchive.C:260
bool dedispersed
data have been dedispersed
Definition: BasicArchive.h:217
double rotation_measure
The rotation measure (in )
Definition: BasicArchive.h:214
virtual void set_source(const std::string &source)
Set the source name.
Definition: BasicArchive.C:166
Signal::State state
The state of the profiles.
Definition: BasicArchive.h:174
virtual void set_rotation_measure(double rm)
Set the rotation measure (in )
Definition: BasicArchive.C:248
virtual void set_nbin(unsigned nbin)
Set the number of pulsar phase bins used.
Definition: BasicArchive.C:132
virtual void set_dedispersed(bool done=true)
Set the status of the dispersion delay flag.
Definition: BasicArchive.C:285
std::string telescope
 The name of the telescope
Definition: BasicArchive.h:168
sky_coord coordinates
The coordinates of the source.
Definition: BasicArchive.h:186

Generated using doxygen 1.8.17