OnPulseThreshold.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2005 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/General/Pulsar/OnPulseThreshold.h
10 
11 #ifndef __Pulsar_OnPulseThreshold_h
12 #define __Pulsar_OnPulseThreshold_h
13 
14 #include "Pulsar/OnPulseEstimator.h"
15 
16 namespace Pulsar {
17 
18  class BaselineEstimator;
19 
21 
26  class OnPulseThreshold : public OnPulseEstimator {
27 
28  public:
29 
32 
34  void set_threshold (float threshold);
35 
37  float get_threshold () const;
38 
40  void set_allow_negative (bool);
41 
44 
48 
50  void set_range (int bin_start, int bin_end);
51 
54 
56  class Interface;
57 
59  OnPulseThreshold* clone () const;
60 
61  protected:
62 
64  void calculate (PhaseWeight* weight);
65 
67  float threshold;
68 
70  bool allow_negative;
71 
73  int bin_start;
74 
76  int bin_end;
77 
79  bool range_specified;
80 
83 
84  };
85 
86 }
87 
88 
89 #endif // !defined __Pulsar_OnPulseThreshold_h
float threshold
The threshold.
Definition: OnPulseThreshold.h:72
Stores a weight for each Profile phase bin.
Definition: PhaseWeight.h:29
void set_baseline_estimator(BaselineEstimator *)
Set the BaselineEstimator used to find the off-pulse phase bins.
Definition: OnPulseThreshold.C:52
float get_threshold() const
Get the threshold.
Definition: OnPulseThreshold.C:40
OnPulseThreshold()
Default constructor.
Definition: OnPulseThreshold.C:20
bool allow_negative
Take the absolute value.
Definition: OnPulseThreshold.h:75
void set_range(int bin_start, int bin_end)
Set the start and end bins of the search.
Definition: OnPulseThreshold.C:71
int bin_start
The first bin in the selected range.
Definition: OnPulseThreshold.h:78
Reference::To< BaselineEstimator > baseline_estimator
The BaselineEstimator used to find the off-pulse phase bins.
Definition: OnPulseThreshold.h:87
int bin_end
The last bin in the selected range.
Definition: OnPulseThreshold.h:81
TextInterface::Parser * get_interface()
Return a text interface that can be used to configure this instance.
Definition: OnPulseThreshold.C:151
T get_value() const
bool range_specified
Set true when range is specified.
Definition: OnPulseThreshold.h:84
void set_allow_negative(bool)
Allow negative on-pulse phase bins.
Definition: OnPulseThreshold.C:46
const BaselineEstimator * get_baseline_estimator() const
Get the BaselineEstimator used to find the off-pulse phase bins.
Definition: OnPulseThreshold.C:59
Defines the PSRCHIVE library.
Definition: CalSource.h:17
void set_threshold(float threshold)
Set the threshold.
Definition: OnPulseThreshold.C:35
Uses the baseline statistics to find on-pulse phase bins.
Definition: OnPulseThreshold.h:31
ProfileWeight algorithms that compute profile baselines.
Definition: BaselineEstimator.h:24
OnPulseThreshold * clone() const
Return new copy of self.
Definition: OnPulseThreshold.C:29
void calculate(PhaseWeight *weight)
Calculate the PhaseWeight.
Definition: OnPulseThreshold.C:79

Generated using doxygen 1.8.17