residual.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 1999 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/Util/tempo/residual.h
10
11#ifndef __RESIDUAL_H
12#define __RESIDUAL_H
13
14#include <vector>
15
16namespace Tempo {
17
18 // values output by TEMPO (resid2.tmp)
19 class residual {
20
21 public:
22 static bool verbose;
23
24 bool valid; // is this a valid residual?
25
26 double mjd; // --TOA (MJD, referenced to solar system barycenter)
27 double turns; // --Postfit residual (pulse phase, from 0 to 1)
28 double time; // --Postfit residual (micro-seconds)
29 double binaryphase; // --Orbital phase (where applicable)
30 double obsfreq; // --Observing frequency (in barycenter frame)
31 double weight; // --Weight of point in the fit
32 double error; // --Timing uncertainty (according to input file)
33 double preres; // --Prefit residual (micro-seconds)
34
35 // returns day of year from mjd
36 double dayofyear () const;
37
38 // return UTC year, eg. 1995.67
39 double utcyear () const;
40
41 residual () { init(); };
42 residual (int lun);
43 ~residual () { };
44
45 void init ();
46
47 // Construct from a FORTRAN logical unit number
48 // (must be open and ready for reading)
49 int load (int lun);
50
51 // place a vector load function in the residual namespace
52 static int load (int r2flun, char* filename,
53 std::vector<residual>* residuals);
54 };
55
56}
57
58// given MJD returns UTC day-of-year as year.fracyear
59double UTCdoy (double mjd);
60
61#endif
Interface to Tempo.
Definition fit.C:22

Generated using doxygen 1.14.0