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
17namespace Pulsar {
18
20
22
31
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
62
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
100
101 Reference::To<const Profile> fluctuation_power_spectral_density;
102 };
103
104}
105
106#endif // !defined __Pulsar_LastHarmonic_h
ProfileWeight algorithms that compute profile baselines.
Definition BaselineEstimator.h:19
const BaselineEstimator * get_baseline_estimator() const
Get the BaselineEstimator used to find the off-pulse phase bins.
Definition LastHarmonic.C:92
void set_baseline_estimator(BaselineEstimator *)
Set the BaselineEstimator used to find the off-pulse phase bins.
Definition LastHarmonic.C:84
Reference::To< BaselineEstimator > baseline_estimator
The estimator used to find the off-pulse phase bins.
Definition LastHarmonic.h:93
bool built
Flag set when the rise and fall are computed.
Definition LastHarmonic.h:87
float get_threshold() const
Get the threshold.
Definition LastHarmonic.C:55
TextInterface::Parser * get_interface()
Return a text interface that can be used to configure this instance.
Definition LastHarmonic.C:170
void set_threshold(float threshold)
Set the threshold.
Definition LastHarmonic.C:43
Reference::To< PhaseWeight > baseline
The basline returned by the estimator.
Definition LastHarmonic.h:96
LastHarmonic()
Default constructor.
Definition LastHarmonic.C:20
LastSignificant significant
The algorithm used to find the last signficant harmonic.
Definition LastHarmonic.h:99
unsigned get_consecutive() const
Get the number of consecutive points that must remain above threshold.
Definition LastHarmonic.C:69
LastHarmonic * clone() const
Return new copy of self.
Definition LastHarmonic.C:31
void set_Profile(const Profile *psd)
Set the flucuation power spectral density from which the last harmonic will be computed.
Definition LastHarmonic.C:37
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
void set_consecutive(unsigned consecutive)
Set the number of consecutive points that must remain above threshold.
Definition LastHarmonic.C:60
unsigned get_last_harmonic() const
Get the index of the last significant harmonic.
Definition LastHarmonic.C:75
void build()
Compute the rise and fall of the pulse.
Definition LastHarmonic.C:108
Find the last significant harmonic in a PSD.
Definition LastSignificant.h:25
Stores a weight for each Profile phase bin.
Definition PhaseWeight.h:24
Any quantity recorded as a function of pulse phase.
Definition Profile.h:40
Estimates the on-pulse region between a rise and a fall.
Definition RiseFall.h:19
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0