LastSignificant.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2007 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/General/Pulsar/LastSignificant.h
10 
11 #ifndef __Pulsar_LastSignificant_h
12 #define __Pulsar_LastSignificant_h
13 
14 #include "Pulsar/Algorithm.h"
15 
16 namespace Pulsar {
17 
18  class Profile;
19 
21 
24  class LastSignificant : public Algorithm
25  {
26 
27  public:
28 
30  LastSignificant ();
31 
33  void set_threshold (float sigma);
34 
36  float get_threshold () const;
37 
39  void set_consecutive (unsigned consecutive);
40 
42  unsigned get_consecutive () const;
43 
45  void find (const Profile*, double rms);
46 
48  void find (const std::vector<float>&, double rms);
49 
51  void find (unsigned nbin, const float*, double rms);
52 
54  unsigned get () const;
55 
57  void reset ();
58 
59  protected:
60 
62  float cutoff_sigma;
63 
65  unsigned consecutive;
66 
68  unsigned last_significant;
69 
70  };
71 
72 }
73 
74 #endif
unsigned consecutive
The number of consecutive bins that must remain above threshold.
Definition: LastSignificant.h:70
void set_consecutive(unsigned consecutive)
Set the number of consecutive bins that must remain above threshold.
Definition: LastSignificant.C:34
float cutoff_sigma
The cut-off threshold.
Definition: LastSignificant.h:67
const float * get_amps() const
Return a pointer to the amplitudes array.
Definition: ProfileAmps.C:141
void find(const Profile *, double rms)
Find the last significant bin.
Definition: LastSignificant.C:58
void set_threshold(float sigma)
Set the cut-off threshold as a multiple of the rms.
Definition: LastSignificant.C:24
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
unsigned last_significant
The last significant bin.
Definition: LastSignificant.h:73
void reset()
Reset the last significant phase bin.
Definition: LastSignificant.C:52
LastSignificant()
Default constructor.
Definition: LastSignificant.C:16
float get_threshold() const
Get the cut-off threshold.
Definition: LastSignificant.C:29
unsigned get_consecutive() const
Get the number of consecutive bins.
Definition: LastSignificant.C:40
Defines the PSRCHIVE library.
Definition: CalSource.h:17
unsigned get() const
Get the last signficant bin.
Definition: LastSignificant.C:46

Generated using doxygen 1.8.17