1#ifndef _MSPASS_BUTTERWORTH_H_
2#define _MSPASS_BUTTERWORTH_H_
3#include "mspass/algorithms/deconvolution/ComplexArray.h"
4#include "mspass/seismic/Seismogram.h"
5#include "mspass/seismic/TimeSeries.h"
6namespace mspass::algorithms {
99 Butterworth(
const bool zerophase,
const bool enable_lo,
const bool enable_hi,
100 const double fstoplo,
const double astoplo,
const double fpasslo,
101 const double apasslo,
const double fpasshi,
const double apasshi,
102 const double fstophi,
const double astophi,
103 const double sample_interval);
130 Butterworth(
const bool zerophase,
const bool enable_lo,
const bool enable_hi,
131 const int npolelo,
const double f3dblo,
const int npolehi,
132 const double f3dbhi,
const double sample_interval);
294 this->f3db_lo *= (dtnew / (this->dt));
295 this->f3db_hi *= (dtnew / (this->dt));
322 return std::string(
"bandpass");
324 return std::string(
"highpass");
327 return std::string(
"lowpass");
329 return std::string(
"Undefined");
344 double f3db_lo, f3db_hi;
345 int npoles_lo, npoles_hi;
357 void bfdesign(
double fpass,
double apass,
double fstop,
double astop,
358 int *npoles,
double *f3db);
359 void bfhighcut(
int npoles,
double f3db,
int n,
double p[],
double q[]);
360 void bflowcut(
int npoles,
double f3db,
int n,
double p[],
double q[]);
365 void set_lo(
const double fstop,
const double fpass,
const double astop,
367 void set_hi(
const double fstop,
const double fpass,
const double astop,
MsPASS implementation of Butterworth filter as processing object.
Definition Butterworth.h:35
int npoles_high() const
Definition Butterworth.h:307
void apply(std::vector< double > &d)
Filter a raw vector of data.
int npoles_low() const
Definition Butterworth.h:304
std::string filter_type() const
Definition Butterworth.h:319
mspass::algorithms::deconvolution::ComplexArray transfer_function(const int n)
Return the response of the filter in the frequency domain.
Definition Butterworth.cc:394
Butterworth & operator=(const Butterworth &parent)
Definition Butterworth.cc:204
mspass::seismic::CoreTimeSeries impulse_response(const int n)
Return the impulse response.
Definition Butterworth.cc:217
Butterworth()
Default constructor.
Definition Butterworth.cc:19
bool is_zerophase() const
Definition Butterworth.h:334
void change_dt(const double dtnew)
set the sample interval assumed for input data.
Definition Butterworth.h:293
double low_corner() const
Definition Butterworth.h:299
double high_corner() const
Definition Butterworth.h:301
double current_dt() const
Definition Butterworth.h:309
void apply(mspass::seismic::CoreTimeSeries &d)
pply the filter to a CoreTimeSeries object.
Definition Butterworth.cc:232
Definition ComplexArray.h:37
Vector (three-component) seismogram data object.
Definition CoreSeismogram.h:39
Scalar time series data object.
Definition CoreTimeSeries.h:17
Implemntation of Seismogram for MsPASS.
Definition Seismogram.h:14
Implemntation of TimeSeries for MsPASS.
Definition TimeSeries.h:14