MaskSmooth.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/General/Pulsar/MaskSmooth.h
10 
11 #ifndef __Pulsar_MaskSmooth_h
12 #define __Pulsar_MaskSmooth_h
13 
14 #include "Pulsar/PhaseWeightSmooth.h"
15 
16 namespace Pulsar {
17 
18  class Profile;
19 
21  class MaskSmooth : public PhaseWeightSmooth {
22 
23  public:
24 
27 
29  MaskSmooth* clone () const;
30 
32  void set_turns (double);
34  double get_turns () const;
35 
37  void set_masked_fraction (double);
39  double get_masked_fraction () const;
40 
42  void set_bins (unsigned);
44  unsigned get_bins () const;
45 
47  void set_masked_bins (unsigned);
49  unsigned get_masked_bins () const;
50 
51 
52  protected:
53 
54  double turns;
55  double masked_fraction;
56 
57  unsigned bins;
58  unsigned masked_bins;
59 
60  float mask_value;
61 
62  void calculate (PhaseWeight*);
63 
64  };
65 
66 }
67 
68 
69 #endif // !defined __Pulsar_BaselineWeight_h
void calculate(PhaseWeight *)
Derived classes implement the PhaseWeight calculation.
Definition: MaskSmooth.C:94
void set_masked_fraction(double)
Set the fraction of masked neighbours required.
Definition: MaskSmooth.C:48
Stores a weight for each Profile phase bin.
Definition: PhaseWeight.h:29
unsigned get_masked_bins() const
Get the number of masked neighbours required.
Definition: MaskSmooth.C:85
Smooths a mask by masking elements with masked neighbours.
Definition: MaskSmooth.h:26
void set_bins(unsigned)
Set the width of the smoothing window in phase bins.
Definition: MaskSmooth.C:68
void set_turns(double)
Set the smoothing window fraction in turns.
Definition: MaskSmooth.C:32
unsigned get_bins() const
Get the width of the smoothing window in phase bins.
Definition: MaskSmooth.C:74
void set_masked_bins(unsigned)
Set the number of masked neighbours required.
Definition: MaskSmooth.C:79
MaskSmooth * clone() const
Return a copy constructed instance of self.
Definition: MaskSmooth.C:27
MaskSmooth()
Default constructor.
Definition: MaskSmooth.C:16
double get_masked_fraction() const
Get the fraction of masked neighbours required.
Definition: MaskSmooth.C:58
double get_turns() const
Get the smoothing window fraction in turns.
Definition: MaskSmooth.C:42
Defines the PSRCHIVE library.
Definition: CalSource.h:17

Generated using doxygen 1.8.17