Functions that predict pulse phase. More...

#include <Predictor.h>

Inheritance diagram for Pulsar::Predictor:
Reference::Able Reference::HeapTracked Pulsar::FixedFrequencyPredictor Pulsar::SimplePredictor Tempo2::Predictor polyco

Public Types

enum  Policy { Input , Default , Ephemeris }
 Policy for creating new predictors. More...

Public Member Functions

virtual Predictorclone () const =0
 Return a new, copy constructed instance of self.
virtual Generatorgenerator () const =0
 Return a new Generator set up to produce a new Predictor like self.
virtual void insert (const Predictor *)=0
 Add the information from the supplied predictor to self.
virtual void keep (const std::vector< MJD > &epochs)=0
 Keep only the components required to span the given epochs.
virtual bool matches (const Predictor *) const =0
 Return true if the Predictor configuration matches this.
virtual void set_observing_frequency (long double MHz)=0
 Set the observing frequency at which phase and time are related.
virtual long double get_observing_frequency () const =0
 Get the observing frequency at which phase and epoch are related.
virtual Phase phase (const MJD &t) const =0
 Return the phase, given the epoch.
virtual MJD iphase (const Phase &phase, const MJD *guess=0) const =0
 Return the epoch, given the phase and, optionally, a first guess.
virtual long double frequency (const MJD &t) const =0
 Return the spin frequency, given the epoch.
virtual Phase dispersion (const MJD &t, long double MHz) const =0
 Return the phase correction for dispersion delay.
virtual void load (FILE *)=0
 Load from an open stream.
virtual void unload (FILE *) const =0
 Unload to an open stream.
virtual void load_file (const std::string &filename)
 Load from the specified file.
virtual void unload_file (const std::string &filename) const
 Unload to the specified file.
Public Member Functions inherited from Reference::Able
 Able ()
 Default constructor.
 Able (const Able &)
 Copy constructor.
Ableoperator= (const Able &)
 Assignment operator.
virtual ~Able ()
 Destructor.
unsigned get_reference_count () const
 Returns the number of references there are to this.
Public Member Functions inherited from Reference::HeapTracked
 HeapTracked ()
 Default constructor.
 HeapTracked (const HeapTracked &)
 Copy constructor.
HeapTrackedoperator= (const HeapTracked &)
 Assignment operator.
virtual ~HeapTracked ()
 Destructor.
bool __is_on_heap () const
 Return true if this instance is found in heap addresses.

Static Public Member Functions

static Configuration::Parameter< Policy > & get_policy ()
 Policy for creating new predictors.
static void children (std::vector< Reference::To< Predictor > > &)
 Factory helper creates a vector of pointers to derived class instances.
Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 Returns the current number instances in existence.
Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 Records the addresses of new instances allocated on the heap.
static void operator delete (void *location, void *ptr)
 Placement delete overload to match the placement new overload.
static void operator delete (void *location)
 Regular delete overload.
static size_t get_heap_queue_size ()
 Return the number of heap addresses awaiting processing.

Static Public Attributes

static bool verbose = false
 Verbosity flag.

Additional Inherited Members

Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 Add the address of a reference to this object.
void __dereference (bool auto_delete=true) const
 Remove the address of a reference to this object.

Detailed Description

Functions that predict pulse phase.

This pure virtual base class defines the interface to pulse phase predictors

Member Enumeration Documentation

◆ Policy

Policy for creating new predictors.

Enumerator
Input 

Clone the input predictor.

Default 

Generate a new predictor using the default generator.

Ephemeris 

Generate a new predictor based on the input ephemeris.

Member Function Documentation

◆ clone()

virtual Predictor * Pulsar::Predictor::clone ( ) const
pure virtual

Return a new, copy constructed instance of self.

Implemented in polyco, Pulsar::FixedFrequencyPredictor, Pulsar::SimplePredictor, and Tempo2::Predictor.

◆ dispersion()

virtual Phase Pulsar::Predictor::dispersion ( const MJD & t,
long double MHz ) const
pure virtual

Return the phase correction for dispersion delay.

Implemented in polyco, Pulsar::FixedFrequencyPredictor, Pulsar::SimplePredictor, and Tempo2::Predictor.

◆ frequency()

virtual long double Pulsar::Predictor::frequency ( const MJD & t) const
pure virtual

Return the spin frequency, given the epoch.

Implemented in polyco, Pulsar::FixedFrequencyPredictor, Pulsar::SimplePredictor, and Tempo2::Predictor.

◆ generator()

virtual Generator * Pulsar::Predictor::generator ( ) const
pure virtual

Return a new Generator set up to produce a new Predictor like self.

Implemented in polyco, Pulsar::FixedFrequencyPredictor, Pulsar::SimplePredictor, and Tempo2::Predictor.

◆ get_observing_frequency()

virtual long double Pulsar::Predictor::get_observing_frequency ( ) const
pure virtual

Get the observing frequency at which phase and epoch are related.

Implemented in polyco, Pulsar::FixedFrequencyPredictor, Pulsar::SimplePredictor, and Tempo2::Predictor.

◆ insert()

virtual void Pulsar::Predictor::insert ( const Predictor * )
pure virtual

Add the information from the supplied predictor to self.

This method should check to avoid inconsistency and duplication

Implemented in Pulsar::FixedFrequencyPredictor, Pulsar::SimplePredictor, and Tempo2::Predictor.

◆ iphase()

virtual MJD Pulsar::Predictor::iphase ( const Phase & phase,
const MJD * guess = 0 ) const
pure virtual

Return the epoch, given the phase and, optionally, a first guess.

Implemented in polyco, Pulsar::FixedFrequencyPredictor, Pulsar::SimplePredictor, and Tempo2::Predictor.

References phase().

◆ keep()

virtual void Pulsar::Predictor::keep ( const std::vector< MJD > & epochs)
pure virtual

Keep only the components required to span the given epochs.

Implemented in polyco, Pulsar::FixedFrequencyPredictor, Pulsar::SimplePredictor, and Tempo2::Predictor.

◆ load()

virtual void Pulsar::Predictor::load ( FILE * )
pure virtual

Load from an open stream.

Implemented in polyco, Pulsar::FixedFrequencyPredictor, Pulsar::SimplePredictor, and Tempo2::Predictor.

Referenced by load_file().

◆ matches()

virtual bool Pulsar::Predictor::matches ( const Predictor * ) const
pure virtual

Return true if the Predictor configuration matches this.

Implemented in Pulsar::FixedFrequencyPredictor, Pulsar::SimplePredictor, and Tempo2::Predictor.

◆ phase()

virtual Phase Pulsar::Predictor::phase ( const MJD & t) const
pure virtual

Return the phase, given the epoch.

Implemented in polyco, Pulsar::FixedFrequencyPredictor, Pulsar::SimplePredictor, and Tempo2::Predictor.

Referenced by iphase().

◆ set_observing_frequency()

virtual void Pulsar::Predictor::set_observing_frequency ( long double MHz)
pure virtual

Set the observing frequency at which phase and time are related.

Implemented in polyco, Pulsar::FixedFrequencyPredictor, Pulsar::SimplePredictor, and Tempo2::Predictor.

◆ unload()

virtual void Pulsar::Predictor::unload ( FILE * ) const
pure virtual

Unload to an open stream.

Implemented in polyco, Pulsar::FixedFrequencyPredictor, Pulsar::SimplePredictor, and Tempo2::Predictor.

Referenced by unload_file().


The documentation for this class was generated from the following files:
  • Predictor.h
  • Predictor_children.C
  • polyco.C
  • Predictor.C

Generated using doxygen 1.14.0