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
16namespace Pulsar {
17
18 class Profile;
19
21
23
25 {
26
27 public:
28
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
63
65 unsigned consecutive;
66
69
70 };
71
72}
73
74#endif
Data manipulation implementations.
Definition Algorithm.h:19
float get_threshold() const
Get the cut-off threshold.
Definition LastSignificant.C:29
unsigned get() const
Get the last signficant bin.
Definition LastSignificant.C:46
unsigned consecutive
The number of consecutive bins that must remain above threshold.
Definition LastSignificant.h:65
unsigned get_consecutive() const
Get the number of consecutive bins.
Definition LastSignificant.C:40
LastSignificant()
Default constructor.
Definition LastSignificant.C:16
void reset()
Reset the last significant phase bin.
Definition LastSignificant.C:52
float cutoff_sigma
The cut-off threshold.
Definition LastSignificant.h:62
void set_consecutive(unsigned consecutive)
Set the number of consecutive bins that must remain above threshold.
Definition LastSignificant.C:34
void find(const Profile *, double rms)
Find the last significant bin.
Definition LastSignificant.C:58
unsigned last_significant
The last significant bin.
Definition LastSignificant.h:68
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:40
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0