FortranSNR.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/FortranSNR.h
10
11#ifndef __Pulsar_FortranSNR_h
12#define __Pulsar_FortranSNR_h
13
14#include "Pulsar/SNRatioEstimator.h"
15#include "PhaseRange.h"
16
17#include <vector>
18
19namespace Pulsar {
20
22 class FortranSNR : public SNRatioEstimator
23 {
24
25 public:
26
27 FortranSNR();
28
30 float get_snr (const Profile* profile);
31
34
36 class Interface;
37
39 FortranSNR* clone () const;
40
41 int get_bestwidth(){ return bestwidth; }
42
43 void set_rms( float new_rms ) { rms = new_rms; rms_set = true; }
44 void set_minwidthbins ( int bins ) { minwidthbins = bins; }
45 void set_maxwidthbins ( int bins ) { maxwidthbins = bins; }
46 void set_bestwidth(int bw) { bestwidth=bw; };
47
48 Phase::Value get_width () const;
49
50 private:
51 float rms;
52 int minwidthbins;
53 int maxwidthbins;
54 int bestwidth;
55 bool rms_set;
56
57 std::vector<float> work;
58 };
59
60}
61
62#endif
63
float get_snr(const Profile *profile)
Return the signal to noise ratio based on the shift.
Definition FortranSNR.C:40
TextInterface::Parser * get_interface()
Return a text interface that can be used to configure this instance.
Definition FortranSNR.C:99
FortranSNR * clone() const
Return a copy constructed instance of self.
Definition FortranSNR.C:105
Any quantity recorded as a function of pulse phase.
Definition Profile.h:40
Algorithms that estimate the signal-to-noise ratio of pulse profiles.
Definition SNRatioEstimator.h:23
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0