IterativeBaseline.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/IterativeBaseline.h
10
11#ifndef __Pulsar_IterativeBaseline_h
12#define __Pulsar_IterativeBaseline_h
13
14#include "Pulsar/BaselineEstimator.h"
15
16namespace Pulsar {
17
19
22
23 public:
24
27
30
33 BaselineEstimator* get_initial_baseline () const;
34
36 virtual void set_threshold (float sigma);
37 float get_threshold () const { return threshold; }
38
40 void set_max_iterations (unsigned iterations);
41
42 void set_run_postprocessing (bool f) { run_postprocessing = false; }
43 bool get_run_postprocessing () const { return run_postprocessing; }
44
45 protected:
46
48 void calculate (PhaseWeight* weight);
49
51 virtual void get_bounds (PhaseWeight*, float& lower, float& upper) = 0;
52
53 virtual void postprocess (PhaseWeight* weight, const Profile* profile);
54
56 float threshold;
57
60
63
66
68 bool get_initial_bounds () const { return initial_bounds; }
69
70 private:
71
73 bool initial_bounds;
74
75 };
76
77}
78
79#endif
BaselineEstimator()
Default constructor.
Definition BaselineEstimator.C:27
void calculate(PhaseWeight *weight)
Calculate the PhaseWeight.
Definition IterativeBaseline.C:72
IterativeBaseline()
Default constructor.
Definition IterativeBaseline.C:27
void set_initial_baseline(BaselineEstimator *)
Set the BaselineEstimator used to find the initial baseline.
Definition IterativeBaseline.C:40
virtual void get_bounds(PhaseWeight *, float &lower, float &upper)=0
Derived classes must define the bounds.
Reference::To< BaselineEstimator > initial_baseline
The BaselineEstimator used to find the initial baseline.
Definition IterativeBaseline.h:65
virtual void set_threshold(float sigma)
Set the threshold below which samples are included in the baseline.
Definition IterativeBaseline.C:51
~IterativeBaseline()
Destructor.
Definition IterativeBaseline.C:36
unsigned max_iterations
The maximum number of iterations.
Definition IterativeBaseline.h:59
bool get_initial_bounds() const
Provide access to derived classes.
Definition IterativeBaseline.h:68
void set_max_iterations(unsigned iterations)
Set the maximum number of iterations.
Definition IterativeBaseline.C:61
bool run_postprocessing
Run the postprocessing algorithm.
Definition IterativeBaseline.h:62
float threshold
The threshold below which samples are included in the baseline.
Definition IterativeBaseline.h:56
Algorithms that smooth PhaseWeight containers.
Definition PhaseWeightSmooth.h:21
Stores a weight for each Profile phase bin.
Definition PhaseWeight.h:24
Reference::To< const Profile, false > profile
The Profile from which the PhaseWeight will be derived.
Definition ProfileWeightFunction.h:59
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