PeakCumulative.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/PeakCumulative.h
10 
11 #ifndef __Pulsar_PeakCumulative_h
12 #define __Pulsar_PeakCumulative_h
13 
14 #include "Pulsar/RiseFall.h"
15 
16 namespace Pulsar {
17 
18  class BaselineEstimator;
19 
21 
50  class PeakCumulative : public RiseFall {
51 
52  public:
53 
56 
58  void set_Profile (const Profile*);
59 
61  void set_threshold (float threshold);
62 
64  float get_threshold () const;
65 
67  void set_choose (bool choose);
68 
70  bool get_choose () const;
71 
74 
78 
80  void set_range (int bin_start, int bin_end);
81 
83  void get_indeces (int& rise, int& fall) const;
84 
87 
89  class Interface;
90 
92  PeakCumulative* clone () const;
93 
94  protected:
95 
97  void build ();
98 
100  bool built;
101 
103  float threshold;
104 
106  int bin_start;
107 
109  int bin_end;
110 
112  bool range_specified;
113 
114  int bin_rise;
115  int bin_fall;
116  bool choose;
117 
120 
121  };
122 
123 }
124 
125 
126 #endif // !defined __Pulsar_PeakCumulative_h
void set_threshold(float threshold)
Set the threshold.
Definition: PeakCumulative.C:49
void get_indeces(int &rise, int &fall) const
Get the pulse phase bin indeces of the rise and fall.
Definition: PeakCumulative.C:225
void transform(Profile *profile)
Form the cummulative profile.
Definition: Accumulate.C:44
int bin_end
The last bin in the selected range.
Definition: PeakCumulative.h:114
PeakCumulative * clone() const
Return new copy of self.
Definition: PeakCumulative.C:37
bool get_choose() const
Get the choose.
Definition: PeakCumulative.C:70
const float * get_amps() const
Return a pointer to the amplitudes array.
Definition: ProfileAmps.C:141
float threshold
The threshold.
Definition: PeakCumulative.h:108
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
float get_threshold() const
Get the threshold.
Definition: PeakCumulative.C:56
PeakCumulative()
Default constructor.
Definition: PeakCumulative.C:24
void set_Profile(const Profile *)
Set the profile from which the rise and fall will be computed.
Definition: PeakCumulative.C:42
bool built
Flag set when the rise and fall are computed.
Definition: PeakCumulative.h:105
const BaselineEstimator * get_baseline_estimator() const
Get the BaselineEstimator used to find the off-pulse phase bins.
Definition: PeakCumulative.C:84
void build()
Compute the rise and fall of the pulse.
Definition: PeakCumulative.C:104
int bin_start
The first bin in the selected range.
Definition: PeakCumulative.h:111
Profile differentiation algorithm.
Definition: Accumulate.h:26
void set_baseline(double)
Set the baseline.
Definition: Accumulate.C:34
void set_baseline_estimator(BaselineEstimator *)
Set the BaselineEstimator used to find the off-pulse phase bins.
Definition: PeakCumulative.C:76
Find the edges of a pulse.
Definition: PeakCumulative.h:55
void set_range(int bin_start, int bin_end)
Set the start and end bins of the search.
Definition: PeakCumulative.C:96
Reference::To< BaselineEstimator > baseline_estimator
The BaselineEstimator used to find the off-pulse phase bins.
Definition: PeakCumulative.h:124
void set_offset(unsigned)
Set the offset.
Definition: Accumulate.C:24
Defines the PSRCHIVE library.
Definition: CalSource.h:17
bool range_specified
Set true when range is specified.
Definition: PeakCumulative.h:117
void set_choose(bool choose)
Set the choose.
Definition: PeakCumulative.C:62
TextInterface::Parser * get_interface()
Return a text interface that can be used to configure this instance.
Definition: PeakCumulative.C:252
ProfileWeight algorithms that compute profile baselines.
Definition: BaselineEstimator.h:24

Generated using doxygen 1.8.17