LawnMower.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/RFIMitigation/Pulsar/LawnMower.h
10 
11 #ifndef __Pulsar_LawnMower_h
12 #define __Pulsar_LawnMower_h
13 
14 #include "Pulsar/Mower.h"
15 
16 namespace Pulsar {
17 
18  class BaselineEstimator;
19  class OnPulseThreshold;
20  class PhaseWeight;
21 
23 
27  class LawnMower : public Mower
28  {
29 
30  public:
31 
33  LawnMower ();
34 
36  ~LawnMower ();
37 
38  void set_threshold (float sigma);
39 
41  void set_baseline_estimator (BaselineEstimator*);
42  BaselineEstimator* get_baseline_estimator () const;
43 
44  protected:
45 
48 
51 
53  void compute (PhaseWeight* mask, const Profile* difference);
54 
55  };
56 
57 }
58 
59 #endif
void set_include(PhaseWeight *include)
Include only the specified phase bins for consideration.
Definition: ProfileWeightFunction.C:43
Smooth * get_smooth() const
Get the smoothing function.
Definition: BaselineWindow.C:77
const float * get_amps() const
Return a pointer to the amplitudes array.
Definition: ProfileAmps.C:141
Reference::To< PhaseWeight > include
Points to be included in baseline estimator used by mower.
Definition: LawnMower.h:55
Reference::To< OnPulseThreshold > mower
Masks all points above a threshold.
Definition: LawnMower.h:52
~LawnMower()
Destructor.
Definition: LawnMower.C:59
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
void set_baseline_estimator(BaselineEstimator *)
Set the BaselineEstimator used to find the baseline.
Definition: LawnMower.C:63
void set_threshold(float sigma)
Set the threshold below which samples are included in the baseline.
Definition: GaussianBaseline.C:39
void set_threshold(float sigma)
Set the threshold above which samples are mown.
Definition: LawnMower.C:73
Adaptively computes the baseline, assuming normally distributed noise.
Definition: GaussianBaseline.h:70
void set_turns(float)
Set the width of the smoothing window in turns.
Definition: Smooth.C:23
void set_median_cut(float threshold)
Cut samples from baseline with median difference over threshold.
Definition: BaselineEstimator.C:37
Finds the phase window in which the smoothed Profile is an extremum.
Definition: BaselineWindow.h:28
void set_initial_baseline(BaselineEstimator *)
Set the BaselineEstimator used to find the initial baseline.
Definition: IterativeBaseline.C:38
Defines the PSRCHIVE library.
Definition: CalSource.h:17
Uses the baseline statistics to find on-pulse phase bins.
Definition: OnPulseThreshold.h:31
void set_smooth(Smooth *)
Set the smoothing function.
Definition: BaselineWindow.C:60
void compute(PhaseWeight *mask, const Profile *difference)
Find the spikes in median smoothed difference and flag them in mask.
Definition: LawnMower.C:79
ProfileWeight algorithms that compute profile baselines.
Definition: BaselineEstimator.h:24
LawnMower()
Default constructor.
Definition: LawnMower.C:29
Smooths a Profile using the median over a boxcar.
Definition: SmoothMedian.h:29

Generated using doxygen 1.8.17