Predict.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2004 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/Util/tempo/Predict.h
10
11#ifndef __Tempo_Predict_h
12#define __Tempo_Predict_h
13
14#include "Pulsar/Generator.h"
15#include "Configuration.h"
16#include "polyco.h"
17
18namespace Tempo {
19
21 class Predict : public Pulsar::Generator {
22
23 public:
24
27
30
33
34 //
35 // Pulsar::Generator interface
36 //
37
39 Predict* clone () const;
40
43
45 void set_time_span (const MJD& start, const MJD& finish);
46
48 void set_frequency_span (long double low, long double high);
49
51 void set_site (const std::string&);
52
55
56 //
57 // Original interface
58 //
59
61
62 void set_asite (char code);
63
65
66 void set_frequency (double MHz);
67
69
70 void set_maxha (unsigned hours);
71
73
74 void set_nspan (unsigned minutes);
75
77
78 void set_ncoef (unsigned ncoef);
79
81 void set_verify (bool verify);
82
84 polyco get_polyco (const MJD& m1, const MJD& m2);
85
87 void write_tzin () const;
88
89 protected:
90
92 char asite;
93
95 double frequency;
96
98 unsigned maxha;
99
101 unsigned nspan;
102
104 unsigned ncoef;
105
108
110 std::string psrname;
111
113 bool verify;
114
115 MJD m1, m2;
116
118 polyco generate_work () const;
119
120 private:
121
124
125
126 };
127
128}
129
130#endif
A configurable parameter.
Definition Configuration.h:83
Class for representing modified Julian dates with high precision.
Definition MJD.h:23
Generator of functions that predict pulse phase.
Definition Generator.h:26
Storage of pulsar parameters used to create a Predictor.
Definition Parameters.h:23
Functions that predict pulse phase.
Definition Predictor.h:28
Template class manages Reference::Able objects.
Definition ReferenceTo.h:25
Predict(const Pulsar::Parameters *parameters=0)
Default constructor.
polyco generate_work() const
Does the work for the two different interfaces.
Definition Predict.C:254
void set_frequency(double MHz)
Set the observing frequency.
Definition Predict.C:88
Predict * clone() const
Return a new, copy constructed instance of self.
Definition Predict.C:53
unsigned ncoef
The number of coefficients per polynomial ephemeris.
Definition Predict.h:104
static Configuration::Parameter< unsigned > & get_minimum_nspan()
The minimum value of nspan allowed.
void set_ncoef(unsigned ncoef)
Set the number of coefficients per polynomial ephemeris.
Definition Predict.C:121
Pulsar::Predictor * generate() const
Return a new Predictor instance.
Definition Predict.C:244
void set_parameters(const Pulsar::Parameters *)
Set the parameters used to generate the predictor.
Definition Predict.C:130
polyco get_polyco(const MJD &m1, const MJD &m2)
Returns a polyco valid over the range in MJD specified by m1 and m2.
Definition Predict.C:235
unsigned nspan
The time spanned by each polynomial ephemeris in minutes.
Definition Predict.h:101
bool verify
Verify the time spanned by polynomial ephemerides.
Definition Predict.h:113
double frequency
The observing frequency in MHz.
Definition Predict.h:95
Reference::To< const Pulsar::Parameters > parameters
The pulsar parameters.
Definition Predict.h:107
void set_frequency_span(long double low, long double high)
Set the range of frequencies over which to generate.
Definition Predict.C:66
void set_site(const std::string &)
Set the site at which the signal is observed.
Definition Predict.C:72
void set_verify(bool verify)
Set flag to verify time spanned by polynomial ephemerides.
Definition Predict.C:184
void set_time_span(const MJD &start, const MJD &finish)
Set the range of epochs over which to generate.
Definition Predict.C:59
static Configuration::Parameter< double > & get_maximum_rms()
The maximum rms allowed, in turns.
void set_nspan(unsigned minutes)
Set the time spanned by each polynomial ephemeris.
Definition Predict.C:104
char asite
The observatory site code.
Definition Predict.h:92
unsigned maxha
The maximum hour angle of observations in hours.
Definition Predict.h:98
void write_tzin() const
Write the tz.in file according to the tempo definition.
Definition Predict.C:207
void set_asite(char code)
Set the observatory site code.
Definition Predict.C:77
std::string psrname
The pulsar name.
Definition Predict.h:110
void set_maxha(unsigned hours)
Set the maximum hour angle of observations.
Definition Predict.C:96
Implements Predictor class for Tempo.
Definition polyco.h:188
Interface to Tempo.
Definition fit.C:22
char code(const std::string &telescope_name)
Convert a telescope name to a single-character tempo code.
Definition tempo++.C:167

Generated using doxygen 1.14.0