ConvertIsolated.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/ConvertIsolated.h
10 
11 #ifndef __Pulsar_ConvertIsolated_h
12 #define __Pulsar_ConvertIsolated_h
13 
14 #include "Pulsar/PhaseWeightSmooth.h"
15 
16 namespace Pulsar {
17 
18  class Profile;
19 
21  class ConvertIsolated : public PhaseWeightSmooth {
22 
23  public:
24 
27 
29  ConvertIsolated* clone () const;
30 
32  void set_neighbourhood (float);
34  float get_neighbourhood () const;
35 
37  void set_like_fraction (float);
39  float get_like_fraction () const;
40 
42  void set_test (float test) { test_value = test; }
44  float get_test () const { return test_value; }
45 
47  void set_convert (float convert) { convert_value = convert; }
49  float get_convert () const { return convert_value; }
50 
51  protected:
52 
53  float neighbourhood;
54  float like_fraction;
55 
56  float test_value;
57  float convert_value;
58 
59  void calculate (PhaseWeight*);
60 
61  };
62 
63 }
64 
65 
66 #endif // !defined __Pulsar_BaselineWeight_h
void set_convert(float convert)
Set the value to which isolated elements are converted.
Definition: ConvertIsolated.h:52
ConvertIsolated * clone() const
Return new copy of self.
Definition: ConvertIsolated.C:24
float get_test() const
Get the value to test for isolation.
Definition: ConvertIsolated.h:49
Stores a weight for each Profile phase bin.
Definition: PhaseWeight.h:29
void calculate(PhaseWeight *)
Derived classes implement the PhaseWeight calculation.
Definition: ConvertIsolated.C:59
float get_convert() const
Get the value to which isolated elements are converted.
Definition: ConvertIsolated.h:54
void set_test(float test)
Set the value to test for isolation.
Definition: ConvertIsolated.h:47
void set_neighbourhood(float)
Set the size of the neighbourhood checked to the right or left.
Definition: ConvertIsolated.C:30
float get_like_fraction() const
Get the fraction of equal neighbours required to the right or left.
Definition: ConvertIsolated.C:52
void set_like_fraction(float)
Set the fraction of equal neighbours required to the right or left.
Definition: ConvertIsolated.C:44
ConvertIsolated()
Default constructor.
Definition: ConvertIsolated.C:16
float get_neighbourhood() const
Get the size of the neighbourhood checked to the right or left.
Definition: ConvertIsolated.C:39
Defines the PSRCHIVE library.
Definition: CalSource.h:17
Converts elements without equal neighbours to another state.
Definition: ConvertIsolated.h:26

Generated using doxygen 1.8.17