9 #ifndef __Apodization_h
10 #define __Apodization_h
15 #include "dsp/Shape.h"
23 class Apodization : public Shape
28 enum Type { none, hanning, welch, bartlett, tukey, top_hat };
38 bool get_analytic () const { return analytic; }
47 void set_transition ( unsigned n) { transition_end = transition_start = n; }
73 Type getType () { return type; };
75 Type get_type () { return getType(); };
78 void operate ( float* indata, float* outdata = 0) const;
88 void dump ( const std::string& filename);
92 static std::map<std::string, Type> type_map;
109 unsigned transition_start;
111 unsigned transition_end;
113 static std::map<std::string, Type> init_type_map ()
115 static std::map<std::string, Type> _type_map;
116 _type_map[ "no_window"] = none;
117 _type_map[ "none"] = none;
118 _type_map[ "bartlett"] = bartlett;
119 _type_map[ "hanning"] = hanning;
120 _type_map[ "tukey"] = tukey;
121 _type_map[ "welch"] = welch;
122 _type_map[ "top_hat"] = top_hat;
Contains all Baseband Data Reduction Library classes. Definition: ASCIIObservation.h:17
void set_transition_end(unsigned n) Number of samples in the transition region on the end. Definition: Apodization.h:56
void normalize() make the integrated total of the window equal to one Definition: Apodization.C:181
void set_type(const std::string &) Set the type of window function by name. Definition: Apodization.C:34
void swap() Swap the two halves of the window. Definition: Apodization.C:169
void Tukey() Create Tukey window function. Definition: Apodization.C:123
void set_transition_start(unsigned n) Number of samples in the transition region on the start. Definition: Apodization.h:54
void build() Build the specified window. Definition: Apodization.C:44
void dump(const std::string &filename) Write the window to a text file. Definition: Apodization.C:208
void Welch() Create a Welch window function. Definition: Apodization.C:95
Apodization() Null constructor. Definition: Apodization.C:16
void TopHat() Create top hat window function. Definition: Apodization.C:74
void Bartlett() Create a Bartlett window function. Definition: Apodization.C:108
void set_size(unsigned) Set the number of samples in the window. Definition: Apodization.C:29
void Hanning() Create a Hanning window function. Definition: Apodization.C:85
void set_analytic(bool f=true) Set true when the data to be tapered are complex-valued. Definition: Apodization.h:47
void operate(float *indata, float *outdata=0) const Multiply indata by the window function. Definition: Apodization.C:148
double integrated_product(float *data, unsigned incr=1) const Returns SUM i=1..N {window[i] * data[i]}. Definition: Apodization.C:191
Generated using doxygen 1.8.17
|