T2Generator.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2007 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/Util/tempo2/T2Generator.h
10
11#ifndef __Tempo2Generator_h
12#define __Tempo2Generator_h
13
14#include "Pulsar/Generator.h"
15
16namespace Tempo2 {
17
18 class Predictor;
19
22
23 public:
24
26 static bool print_time;
27
29 Generator (const Pulsar::Parameters* parameters = 0);
30
32 ~Generator ();
33
35 Generator* clone () const;
36
39
41 void set_time_span (const MJD& start, const MJD& finish);
42
44 void set_time_ncoeff (unsigned ncoeff);
45
47 void set_frequency_span (long double low, long double high);
48
50 void set_frequency_ncoeff (unsigned ncoeff);
51
53 void set_site (const std::string&);
54
56 void set_segment_length (long double days);
57
60
62 static std::vector<std::string>& get_keywords ();
63
66
67 private:
68
71
72 long double epoch1, epoch2;
73 long double freq1, freq2;
74 std::string sitename;
75 int ntimecoeff, nfreqcoeff;
76
78 long double segment_length;
79
80 template<typename T> void work_around_tempo2_tzr_bug (T& psr) const;
81 };
82
83}
84
85#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
void set_frequency_span(long double low, long double high)
Set the range of frequencies over which to generate.
Definition T2Generator.C:182
Pulsar::Predictor * generate() const
Return a new Predictor instance.
Definition T2Generator.C:216
static std::vector< std::string > & get_keywords()
Return a list of keywords that are specific to tempo2.
Definition T2Generator.C:40
static Configuration::Parameter< std::string > & get_keyword_filename()
Name of file containing list of Tempo2 keywords.
~Generator()
Destructor.
Definition T2Generator.C:87
Generator * clone() const
Return a new, copy constructed instance of self.
Definition T2Generator.C:82
void set_time_ncoeff(unsigned ncoeff)
Set the number of time coefficients.
Definition T2Generator.C:195
void set_site(const std::string &)
Set the site at which the signal is observed.
Definition T2Generator.C:189
static bool print_time
Print the time required to generate the predictor.
Definition T2Generator.h:26
void set_parameters(const Pulsar::Parameters *)
Set the parameters used to generate the predictor.
Definition T2Generator.C:92
void set_time_span(const MJD &start, const MJD &finish)
Set the range of epochs over which to generate.
Definition T2Generator.C:175
Generator(const Pulsar::Parameters *parameters=0)
Default constructor.
Definition T2Generator.C:67
void set_segment_length(long double days)
Set the length of each polynomial segment in days.
Definition T2Generator.C:207
void set_frequency_ncoeff(unsigned ncoeff)
Set the number of frequency coefficients.
Definition T2Generator.C:201
Functions that predict pulse phase.
Definition T2Predictor.h:26

Generated using doxygen 1.14.0