ShiftEstimator.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2009 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/Timing/Pulsar/ShiftEstimator.h
10
11#ifndef __Pulsar_ShiftEstimator_h
12#define __Pulsar_ShiftEstimator_h
13
14#include "Pulsar/Algorithm.h"
15
16#include "TextInterface.h"
17#include "Estimate.h"
18
19namespace Pulsar {
20
21 class Archive;
22
25 {
26
27 public:
28
29 static bool verbose;
30
32 virtual Estimate<double> get_shift () const = 0;
33
35 virtual double get_reduced_chisq () const { return 0; }
36
38 virtual double get_snr () const { return 0; }
39
42
44 virtual ShiftEstimator* clone () const = 0;
45
47 virtual std::string get_name () const { return "N/A"; }
48
50 virtual void preprocess (Archive*);
51
53 static ShiftEstimator* factory (const std::string& name_and_parse);
54
55 };
56
58 template<class T>
59 class EmptyInterface : public TextInterface::To<T>
60 {
61 std::string name;
62 public:
63 EmptyInterface (const std::string& _name) { name = _name; }
64 std::string get_interface_name () const { return name; }
65 };
66}
67
68
69#endif // !defined __Pulsar_ShiftEstimator_h
Data manipulation implementations.
Definition Algorithm.h:19
The primary interface to pulsar observational data.
Definition Archive.h:46
Algorithms that estimate pulse phase shifts.
Definition ShiftEstimator.h:25
virtual double get_snr() const
Return the profile S/N ratio.
Definition ShiftEstimator.h:38
virtual ShiftEstimator * clone() const =0
Return a copy constructed instance of self.
virtual double get_reduced_chisq() const
Return the statistical goodness of fit.
Definition ShiftEstimator.h:35
virtual TextInterface::Parser * get_interface()=0
Return a text interface that can be used to configure this instance.
virtual Estimate< double > get_shift() const =0
Return the shift estimate.
virtual void preprocess(Archive *)
Prepare the data for use.
Definition ShiftEstimator.C:45
virtual std::string get_name() const
Return a name that can be subsituted for the template/standard.
Definition ShiftEstimator.h:47
static ShiftEstimator * factory(const std::string &name_and_parse)
Construct a new ShiftEstimator from a string.
Definition ShiftEstimator.C:26
virtual std::string get_interface_name() const
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0