version  0.0.1
Defines the C++ API for MsPASS
ShapingWavelet.h
1 #ifndef __SHAPING_WAVELET_H__
2 #define __SHAPING_WAVELET_H__
3 #include "mspass/utility/Metadata.h"
4 #include "mspass/algorithms/deconvolution/ComplexArray.h"
5 #include "mspass/seismic/CoreTimeSeries.h"
6 namespace mspass::algorithms::deconvolution{
19 {
20 public:
21  ShapingWavelet() {
22  dt=-1;
23  df=-1;
24  };
35  ShapingWavelet(const mspass::utility::Metadata& md, int npts=0);
36  /* \brief Use a wavelet defined by a TimeSeries object.
37  *
38  This constructor uses the data stored in a TimeSeries object to define
39  the shaping wavelet. Note to assure output is properly time aligned
40  this signal is forced to be symmetric around relative time 0. That is
41  necessary because of the way this, like every fft we are aware of, handles
42  phase. Hence, the user should assure zero time is an appropriate
43  zero reference (e.g. a zero phase filter should the dominant peak at 0
44  time.) If the input data size is smaller than the buffer size
45  specified the buffer is zero padded.
46 
47  \param w - TimeSeries specifying wavelet. Note dt will be extracted
48  and stored in this object.
49  \param nfft - buffer size = fft length for frequency domain representation
50  of the wavelet. If ns of d is less than nfft or the time range defined
51  by d is does not exceed -(nfft/2)*dt to (nfft2)*dt the result will
52  be sero padded before computing the fft. if nfft is 0 the d.ns will
53  set the fft length.
54  */
57  ShapingWavelet(const double fpeak,const double dtin, const int n);
67  ShapingWavelet(const int npolelo, const double f3dblo,
68  const int npolehi, const double f3dbhi,
69  const double dtin, const int n);
70  ShapingWavelet(const ShapingWavelet& parent);
71  ShapingWavelet& operator=(const ShapingWavelet& parent);
75  return &w;
76  };
80  double freq_bin_size() {
81  return df;
82  };
83  double sample_interval() {
84  return dt;
85  };
86  std::string type() {
87  return wavelet_name;
88  };
89 private:
90  int nfft;
92  ComplexArray w;
93  double dt,df;
94  std::string wavelet_name;
95 };
96 }
97 #endif
Frequency domain shaping wavelet.
Definition: ShapingWavelet.h:19
mspass::seismic::CoreTimeSeries impulse_response()
Definition: ShapingWavelet.cc:269
ComplexArray * wavelet()
Definition: ShapingWavelet.h:74
Scalar time series data object.
Definition: CoreTimeSeries.h:18
Definition: Metadata.h:76