BaselineWindow.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2005 - 2016 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/General/Pulsar/BaselineWindow.h
10
11#ifndef __Pulsar_BaselineWindow_h
12#define __Pulsar_BaselineWindow_h
13
14#include "Pulsar/BaselineEstimator.h"
15#include "PhaseRange.h"
16
17namespace Pulsar {
18
19 class Profile;
20 class Smooth;
21
24 {
25
26 public:
27
30
33
35 void set_smooth (Smooth*);
36
38 Smooth* get_smooth () const;
39
41 void set_find_minimum (bool f = true);
42 bool get_find_minimum () const;
43
45 void set_find_maximum (bool f = true);
46 bool get_find_maximum () const;
47
49 void set_find_mean (float mean);
50 float get_find_mean () const;
51
53 void set_range (int bin_start, int bin_end);
54
56 void set_search_range (const Phase::Range&);
57
60
63
65 float find_phase (const std::vector<float>& amps);
66
68 float find_phase (unsigned nbin, const float* amps);
69
72
74 class Interface;
75
77 BaselineWindow* clone () const;
78
79 protected:
80
82 void calculate (PhaseWeight* weight);
83
86
89
92
94 float mean;
95
98 Phase::Range found_range;
99
102 };
103
104}
105
106
107#endif // !defined __Pulsar_BaselineWindow_h
BaselineEstimator()
Default constructor.
Definition BaselineEstimator.C:27
Reference::To< Smooth > smooth
The smoothing function.
Definition BaselineWindow.h:85
void set_search_range(const Phase::Range &)
Set the range to be searched.
Definition BaselineWindow.C:167
Smooth * get_smooth() const
Get the smoothing function.
Definition BaselineWindow.C:77
void set_find_minimum(bool f=true)
Set to find the minimum mean.
Definition BaselineWindow.C:123
bool find_mean
Set true when algorithm finds mean.
Definition BaselineWindow.h:91
Phase::Range search_range
The first bin in the selected range.
Definition BaselineWindow.h:97
TextInterface::Parser * get_interface()
Return a text interface that can be used to configure this instance.
Definition BaselineWindow.C:320
BaselineWindow()
Default constructor.
Definition BaselineWindow.C:25
void set_find_maximum(bool f=true)
Set to find the maximum mean.
Definition BaselineWindow.C:135
BaselineWindow * clone() const
Return a copy constructed instance of self.
Definition BaselineWindow.C:54
bool range_specified
Set true when range is specified.
Definition BaselineWindow.h:101
bool find_max
Set true when algorithm finds max.
Definition BaselineWindow.h:88
void set_find_mean(float mean)
Set to find the mean closest to the specified value.
Definition BaselineWindow.C:145
Phase::Range get_found_range() const
Get the range found during execution.
Definition BaselineWindow.C:180
float find_phase(const std::vector< float > &amps)
Return the phase at which minimum or maximum mean is found.
Definition BaselineWindow.C:187
void set_smooth(Smooth *)
Set the smoothing function.
Definition BaselineWindow.C:60
void set_range(int bin_start, int bin_end)
Set the start and end bins of the search.
Definition BaselineWindow.C:157
float mean
Mean value to be found.
Definition BaselineWindow.h:94
Phase::Range get_search_range() const
Get the range to be search.
Definition BaselineWindow.C:174
void calculate(PhaseWeight *weight)
Calculate the PhaseWeight.
Definition BaselineWindow.C:90
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
Profile smoothing algorithms.
Definition Smooth.h:24
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0