|
MsPASS C++ API
2.4.1.dev4+g92330b7a
Defines the C++ API for MsPASS
|
Frequency domain shaping wavelet. More...
#include <ShapingWavelet.h>
Public Member Functions | |
| ShapingWavelet (const mspass::utility::Metadata &md, int npts=0) | |
| Construct using a limited set of analytic forms for the wavelet. | |
| ShapingWavelet (mspass::seismic::CoreTimeSeries d, int nfft=0) | |
| Use a wavelet defined by a TimeSeries object. | |
| ShapingWavelet (const double fpeak, const double dtin, const int n) | |
| ShapingWavelet (const int npolelo, const double f3dblo, const int npolehi, const double f3dbhi, const double dtin, const int n) | |
| ShapingWavelet (const ShapingWavelet &parent) | |
| ShapingWavelet & | operator= (const ShapingWavelet &parent) |
| ComplexArray * | wavelet () |
| mspass::seismic::CoreTimeSeries | impulse_response () |
| double | freq_bin_size () |
| double | sample_interval () |
| std::string | type () |
| int | size () const |
Frequency domain shaping wavelet.
Frequency domain based deconvolution methods all use a shaping wavelet for output to avoid ringing. Frequency domain deconvolution methods in this Library contain an instance of this object. In all cases it is hidden behind the interface. A complexity, however, is that all frequency domain methods will call the Metadata driven constructor.
This version currently allows three shaping wavelets: Gaussin, Ricker, and Slepian0. The first two are standard. The last is novel and theoretically can produce an actual output with the smalle posible sidebands
|
inline |
| mspass::algorithms::deconvolution::ShapingWavelet::ShapingWavelet | ( | const mspass::utility::Metadata & | md, |
| int | npts = 0 |
||
| ) |
Construct using a limited set of analytic forms for the wavelet.
This constructor is used to create a ricker or gaussian shaping wavelet with parameters defined by parameters passed through the Metadata object.
| md | - Metadata object with parameters specifying the wavelet. |
| npts | length of signal to be generated which is the same as the fft size for real valued signals. If set 0 (the default) the constructor will attempt to get npts from md using the keyword "operator_nfft". |
References mspass::utility::Metadata::get_string(), mspass::utility::MsPASSError::log_error(), mspass::algorithms::deconvolution::ComplexArray::ptr(), and mspass::algorithms::Butterworth::transfer_function().
| mspass::algorithms::deconvolution::ShapingWavelet::ShapingWavelet | ( | mspass::seismic::CoreTimeSeries | d, |
| int | nfft = 0 |
||
| ) |
Use a wavelet defined by a TimeSeries object.
This constructor uses the data stored in a TimeSeries object to define the shaping wavelet. Note to assure output is properly time aligned this signal is forced to be symmetric around relative time 0. That is necessary because of the way this, like every fft we are aware of, handles phase. Hence, the user should assure zero time is an appropriate zero reference (e.g. a zero phase filter should the dominant peak at 0 time.) If the input data size is smaller than the buffer size specified the buffer is zero padded.
| d | TimeSeries specifying wavelet. Note dt will be extracted and stored in this object. |
| nfft | - buffer size = fft length for frequency domain representation of the wavelet. If ns of d is less than nfft or the time range defined by d is does not exceed -(nfft/2)*dt to (nfft2)*dt the result will be sero padded before computing the fft. if nfft is 0 the d.ns will set the fft length. |
References mspass::seismic::BasicTimeSeries::dt(), mspass::seismic::BasicTimeSeries::endtime(), mspass::seismic::BasicTimeSeries::npts(), mspass::algorithms::deconvolution::ComplexArray::ptr(), mspass::seismic::CoreTimeSeries::s, mspass::seismic::BasicTimeSeries::sample_number(), mspass::seismic::BasicTimeSeries::t0(), and mspass::seismic::BasicTimeSeries::time_is_UTC().
| mspass::algorithms::deconvolution::ShapingWavelet::ShapingWavelet | ( | const double | fpeak, |
| const double | dtin, | ||
| const int | n | ||
| ) |
Construct a Ricker wavelet shaping filter with peak frequency fpeak.
References mspass::algorithms::deconvolution::ComplexArray::ptr().
| mspass::algorithms::deconvolution::ShapingWavelet::ShapingWavelet | ( | const int | npolelo, |
| const double | f3dblo, | ||
| const int | npolehi, | ||
| const double | f3dbhi, | ||
| const double | dtin, | ||
| const int | n | ||
| ) |
Construct a zero phase Butterworth filter wavelet.
This is the recommended constructor to use for adjustable bandwidth shaping. It is the default for CNR3CDecon.
| npolelo | is the number of poles for the low corner |
| f3dblo | is the 3db point for the low corner of the passband |
| npolehi | is the number of poles for the upper corner filter |
| f3dbhi | is the 3db point for the high corner of the passband. |
| dtin | sample interval of the wavelet. |
| n | number of samples in the wavelet. |
References mspass::algorithms::Butterworth::transfer_function().
| mspass::algorithms::deconvolution::ShapingWavelet::ShapingWavelet | ( | const ShapingWavelet & | parent | ) |
Copy constructor.
|
inline |
Return the frequency bin size.
| CoreTimeSeries mspass::algorithms::deconvolution::ShapingWavelet::impulse_response | ( | ) |
Return the impulse response of the shaping filter. Expect the result to be symmetric about 0 (i.e. output spans nfft/2 to nfft/2.
References mspass::algorithms::deconvolution::ComplexArray::ptr(), mspass::seismic::CoreTimeSeries::s, mspass::seismic::CoreTimeSeries::set_dt(), mspass::seismic::BasicTimeSeries::set_live(), mspass::seismic::CoreTimeSeries::set_npts(), mspass::seismic::CoreTimeSeries::set_t0(), mspass::seismic::BasicTimeSeries::set_tref(), and mspass::algorithms::deconvolution::ComplexArray::size().
| ShapingWavelet & mspass::algorithms::deconvolution::ShapingWavelet::operator= | ( | const ShapingWavelet & | parent | ) |
Assignment operator.
|
inline |
Return the sample interval.
|
inline |
Return the number of complex frequency samples.
References mspass::algorithms::deconvolution::ComplexArray::size().
|
inline |
Return the shaping wavelet type name.
|
inline |
Return a pointer to the shaping wavelet this object defines in the frequency domain.