RemoveBaseline.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2009 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/General/Pulsar/RemoveBaseline.h
10
11#ifndef _Pulsar_RemoveBaseline_H
12#define _Pulsar_RemoveBaseline_H
13
14#include "Pulsar/Transformation.h"
15#include "Pulsar/Archive.h"
16
17namespace Pulsar
18{
20 class RemoveBaseline : public Transformation<Archive>
21 {
22 public:
23
24 RemoveBaseline ();
25
26 /* Two simple baseline removal algorithms
27 (Not every child of RemoveBaseline needs to be nested.) */
28
29 class Total;
30 class Each;
31
33
38 {
39 public:
40 static Operation* factory (const std::string&);
41
42 virtual void operate (Profile*, const PhaseWeight*) = 0;
43 };
44
45 /* Some simple baseline removal operations
46 (Not every child of RemoveBaseline::Operation needs to be nested.) */
47
48 class SubtractMean;
49 class SubtractMedian;
50 class NormalizeByMean;
51 class NormalizeByMedian;
52 class NormalizeByStdDev;
53 class NormalizeByMedAbsDif;
54
55 void set_operation (Operation*);
56
57 protected:
58 Reference::To<Operation> profile_operation;
59 };
60
62
65 class RemoveBaseline::Total : public RemoveBaseline
66 {
67 public:
68
70 void transform (Archive*);
71
73 void operate (Integration*, const PhaseWeight*);
74 };
75
77
80 class RemoveBaseline::Each : public RemoveBaseline
81 {
82 public:
83
85 void transform (Archive*);
86 };
87
88 class RemoveBaseline::SubtractMean
90 {
91 public:
92 virtual void operate (Profile*, const PhaseWeight*);
93 };
94
95 class RemoveBaseline::SubtractMedian
97 {
98 public:
99 virtual void operate (Profile*, const PhaseWeight*);
100 };
101
102 class RemoveBaseline::NormalizeByMean
104 {
105 public:
106 virtual void operate (Profile*, const PhaseWeight*);
107 };
108
109 class RemoveBaseline::NormalizeByMedian
111 {
112 public:
113 virtual void operate (Profile*, const PhaseWeight*);
114 };
115
116 class RemoveBaseline::NormalizeByStdDev
118 {
119 public:
120 virtual void operate (Profile*, const PhaseWeight*);
121 };
122
123 class RemoveBaseline::NormalizeByMedAbsDif
125 {
126 public:
127 virtual void operate (Profile*, const PhaseWeight*);
128 };
129
130
131}
132
133#endif
134
Any quantity recorded as a function of pulse phase.
Definition Profile.h:40
The primary interface to pulsar observational data.
Definition Archive.h:46
Array of Profiles integrated over the same time interval.
Definition Integration.h:37
Stores a weight for each Profile phase bin.
Definition PhaseWeight.h:24
Any quantity recorded as a function of pulse phase.
Definition Profile.h:40
Find the baseline from each total intensity profile.
Definition RemoveBaseline.h:81
void transform(Archive *)
Remove the baseline.
Definition RemoveBaseline.C:81
Performs the baseline removal operation.
Definition RemoveBaseline.h:38
Find the baseline from the total integrated total intensity profile.
Definition RemoveBaseline.h:66
void operate(Integration *, const PhaseWeight *)
Remove the baseline.
Definition RemoveBaseline.C:44
void transform(Archive *)
Remove the baseline.
Definition RemoveBaseline.C:31
Algorithms that modify data in the Container.
Definition Transformation.h:20
Performs the baseline removal operation.
Definition RemoveBaseline.h:38
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0