1#ifndef __MTPOWERSPECTRUM_ENGINE_H__
2#define __MTPOWERSPECTRUM_ENGINE_H__
4#include "mspass/seismic/PowerSpectrum.h"
5#include "mspass/seismic/TimeSeries.h"
6#include "mspass/utility/dmatrix.h"
7#include <boost/archive/text_iarchive.hpp>
8#include <boost/archive/text_oarchive.hpp>
9#include <gsl/gsl_errno.h>
10#include <gsl/gsl_fft_complex.h>
14namespace mspass::algorithms::deconvolution {
51 const int nfftin = -1,
const double dtin = 1.0);
90 std::vector<double>
apply(
const std::vector<double> &d);
92 double df()
const {
return deltaf; };
106 double dt() {
return operator_dt; };
127 this->operator_dt =
dt;
128 int this_nf = this->
nf();
129 double fny = 1.0 / (2.0 *
dt);
130 this->deltaf = fny /
static_cast<double>(this_nf - 1);
145 return (this->nfft) / 2 + 1;
157 gsl_fft_complex_wavetable *wavetable;
158 gsl_fft_complex_workspace *workspace;
159 friend boost::serialization::access;
160 template <
class Archive>
161 void save(Archive &ar,
const unsigned int version)
const {
170 template <
class Archive>
void load(Archive &ar,
const unsigned int version) {
178 this->wavetable = gsl_fft_complex_wavetable_alloc(this->nfft);
179 this->workspace = gsl_fft_complex_workspace_alloc(this->nfft);
181 BOOST_SERIALIZATION_SPLIT_MEMBER()
Multittaper power spectral estimator.
Definition MTPowerSpectrumEngine.h:29
int number_tapers() const
Definition MTPowerSpectrumEngine.h:101
int taper_length() const
Definition MTPowerSpectrumEngine.h:97
double set_df(double dt)
Putter equivalent of df.
Definition MTPowerSpectrumEngine.h:126
MTPowerSpectrumEngine()
Definition MTPowerSpectrumEngine.cc:17
MTPowerSpectrumEngine & operator=(const MTPowerSpectrumEngine &parent)
Definition MTPowerSpectrumEngine.cc:102
std::vector< double > frequencies()
Definition MTPowerSpectrumEngine.cc:256
~MTPowerSpectrumEngine()
Definition MTPowerSpectrumEngine.cc:95
int nf()
Definition MTPowerSpectrumEngine.h:135
mspass::seismic::PowerSpectrum apply(const mspass::seismic::TimeSeries &d)
Definition MTPowerSpectrumEngine.cc:116
std::vector< double > apply(const std::vector< double > &d)
Low level processing of vector of data.
double time_bandwidth_product() const
Definition MTPowerSpectrumEngine.h:99
double df() const
Definition MTPowerSpectrumEngine.h:92
double dt()
Definition MTPowerSpectrumEngine.h:106
int fftsize() const
Definition MTPowerSpectrumEngine.h:104
Definition PowerSpectrum.h:11
Implemntation of TimeSeries for MsPASS.
Definition TimeSeries.h:14
Lightweight, simple matrix object.
Definition dmatrix.h:104