FixedFrequencyPredictor.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2015 by Matthew Kerr
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __FixedFrequencyPredictor_h
10 #define __FixedFrequencyPredictor_h
11 
12 #include "Pulsar/Predictor.h"
13 
14 namespace Pulsar {
15 
17 
19  class FixedFrequencyPredictor : public Predictor {
20 
21  public:
22 
25 
27  FixedFrequencyPredictor (long double Hz);
28 
30  void set_topocentric_frequency (long double Hz);
31 
33  long double get_topocentric_frequency () const;
34 
36  void set_epoch (const MJD& t);
37 
39  const MJD& get_epoch () const;
40 
42  virtual void set_observing_frequency (long double MHz);
43 
45  virtual long double get_observing_frequency () const;
46 
48  virtual Phase phase (const MJD& t) const;
49 
51  virtual MJD iphase (const Phase& phase, const MJD* guess = 0) const;
52 
54  virtual long double frequency (const MJD& t) const;
55 
57  virtual Phase dispersion (const MJD &t, long double MHz) const;
58 
59  // "implement" pure virtual functions we do not need
60  virtual Predictor* clone() const {return 0;}
61  virtual Generator* generator() const {return 0;}
62  virtual void insert (const Predictor*) {}
63  virtual void keep (const std::vector<MJD>&) {}
64  virtual bool matches (const Predictor*) const {return 0;}
65  virtual void load (FILE*) {}
66  virtual void unload (FILE*) const {}
67 
68 
69  protected:
70 
72  long double m_freq;
73 
75  long double m_obs_freq;
76 
78  MJD m_epoch;
79 
80  };
81 
82 }
83 
84 #endif
@ Pulsar
A pulsar.
Definition: Types.h:63
FixedFrequencyPredictor()
Set frequency later.
Definition: FixedFrequencyPredictor.C:19
MJD m_epoch
epoch (basically used for reference phase)
Definition: FixedFrequencyPredictor.h:88
virtual void unload(FILE *) const
Unload to an open stream.
Definition: FixedFrequencyPredictor.h:76
void set_epoch(const MJD &t)
Set the epoch.
Definition: FixedFrequencyPredictor.C:43
long double m_freq
The fixed topocentric frequency.
Definition: FixedFrequencyPredictor.h:82
virtual void set_observing_frequency(long double MHz)
Set the observing frequency at which phase and time are related.
Definition: FixedFrequencyPredictor.C:35
virtual Predictor * clone() const
Return a new, copy constructed instance of self.
Definition: FixedFrequencyPredictor.h:70
long double m_obs_freq
The observing frequency – irrelevant.
Definition: FixedFrequencyPredictor.h:85
void set_topocentric_frequency(long double Hz)
Set the frequency at which data are folded (Hz)
Definition: FixedFrequencyPredictor.C:27
virtual MJD iphase(const Phase &phase, const MJD *guess=0) const
Return the epoch, given the phase and, optionally, a first guess.
Definition: FixedFrequencyPredictor.C:57
const MJD & get_epoch() const
Get the epoch.
Definition: FixedFrequencyPredictor.C:47
virtual Generator * generator() const
Return a new Generator set up to produce a new Predictor like self.
Definition: FixedFrequencyPredictor.h:71
long double get_topocentric_frequency() const
Get the topocentric frequency at which data are folded (Hz)
Definition: FixedFrequencyPredictor.C:31
Generator of functions that predict pulse phase.
Definition: Generator.h:31
virtual Phase phase(const MJD &t) const
Return the phase, given the epoch.
Definition: FixedFrequencyPredictor.C:51
virtual void load(FILE *)
Load from an open stream.
Definition: FixedFrequencyPredictor.h:75
Functions that predict pulse phase.
Definition: Predictor.h:33
virtual bool matches(const Predictor *) const
Return true if the Predictor configuration matches this.
Definition: FixedFrequencyPredictor.h:74
virtual Phase dispersion(const MJD &t, long double MHz) const
Return the phase correction for dispersion delay.
Definition: FixedFrequencyPredictor.C:67
virtual void insert(const Predictor *)
Add the information from the supplied predictor to self.
Definition: FixedFrequencyPredictor.h:72
virtual void keep(const std::vector< MJD > &)
Keep only the components required to span the given epochs.
Definition: FixedFrequencyPredictor.h:73
virtual long double frequency(const MJD &t) const
Return the spin frequency, given the epoch.
Definition: FixedFrequencyPredictor.C:62
Class for representing modified Julian dates with high precision.
Definition: MJD.h:27
virtual long double get_observing_frequency() const
Get the observing frequency at which phase and epoch are related.
Definition: FixedFrequencyPredictor.C:39

Generated using doxygen 1.8.17