WaveletSmooth.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2008 by Paul Demorest
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9#ifndef __Pulsar_WaveletSmooth_h
10#define __Pulsar_WaveletSmooth_h
11
12#include "Pulsar/Transformation.h"
13#include "Pulsar/WaveletTransform.h"
14
15namespace Pulsar {
16
17 class Profile;
18
21 class WaveletSmooth : public Transformation<Profile> {
22
23 public:
24
27
30
32 unsigned get_ncoeff() const { return ncoeff; };
33
35 void transform(Profile *);
36
38 void set_wavelet(const gsl_wavelet_type *t, int order, bool decimate=true);
39
41 void set_wavelet(std::string s);
42
44 enum Threshold { Hard, Soft };
45
47 void set_threshold(Threshold t) { thresh = t; };
48
50 void set_cutoff(double cut) { cutoff_factor = cut; }
51
52 protected:
53
55 int ncoeff;
56
59
61 double cutoff;
62
65
67 double sigma;
68
71
72 private:
73
75 double thresh_hard(double in);
76
78 double thresh_soft(double in);
79
80 };
81
82}
83
84#endif
Any quantity recorded as a function of pulse phase.
Definition Profile.h:40
Algorithms that modify data in the Container.
Definition Transformation.h:20
void set_cutoff(double cut)
Adjust cutoff.
Definition WaveletSmooth.h:50
double cutoff
Threshold cutoff.
Definition WaveletSmooth.h:61
void transform(Profile *)
Smooth given Profile.
Definition WaveletSmooth.C:39
double cutoff_factor
Cutoff multiplier, for fine-tuning.
Definition WaveletSmooth.h:64
void set_wavelet(const gsl_wavelet_type *t, int order, bool decimate=true)
Set wavelet type, order.
Definition WaveletSmooth.C:32
unsigned get_ncoeff() const
Get number of wavelet coeffs kept.
Definition WaveletSmooth.h:32
double sigma
Noise level in wavelet coeffs.
Definition WaveletSmooth.h:67
void set_threshold(Threshold t)
Set threshold method.
Definition WaveletSmooth.h:47
WaveletSmooth()
Default constructor.
Definition WaveletSmooth.C:16
~WaveletSmooth()
Destructor.
Definition WaveletSmooth.C:24
int ncoeff
Number of coeffs kept.
Definition WaveletSmooth.h:55
WaveletTransform wt
The wavelet transform algorithm.
Definition WaveletSmooth.h:70
Threshold thresh
Threshold type.
Definition WaveletSmooth.h:58
Threshold
Available threshold types.
Definition WaveletSmooth.h:44
Performs 1-D discrete wavelet transforms (DWT)
Definition WaveletTransform.h:24
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0