37 static const float UNSET;
139 toa (
Format fmt = Psrclock);
140 virtual ~toa () { destroy(); };
144 toa& operator = (
const toa & in_toa);
147 toa (FILE* instream);
153 void set_format (
Format fmt) { format = fmt; };
156 void set_bw (
float b) {
bandwidth = b; };
157 void set_dur (
float d) {
duration = d; };
159 void set_state (State st) { state = st; };
161 void set_frequency (
double freq) {
frequency = freq; };
162 void set_arrival (
const MJD& arrived) {
arrival = arrived; };
163 void set_error (
float err) {
error = err; };
165 void set_flux (
const Estimate<float>& x) { flux = x; }
167 void set_telescope (
const std::string& telcode);
168 void set_auxilliary_text (
const std::string& text) {
auxinfo = text; };
169 void set_channel (
unsigned chan) {
channel = chan; };
170 void set_subint (
unsigned sub) {
subint = sub; };
172 void set_phase_info (
bool info) { phase_info = info; };
174 Format get_format ()
const {
return format; };
177 float get_bw ()
const {
return bandwidth; };
178 float get_dur ()
const {
return duration; };
180 State get_state ()
const {
return state; };
182 double get_frequency ()
const {
return frequency; };
183 MJD get_arrival ()
const {
return arrival; };
184 float get_error ()
const {
return error; };
186 Estimate<float> get_flux ()
const {
return flux; }
189 std::string get_telescope ()
const {
return telescope; };
190 std::string get_auxilliary_text ()
const {
return auxinfo; };
191 double get_phase_shift ()
const {
return phase_shift; };
192 unsigned get_channel ()
const {
return channel; };
193 unsigned get_subint ()
const {
return subint; };
197 int load (FILE* instream);
198 int load (
const char* instring);
199 int unload (FILE* outstream,
Format fmt = Unspecified)
const;
200 int unload (
char* outstring,
Format fmt = Unspecified)
const;
202 int parkes_parse (
const char* instring);
203 int parkes_out (
char* outstring)
const;
204 int Parkes_load (
const char* instring);
205 int Parkes_unload (FILE* outstream)
const;
206 int Parkes_unload (
char* outstring)
const;
208 int Princeton_load (
const char* instring);
209 int Princeton_unload (FILE* outstream)
const;
210 int Princeton_unload (
char* outstring)
const;
212 int Psrclock_load (
const char* instring);
213 int Psrclock_unload (FILE* outstream)
const;
214 int Psrclock_unload (
char* outstring)
const;
216 std::string Psrclock_unload ()
const;
218 int Command_load (
const char* instring);
219 int Command_unload (FILE* outstream)
const;
220 int Command_unload (
char* outstring)
const;
222 int Comment_unload (FILE* outstream)
const;
223 int Comment_unload (
char* outstring)
const;
227 int Tempo2_unload (FILE* outstream)
const;
228 int Tempo2_unload (
char* outstring)
const;
230 int Tempo_unload (FILE* outstream)
const;
231 int Tempo_unload (
char* outstring)
const;
234 friend int operator < (
const toa& t1,
const toa& t2)
235 {
return (t1.arrival < t2.arrival); };
238 static int load (
const char* filename, std::vector<toa>* toas);
239 static int load (FILE* instream, std::vector<toa>* toas);
241 static int unload (
const char* filename,
const std::vector<toa>& toas,
242 Format fmt = Unspecified);
243 static int unload (FILE* outstream,
const std::vector<toa>& toas,
244 Format fmt = Unspecified);
252 static void sizebuf (
size_t length);
255 static char datestr [25];
258 std::ostream& operator << (std::ostream&,
toa::Format format);
259 std::istream& operator >> (std::istream&,
toa::Format& format);
Class for representing modified Julian dates with high precision.
Definition MJD.h:23
Describes a pulse Time of Arrival (TOA)
Definition toa.h:33
std::string auxinfo
Typically the name of the data file.
Definition toa.h:100
float duration
Duration (s) aka integration length.
Definition toa.h:112
unsigned subint
Sub-integration index in data file.
Definition toa.h:90
float error
TOA uncertainty in microseconds.
Definition toa.h:75
float bandwidth
Bandwidth (MHz)
Definition toa.h:109
char observatory[2]
Observatory (two-letter code)
Definition toa.h:97
float parallactic_angle
Parallactic angle ???
Definition toa.h:106
double frequency
Observing frequency (MHz)
Definition toa.h:69
double phase_shift
Phase shift (turns) computed by the phase shift estimator.
Definition toa.h:81
float dispersion_measure_correction
Dispersion measure correction (pc cm^-3)
Definition toa.h:119
unsigned channel
Frequency channel index in data file.
Definition toa.h:87
float phs
Phase offset (turns, added to TOA)
Definition toa.h:94
MJD arrival
Time of arrival, TOA.
Definition toa.h:72
float reduced_chisq
Goodness-of-fit (reduced chisq) reported by the phase shift estimator.
Definition toa.h:78
double dispersion_measure
Dispersion measure, DM (pc cm^-3)
Definition toa.h:115
std::string telescope
Observatory code.
Definition toa.h:84
Format
TOA output format.
Definition toa.h:41
Estimate< double > dispersion_measure_estimate
Estimated dispersion measure (pc cm^-3)
Definition toa.h:122
float signal_to_noise
Signal-to-noise ratio estimate.
Definition toa.h:103
Interface to Tempo.
Definition fit.C:22