Implements Predictor class for Tempo. More...

#include <polyco.h>

Inheritance diagram for polyco:
Pulsar::Predictor Reference::Able Reference::HeapTracked

Public Member Functions

 polyco ()
 Default constructor.
 polyco (const polyco &)
 Copy constructor.
const polycooperator= (const polyco &)
 Assignment operator.
 ~polyco ()
 Destructor.
Predictorclone () const
 Return a new, copy constructed instance of self.
Pulsar::Generatorgenerator () const
 Return a new Generator set up to produce a new Predictor like self.
void insert (const Predictor *)
 Add the information from the supplied predictor to self.
void keep (const std::vector< MJD > &epochs)
 Keep only the components required to span the given epochs.
bool matches (const Predictor *) const
 Return true if the Predictor configuration matches this.
void set_observing_frequency (long double MHz)
 Set the observing frequency at which predictions will be made.
long double get_observing_frequency () const
 Get the observing frequency at which phase and epoch are related.
Pulsar::Phase phase (const MJD &t) const
 Return the phase, given the epoch.
Pulsar::Phase phase (const MJD &t, long double MHz) const
 Return the phase plus the dispersion delay.
MJD iphase (const Pulsar::Phase &phase, const MJD *guess=0) const
 Return the epoch, given the phase.
long double frequency (const MJD &t) const
 Return the spin frequency, given the epoch.
Pulsar::Phase dispersion (const MJD &t, long double MHz) const
 Return the phase correction for dispersion delay.
void load (FILE *)
 Load from an open stream.
void unload (FILE *) const
 Unload to an open stream.
 polyco (const std::string &id)
 Load in polycos.
int load (const std::string &filename)
 these functions return the number of polynomials successfully loaded
int load (std::string *instr)
int unload (const std::string &filename) const
int unload (std::string *outstr) const
void append (const polyco &poly)
void prettyprint () const
const polynomialnearest (const MJD &t) const
const polynomialbest (const MJD &t) const
const polynomialbest (const Pulsar::Phase &p) const
int i_nearest (const MJD &t, bool throw_exception=false) const
int i_nearest (const Pulsar::Phase &p, bool throw_exception=false) const
double doppler_shift (const MJD &t) const
double period (const MJD &t) const
double chirp (const MJD &t) const
double accel (const MJD &t) const
char get_telescope () const
double get_freq () const
MJD get_reftime () const
double get_refperiod () const
double get_nspan () const
float get_dm () const
int get_ncoeff () const
std::string get_psrname () const
bool is_tempov11 () const
MJD start_time () const
MJD end_time () const
Pulsar::Phase start_phase () const
Pulsar::Phase end_phase () const
Public Member Functions inherited from Pulsar::Predictor
virtual void insert (const Predictor *)=0
 Add the information from the supplied predictor to self.
virtual bool matches (const Predictor *) const =0
 Return true if the Predictor configuration matches this.
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.

Public Attributes

std::vector< polynomialpollys
 The polynomial sets.

Static Public Attributes

static bool debug = false
Static Public Attributes inherited from Pulsar::Predictor
static bool verbose = false
 Verbosity flag.

Friends

bool operator== (const polyco &p1, const polyco &p2)
bool operator!= (const polyco &p1, const polyco &p2)

Additional Inherited Members

Public Types inherited from Pulsar::Predictor
enum  Policy { Input , Default , Ephemeris }
 Policy for creating new predictors. More...
Static Public Member Functions inherited from Pulsar::Predictor
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.
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

Implements Predictor class for Tempo.

Member Function Documentation

◆ clone()

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

Return a new, copy constructed instance of self.

Implements Pulsar::Predictor.

References polyco().

◆ dispersion()

Pulsar::Phase polyco::dispersion ( const MJD & t,
long double MHz ) const
inlinevirtual

Return the phase correction for dispersion delay.

Implements Pulsar::Predictor.

◆ frequency()

long double polyco::frequency ( const MJD & t) const
inlinevirtual

Return the spin frequency, given the epoch.

Implements Pulsar::Predictor.

◆ generator()

Pulsar::Generator * polyco::generator ( ) const
virtual

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

Implements Pulsar::Predictor.

References Tempo::Predict::set_ncoef(), and Tempo::Predict::set_nspan().

◆ get_observing_frequency()

long double polyco::get_observing_frequency ( ) const
virtual

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

Implements Pulsar::Predictor.

◆ iphase()

MJD polyco::iphase ( const Pulsar::Phase & phase,
const MJD * guess = 0 ) const
inlinevirtual

Return the epoch, given the phase.

Implements Pulsar::Predictor.

References phase().

◆ keep()

void polyco::keep ( const std::vector< MJD > & epochs)
virtual

Keep only the components required to span the given epochs.

Implements Pulsar::Predictor.

References keep(), pollys, and Pulsar::Predictor::verbose.

Referenced by keep().

◆ load()

void polyco::load ( FILE * fptr)
virtual

Load from an open stream.

Implements Pulsar::Predictor.

References load(), and Pulsar::Predictor::verbose.

Referenced by load(), load(), and polyco().

◆ matches()

bool polyco::matches ( const Predictor * ) const

Return true if the Predictor configuration matches this.

Add the information from the supplied predictor to self.

References polyco().

◆ phase()

Pulsar::Phase polyco::phase ( const MJD & t) const
inlinevirtual

Return the phase, given the epoch.

Implements Pulsar::Predictor.

Referenced by iphase().

◆ set_observing_frequency()

void polyco::set_observing_frequency ( long double MHz)
virtual

Set the observing frequency at which predictions will be made.

Implements Pulsar::Predictor.

◆ unload()

void polyco::unload ( FILE * fptr) const
virtual

Unload to an open stream.

Implements Pulsar::Predictor.

References unload(), and Pulsar::Predictor::verbose.

Referenced by unload().


The documentation for this class was generated from the following files:

Generated using doxygen 1.14.0