LastHarmonic.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/LastHarmonic.h
10 
11 #ifndef __Pulsar_LastHarmonic_h
12 #define __Pulsar_LastHarmonic_h
13 
14 #include "Pulsar/RiseFall.h"
15 #include "Pulsar/LastSignificant.h"
16 
17 namespace Pulsar {
18 
19  class BaselineEstimator;
20 
22 
32  class LastHarmonic : public RiseFall
33  {
34 
35  public:
36 
38  LastHarmonic ();
39 
41 
43  void set_Profile (const Profile* psd);
44 
46  void set_threshold (float threshold);
47 
49  float get_threshold () const;
50 
52  void set_consecutive (unsigned consecutive);
53 
55  unsigned get_consecutive () const;
56 
58  unsigned get_last_harmonic () const;
59 
61  void set_baseline_estimator (BaselineEstimator*);
62 
64  const BaselineEstimator* get_baseline_estimator () const;
65  BaselineEstimator* get_baseline_estimator ();
66 
67  const PhaseWeight* get_baseline () const;
68 
70  void get_indeces (int& rise, int& fall) const;
71 
74 
76  class Interface;
77 
79  LastHarmonic* clone () const;
80 
81  protected:
82 
84  void build ();
85 
87  bool built;
88 
89  int bin_rise;
90  int bin_fall;
91 
94 
97 
99  LastSignificant significant;
100 
101  Reference::To<const Profile> fluctuation_power_spectral_density;
102  };
103 
104 }
105 
106 #endif // !defined __Pulsar_LastHarmonic_h
void get_indeces(int &rise, int &fall) const
Get the harmonic indeces of the rise and fall (rise always equals 1)
Definition: LastHarmonic.C:142
bool built
Flag set when the rise and fall are computed.
Definition: LastHarmonic.h:92
Reference::To< BaselineEstimator > baseline_estimator
The estimator used to find the off-pulse phase bins.
Definition: LastHarmonic.h:98
const BaselineEstimator * get_baseline_estimator() const
Get the BaselineEstimator used to find the off-pulse phase bins.
Definition: LastHarmonic.C:92
Stores a weight for each Profile phase bin.
Definition: PhaseWeight.h:29
LastSignificant significant
The algorithm used to find the last signficant harmonic.
Definition: LastHarmonic.h:104
unsigned get_last_harmonic() const
Get the index of the last significant harmonic.
Definition: LastHarmonic.C:75
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
void set_baseline_estimator(BaselineEstimator *)
Set the BaselineEstimator used to find the off-pulse phase bins.
Definition: LastHarmonic.C:84
void set_Profile(const Profile *psd)
Set the flucuation power spectral density from which the last harmonic will be computed.
Definition: LastHarmonic.C:37
Reference::To< PhaseWeight > baseline
The basline returned by the estimator.
Definition: LastHarmonic.h:101
float get_threshold() const
Get the threshold.
Definition: LastHarmonic.C:55
void set_threshold(float threshold)
Set the threshold.
Definition: LastHarmonic.C:43
Finds the last significant harmonic in a flucuation power spectral density.
Definition: LastHarmonic.h:37
T get_value() const
unsigned get_consecutive() const
Get the number of consecutive points that must remain above threshold.
Definition: LastHarmonic.C:69
void set_consecutive(unsigned consecutive)
Set the number of consecutive points that must remain above threshold.
Definition: LastHarmonic.C:60
TextInterface::Parser * get_interface()
Return a text interface that can be used to configure this instance.
Definition: LastHarmonic.C:170
LastHarmonic * clone() const
Return new copy of self.
Definition: LastHarmonic.C:31
Finds a baseline that contains gaussian white noise.
Definition: ExponentialBaseline.h:24
LastHarmonic()
Default constructor.
Definition: LastHarmonic.C:20
void build()
Compute the rise and fall of the pulse.
Definition: LastHarmonic.C:108
Defines the PSRCHIVE library.
Definition: CalSource.h:17
ProfileWeight algorithms that compute profile baselines.
Definition: BaselineEstimator.h:24

Generated using doxygen 1.8.17