MsPASS C++ API  2.4.3.dev1+g61b06b96
Defines the C++ API for MsPASS
Loading...
Searching...
No Matches
ShapingWavelet.h
1#ifndef __SHAPING_WAVELET_H__
2#define __SHAPING_WAVELET_H__
3#include "mspass/algorithms/deconvolution/ComplexArray.h"
4#include "mspass/seismic/CoreTimeSeries.h"
5#include "mspass/utility/Metadata.h"
6#include <boost/archive/text_iarchive.hpp>
7#include <boost/archive/text_oarchive.hpp>
8#include <boost/serialization/vector.hpp>
9#include <utility>
10namespace mspass::algorithms::deconvolution {
23public:
24 ShapingWavelet() : nfft(0), dt(-1), df(-1) {};
35 ShapingWavelet(const mspass::utility::Metadata &md, int npts = 0);
57 ShapingWavelet(const double fpeak, const double dtin, const int n);
69 ShapingWavelet(const int npolelo, const double f3dblo, const int npolehi,
70 const double f3dbhi, const double dtin, const int n);
72 ShapingWavelet(const ShapingWavelet &parent);
76 void swap(ShapingWavelet &other) noexcept {
77 std::swap(nfft, other.nfft);
78 w.swap(other.w);
79 std::swap(dt, other.dt);
80 std::swap(df, other.df);
81 wavelet_name.swap(other.wavelet_name);
82 }
85 ComplexArray *wavelet() { return &w; };
90 double freq_bin_size() { return df; };
92 double sample_interval() { return dt; };
94 std::string type() { return wavelet_name; };
96 int size() const { return w.size(); };
97
98private:
99 int nfft;
101 ComplexArray w;
102 double dt, df;
103 std::string wavelet_name;
104 friend boost::serialization::access;
105 template <class Archive>
106 void serialize(Archive &ar, const unsigned int version) {
107 ar & nfft;
108 ar & dt;
109 ar & df;
110 ar & wavelet_name;
111 ar & w;
112 }
113};
114} // namespace mspass::algorithms::deconvolution
115#endif
Interfacing object to ease conversion between FORTRAN and C++ complex.
Definition ComplexArray.h:44
int size() const
Definition ComplexArray.cc:275
void swap(ComplexArray &other) noexcept
Definition ComplexArray.h:88
Frequency domain shaping wavelet.
Definition ShapingWavelet.h:22
std::string type()
Definition ShapingWavelet.h:94
int size() const
Definition ShapingWavelet.h:96
void swap(ShapingWavelet &other) noexcept
Definition ShapingWavelet.h:76
mspass::seismic::CoreTimeSeries impulse_response()
Definition ShapingWavelet.cc:268
ShapingWavelet & operator=(const ShapingWavelet &parent)
Definition ShapingWavelet.cc:258
double freq_bin_size()
Definition ShapingWavelet.h:90
ComplexArray * wavelet()
Definition ShapingWavelet.h:85
double sample_interval()
Definition ShapingWavelet.h:92
Scalar time series data object.
Definition CoreTimeSeries.h:17
Type-safe metadata container used throughout MsPASS.
Definition Metadata.h:101