GaussianBaseline.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/GaussianBaseline.h
10
11#ifndef __Pulsar_GaussianBaseline_h
12#define __Pulsar_GaussianBaseline_h
13
14#include "Pulsar/IterativeBaseline.h"
15
16namespace Pulsar {
17
19
66
67 public:
68
71
73 void set_threshold (float sigma);
74 float get_threshold () const { return threshold; }
75
77 void set_smoothing (unsigned);
78
80 float get_variance_correction () const { return moment_correction; }
81
83 static double get_variance_correction (double sigma);
84
87
89 class Interface;
90
92 GaussianBaseline* clone () const;
93
94 protected:
95
96 void get_bounds (PhaseWeight* weight, float& lower, float& upper);
97
98 void postprocess (PhaseWeight* weight, const Profile* profile);
99
102
105
107 unsigned smooth_bins;
108
109 };
110
111}
112
113#endif
Adaptively computes the baseline, assuming normally distributed noise.
Definition GaussianBaseline.h:65
GaussianBaseline()
Default constructor.
Definition GaussianBaseline.C:22
TextInterface::Parser * get_interface()
Return a text interface that can be used to configure this instance.
Definition GaussianBaseline.C:201
void get_bounds(PhaseWeight *weight, float &lower, float &upper)
Derived classes must define the bounds.
Definition GaussianBaseline.C:56
unsigned smooth_bins
Smoothing factor used in postprocessing.
Definition GaussianBaseline.h:107
float moment_correction
Adjustment when computing variance of samples below threshold.
Definition GaussianBaseline.h:101
void set_smoothing(unsigned)
Set the smoothing factor used during post processing.
Definition GaussianBaseline.C:33
float get_variance_correction() const
Get the variance correction factor.
Definition GaussianBaseline.h:80
float last_mean
Last mean computed during get_bounds.
Definition GaussianBaseline.h:104
void set_threshold(float sigma)
Set the threshold below which samples are included in the baseline.
Definition GaussianBaseline.C:39
GaussianBaseline * clone() const
Return a copy constructed instance of self.
Definition GaussianBaseline.C:28
IterativeBaseline()
Default constructor.
Definition IterativeBaseline.C:27
float threshold
The threshold below which samples are included in the baseline.
Definition IterativeBaseline.h:56
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