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 
19 namespace Pulsar {
20 
21  class Archive;
22 
24  class ShiftEstimator : public Algorithm
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 
41  virtual TextInterface::Parser* get_interface () = 0;
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
Estimates phase shift via sinc interpolation of CCF.
Definition: SincInterpShift.h:24
Estimates phase shift using phi0 from the best-fit rotating vector model.
Definition: RotatingVectorModelShift.h:26
static ShiftEstimator * factory(const std::string &name_and_parse)
Construct a new ShiftEstimator from a string.
Definition: ShiftEstimator.C:26
The primary interface to pulsar observational data.
Definition: Archive.h:45
Estimates phase shift in Fourier domain.
Definition: PhaseGradShift.h:27
Estimates phase shift using the flux "centre of mass".
Definition: FluxCentroid.h:25
Estimates phase shift in Fourier domain using zero-pad interpolation.
Definition: ZeroPadShift.h:25
virtual double get_reduced_chisq() const
Return the statistical goodness of fit.
Definition: ShiftEstimator.h:40
Algorithms that estimate pulse phase shifts.
Definition: ShiftEstimator.h:29
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:52
Estimates phase shift in time domain using parabolic interpolation.
Definition: ParIntShift.h:24
Defines the PSRCHIVE library.
Definition: CalSource.h:17
virtual double get_snr() const
Return the profile S/N ratio.
Definition: ShiftEstimator.h:43
Estimates phase shift in time domain using Gaussian interpolation.
Definition: GaussianShift.h:24
virtual ShiftEstimator * clone() const =0
Return a copy constructed instance of self.
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.
Estimates phase shift in Fourier domain with MCMC error estimate *‍/.
Definition: FourierDomainFit.h:25

Generated using doxygen 1.8.17