StandardSNR.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2004 - 2016 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/General/Pulsar/StandardSNR.h
10 
11 #ifndef __Pulsar_StandardSNR_h
12 #define __Pulsar_StandardSNR_h
13 
14 #include "Pulsar/ProfileShiftFit.h"
15 #include "Pulsar/SNRatioEstimator.h"
16 
17 namespace Pulsar {
18 
19  class Profile;
20 
22  class StandardSNR : public SNRatioEstimator {
23 
24  public:
25 
27  void set_standard (const Profile* profile);
28 
30  float get_snr (const Profile* profile);
31 
34 
36  class Interface;
37 
39  StandardSNR* clone () const;
40 
42  void set_standard_filename (const std::string& filename);
43 
45  std::string get_standard_filename () const;
46 
47 
48  protected:
49 
52 
53  std::string filename;
54  };
55 
56 }
57 
58 #endif
void add(T(P::*get)() const, const char *name, const char *description=0)
float get_snr(const Profile *profile)
Return the signal to noise ratio based on the shift.
Definition: StandardSNR.C:17
void set_standard(const Profile *p)
Set the standard or template profile to use.
Definition: ProfileShiftFit.C:123
StandardSNR * clone() const
Return a copy constructed instance of self.
Definition: StandardSNR.C:66
bool choose_maximum_harmonic
Set true when set_standard should choose the maximum harmonic.
Definition: ProfileShiftFit.h:129
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
static Archive * load(const std::string &name)
Factory returns a new instance loaded from filename.
Definition: Archive_load.C:28
virtual void set_instance(C *c)
void set_standard_filename(const std::string &filename)
Set the name of the file from which the standard profile will be loaded.
Definition: StandardSNR.C:28
TextInterface::Parser * get_interface()
Return a text interface that can be used to configure this instance.
Definition: StandardSNR.C:60
ProfileShiftFit fit
Used to perform the fit and compute the S/N.
Definition: StandardSNR.h:56
virtual std::string get_interface_name() const
Calculates profile shifts by fitting to a template/standard.
Definition: ProfileShiftFit.h:48
void set_standard(const Profile *profile)
Set the standard against which the S/N will be calculated.
Definition: StandardSNR.C:11
Defines the PSRCHIVE library.
Definition: CalSource.h:17
Calculates the signal-to-noise ratio by fitting against a standard.
Definition: StandardSNR.h:27
std::string get_standard_filename() const
Return the name of the file from which the standard was loaded.
Definition: StandardSNR.C:36

Generated using doxygen 1.8.17