ModularSNR.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2016 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/General/Pulsar/ModularSNR.h
10 
11 #ifndef __Pulsar_ModularSNR_h
12 #define __Pulsar_ModularSNR_h
13 
14 #include "Pulsar/SNRatioEstimator.h"
15 
16 namespace Pulsar {
17 
18  class ProfileWeightFunction;
19 
21  class ModularSNR : public SNRatioEstimator {
22 
23  public:
24 
27 
29  ~ModularSNR ();
30 
33  ProfileWeightFunction* get_baseline_estimator () const;
34 
37  ProfileWeightFunction* get_onpulse_estimator () const;
38 
40  float get_snr (const Profile* profile);
41 
44 
46  class Interface;
47 
49  ModularSNR* clone () const;
50 
51  protected:
52 
55 
58 
59  };
60 
61 }
62 
63 #endif
void set_onpulse_estimator(ProfileWeightFunction *function)
Set the function used to find the on-pulse.
Definition: ModularSNR.C:43
~ModularSNR()
Destructor.
Definition: ModularSNR.C:26
TextInterface::Parser * get_interface()
Return a text interface that can be used to configure this instance.
Definition: ModularSNR.C:110
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
unsigned get_nbin() const
Return the number of bins.
Definition: ProfileAmps.h:50
float get_snr(const Profile *profile)
Return the signal to noise ratio.
Definition: ModularSNR.C:55
ModularSNR * clone() const
Return a copy constructed instance of self.
Definition: ModularSNR.C:116
Finds pulse defined by number of consecutive points above threshold.
Definition: PeakConsecutive.h:31
Adaptively computes the baseline, assuming normally distributed noise.
Definition: GaussianBaseline.h:70
Reference::To< ProfileWeightFunction > onpulse_estimator
The function used to find the onpulse region.
Definition: ModularSNR.h:62
PhaseWeight algorithms that receive an input Profile.
Definition: ProfileWeightFunction.h:26
void set_baseline_estimator(ProfileWeightFunction *function)
Set the function used to compute the baseline.
Definition: ModularSNR.C:31
Reference::To< ProfileWeightFunction > baseline_estimator
The function used to compute the baseline.
Definition: ModularSNR.h:59
Defines the PSRCHIVE library.
Definition: CalSource.h:17
Calculates the S/N using an on-pulse and off-pulse ProfileWeightFunction.
Definition: ModularSNR.h:26
ModularSNR()
Default constructor.
Definition: ModularSNR.C:19

Generated using doxygen 1.8.17