1 #ifndef _MSPASS_BUTTERWORTH_H_
2 #define _MSPASS_BUTTERWORTH_H_
3 #include "mspass/seismic/TimeSeries.h"
4 #include "mspass/seismic/Seismogram.h"
5 #include "mspass/algorithms/deconvolution/ComplexArray.h"
6 namespace mspass::algorithms{
100 Butterworth(
const bool zerophase,
const bool enable_lo,
const bool enable_hi,
101 const double fstoplo,
const double astoplo,
102 const double fpasslo,
const double apasslo,
103 const double fpasshi,
const double apasshi,
104 const double fstophi,
const double astophi,
105 const double sample_interval);
132 Butterworth(
const bool zerophase,
const bool enable_lo,
const bool enable_hi,
133 const int npolelo,
const double f3dblo,
134 const int npolehi,
const double f3dbhi,
135 const double sample_interval);
297 this->f3db_lo *= (dtnew/(this->dt));
298 this->f3db_hi *= (dtnew/(this->dt));
333 return std::string(
"bandpass");
335 return std::string(
"highpass");
340 return std::string(
"lowpass");
342 return std::string(
"Undefined");
359 double f3db_lo, f3db_hi;
360 int npoles_lo, npoles_hi;
372 void bfdesign (
double fpass,
double apass,
double fstop,
double astop,
373 int *npoles,
double *f3db);
374 void bfhighcut (
int npoles,
double f3db,
int n,
double p[],
double q[]);
375 void bflowcut (
int npoles,
double f3db,
int n,
double p[],
double q[]);
379 void set_lo(
const double fstop,
const double fpass,
380 const double astop,
const double apass);
381 void set_hi(
const double fstop,
const double fpass,
382 const double astop,
const double apass);
MsPASS implementation of Butterworth filter as processing object.
Definition: Butterworth.h:36
int npoles_high() const
Definition: Butterworth.h:316
void apply(std::vector< double > &d)
Filter a raw vector of data.
int npoles_low() const
Definition: Butterworth.h:313
std::string filter_type() const
Definition: Butterworth.h:328
mspass::algorithms::deconvolution::ComplexArray transfer_function(const int n)
Return the response of the filter in the frequency domain.
Definition: Butterworth.cc:436
Butterworth & operator=(const Butterworth &parent)
Definition: Butterworth.cc:224
mspass::seismic::CoreTimeSeries impulse_response(const int n)
Return the impulse response.
Definition: Butterworth.cc:239
Butterworth()
Default constructor.
Definition: Butterworth.cc:19
bool is_zerophase() const
Definition: Butterworth.h:347
void change_dt(const double dtnew)
set the sample interval assumed for input data.
Definition: Butterworth.h:295
double low_corner() const
Definition: Butterworth.h:302
double high_corner() const
Definition: Butterworth.h:307
double current_dt() const
Definition: Butterworth.h:318
void apply(mspass::seismic::CoreTimeSeries &d)
pply the filter to a CoreTimeSeries object.
Definition: Butterworth.cc:254
Definition: ComplexArray.h:29
Vector (three-component) seismogram data object.
Definition: CoreSeismogram.h:40
Scalar time series data object.
Definition: CoreTimeSeries.h:18
Implemntation of Seismogram for MsPASS.
Definition: Seismogram.h:15
Implemntation of TimeSeries for MsPASS.
Definition: TimeSeries.h:15