BaselineEstimator.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/BaselineEstimator.h
10 
11 #ifndef __Pulsar_BaselineFunction_h
12 #define __Pulsar_BaselineFunction_h
13 
14 #include "Pulsar/ProfileWeightFunction.h"
15 
16 namespace Pulsar {
17 
19  class BaselineEstimator : public ProfileWeightFunction {
20 
21  public:
22 
25 
27  PhaseWeight* baseline (const Profile*);
28 
31 
33  PhaseWeight* operate (const Profile*);
34 
36  void set_median_cut (float threshold);
37 
39  virtual BaselineEstimator* clone () const = 0;
40 
41  protected:
42 
43  float median_cut;
44 
45  };
46 
47 }
48 
49 
50 #endif // !defined __Pulsar_BaselineWeight_h
const float * get_amps() const
Return a pointer to the amplitudes array.
Definition: ProfileAmps.C:141
Stores a weight for each Profile phase bin.
Definition: PhaseWeight.h:29
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
unsigned get_nbin() const
Return the number of bins.
Definition: ProfileAmps.h:50
PhaseWeight * operator()(const Profile *)
Returns a new PhaseWeight instance.
Definition: BaselineEstimator.C:79
void set_median_cut(float threshold)
Cut samples from baseline with median difference over threshold.
Definition: BaselineEstimator.C:37
PhaseWeight * baseline(const Profile *)
Returns a new PhaseWeight instance.
Definition: BaselineEstimator.C:73
PhaseWeight * operate(const Profile *)
Convenience interface.
Definition: BaselineEstimator.C:43
Defines the PSRCHIVE library.
Definition: CalSource.h:17
virtual BaselineEstimator * clone() const =0
Return a copy constructed instance of self.
ProfileWeight algorithms that compute profile baselines.
Definition: BaselineEstimator.h:24
BaselineEstimator()
Default constructor.
Definition: BaselineEstimator.C:27

Generated using doxygen 1.8.17