FourierDomainFit.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/FourierDomainFit.h
10
11#ifndef __Pulsar_FourierDomainFit_h
12#define __Pulsar_FourierDomainFit_h
13
14#include "Pulsar/ProfileStandardShift.h"
15#include "Pulsar/ProfileShiftFit.h"
16
17namespace Pulsar {
18
20 class FourierDomainFit : public ProfileStandardShift
21 {
22
23 public:
24
25 FourierDomainFit ();
26
28 void set_standard (const Profile* p);
29
32
34 double get_reduced_chisq () const;
35
37 double get_snr () const;
38
41
43 FourierDomainFit* clone () const { return new FourierDomainFit(*this); }
44
46 void set_mcmc (bool flag = true) { error_method = flag ? "mcmc" : "trad"; }
47 bool get_mcmc () const { return error_method=="mcmc"; }
48
50 void set_iterations (int nit) { fit.set_mcmc_iterations(nit); }
51 int get_iterations () const { return fit.get_mcmc_iterations(); }
52
54 void set_error_method (std::string m) { error_method=m; }
55 std::string get_error_method () const { return error_method; }
56
57 protected:
58
59 class Interface;
60
62 std::string error_method;
63
65 mutable double reduced_chisq;
66
68 mutable double snr;
69
72
73 };
74
75}
76
77
78#endif // !defined __Pulsar_FourierDomainFit_h
Any quantity recorded as a function of pulse phase.
Definition Profile.h:40
Estimate< double > get_shift() const
Return the shift estimate.
Definition FourierDomainFit.C:27
double snr
S/N ratio of last profile fit.
Definition FourierDomainFit.h:68
void set_standard(const Profile *p)
Set the template profile.
Definition FourierDomainFit.C:20
FourierDomainFit * clone() const
Return a copy constructed instance of self.
Definition FourierDomainFit.h:43
void set_mcmc(bool flag=true)
Use Markov Chain Monte Carlo method to determine TOA uncertainty.
Definition FourierDomainFit.h:46
void set_iterations(int nit)
Set number of iterations for MCMC.
Definition FourierDomainFit.h:50
void set_error_method(std::string m)
Set uncertainty calculation method.
Definition FourierDomainFit.h:54
double get_reduced_chisq() const
Return the statistical goodness-of-fit.
Definition FourierDomainFit.C:57
std::string error_method
The uncertainty calculation method.
Definition FourierDomainFit.h:62
double reduced_chisq
Reduced chisq of last call to get_shift.
Definition FourierDomainFit.h:65
double get_snr() const
Return the profile S/N ratio (relative to the standard)
Definition FourierDomainFit.C:63
ProfileShiftFit fit
The class that does the actual fit.
Definition FourierDomainFit.h:71
TextInterface::Parser * get_interface()
Return a text interface that can be used to configure this instance.
Definition FourierDomainFit.C:100
Calculates profile shifts by fitting to a template/standard.
Definition ProfileShiftFit.h:44
int get_mcmc_iterations() const
Get number of iterations.
Definition ProfileShiftFit.h:77
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0