|
MsPASS C++ API
2.4.1.dev4+g92330b7a
Defines the C++ API for MsPASS
|
Noise-aware stable FFT inverse used by NS-GID. More...
#include <NoiseStableDecon.h>


Public Member Functions | |
| NoiseStableDecon (const mspass::utility::Metadata &md) | |
| Construct from metadata defining FFT and NS-GID parameters. | |
| NoiseStableDecon (const mspass::utility::Metadata &md, const std::vector< double > &wavelet, const std::vector< double > &data) | |
| Construct and load wavelet and data vectors. | |
| void | changeparameter (const mspass::utility::Metadata &md) |
| Update operator parameters from a Metadata container. | |
| void | process () |
| Compute the noise-stable inverse filter and result. | |
| void | loadnoise (const std::vector< double > &noise) |
| Load a noise waveform used to form frequency-dependent damping. | |
| void | loadnoise (const mspass::seismic::CoreTimeSeries &noise) |
| Load a noise waveform from a core time series. | |
| void | loadnoise (const mspass::seismic::PowerSpectrum &noise_spectrum) |
| Load a precomputed noise power spectrum. | |
| mspass::seismic::CoreTimeSeries | actual_output () |
| Return the actual output of the deconvolution operator. | |
| mspass::seismic::CoreTimeSeries | inverse_wavelet (const double t0parent) |
| Return the inverse filter impulse response. | |
| mspass::seismic::CoreTimeSeries | inverse_wavelet () |
| Return a FIR represention of the inverse filter. | |
| mspass::utility::Metadata | QCMetrics () |
| Return appropriate quality measures. | |
| double | max_gain () const |
| double | gain_cap () const |
Public Member Functions inherited from mspass::algorithms::deconvolution::FFTDeconOperator | |
| FFTDeconOperator () | |
| Construct an empty FFT operator shell. | |
| FFTDeconOperator (const mspass::utility::Metadata &md) | |
| Construct from deconvolution Metadata. | |
| FFTDeconOperator (const FFTDeconOperator &parent) | |
| Copy constructor. | |
| ~FFTDeconOperator () | |
| Release allocated GSL FFT work objects. | |
| FFTDeconOperator & | operator= (const FFTDeconOperator &parent) |
| Assign FFT size and lag shift from another operator. | |
| void | changeparameter (const mspass::utility::Metadata &md) |
| Reconfigure the FFT operator from Metadata. | |
| void | change_size (const int nfft_new) |
| Change the FFT work-buffer length. | |
| void | change_shift (const int shift) |
| Set the sample offset used to unwrap deconvolution lag windows. | |
| int | get_size () |
| Return the current FFT work-buffer length. | |
| int | get_shift () |
| Return the current deconvolution lag-window sample shift. | |
| int | operator_size () |
| Return the current FFT work-buffer length. | |
| int | operator_shift () |
| Return the current deconvolution lag-window sample shift. | |
| double | df (const double dt) |
| Return frequency spacing for the current FFT length. | |
| mspass::seismic::CoreTimeSeries | FourierInverse (const ComplexArray &winv, const ComplexArray &sw, const double dt, const double t0parent) |
| Return inverse wavelet for Fourier methods. | |
Public Member Functions inherited from mspass::algorithms::deconvolution::ScalarDecon | |
| ScalarDecon () | |
| Construct an empty scalar deconvolution operator. | |
| ScalarDecon (const mspass::utility::Metadata &md) | |
| Construct from Metadata. | |
| ScalarDecon (const std::vector< double > &d, const std::vector< double > &w) | |
| Construct with loaded data and source-wavelet vectors. | |
| ScalarDecon (const ScalarDecon &parent) | |
| Copy constructor preserving loaded vectors and shaping wavelet. | |
| int | load (const std::vector< double > &wavelet, const std::vector< double > &data) |
| Load all data required for decon. | |
| int | loaddata (const std::vector< double > &data) |
| int | loadwavelet (const std::vector< double > &wavelet) |
| ScalarDecon & | operator= (const ScalarDecon &parent) |
| Assign loaded wavelet, data, and result vectors from parent. | |
| std::vector< double > | getresult () |
| Return the current deconvolution result vector. | |
| void | changeparameter (const mspass::utility::Metadata &md) |
| void | change_shaping_wavelet (const ShapingWavelet &nsw) |
| ShapingWavelet | get_shaping_wavelet () const |
| virtual mspass::seismic::CoreTimeSeries | output_shaping_wavelet () |
| Return the output shaping wavelet. | |
| mspass::seismic::CoreTimeSeries | ideal_output () |
| Legacy alias for output_shaping_wavelet. | |
| mspass::seismic::CoreTimeSeries | resolution_kernel () |
| Alias for actual_output using inverse-theory terminology. | |
Public Member Functions inherited from mspass::algorithms::deconvolution::BasicDeconOperator | |
| virtual | ~BasicDeconOperator () |
Additional Inherited Members | |
Protected Member Functions inherited from mspass::algorithms::deconvolution::ScalarDecon | |
| mspass::utility::Metadata | BasicQCMetrics (const std::string &operator_name, const bool processed) |
| Build QC Metadata fields common to scalar deconvolution operators. | |
Protected Attributes inherited from mspass::algorithms::deconvolution::FFTDeconOperator | |
| int | nfft |
| Current FFT work-buffer length in samples. | |
| int | sample_shift |
| Sample offset used to place zero lag in deconvolution outputs. | |
| gsl_fft_complex_wavetable * | wavetable |
| GSL factorization table allocated for nfft. | |
| gsl_fft_complex_workspace * | workspace |
| GSL scratch workspace allocated for nfft. | |
| ComplexArray | winv |
| Frequency-domain inverse wavelet coefficients for derived operators. | |
Protected Attributes inherited from mspass::algorithms::deconvolution::ScalarDecon | |
| std::vector< double > | data |
| Data vector to be deconvolved by concrete scalar methods. | |
| std::vector< double > | wavelet |
| Source-wavelet estimate used by concrete scalar methods. | |
| std::vector< double > | result |
| Deconvolved output vector produced by process. | |
| ShapingWavelet | shapingwavelet |
| Output shaping wavelet applied by scalar deconvolution methods. | |
Noise-aware stable FFT inverse used by NS-GID.
This scalar operator computes
G(f)=B(f) conj(S(f))/(|S(f)|^2 + mu(f))
with frequency-dependent damping from an optional noise spectrum and an explicit gain cap. The minimum damping parameter is scaled by peak wavelet spectral power. It is intended as the inverse operator used to form the GID peak-picking function. As a standalone scalar deconvolution operator it applies one stable inverse filter and returns the finite-bandwidth result; it does not run sparse iteration and does not apply the GID output shaping wavelet.
| mspass::algorithms::deconvolution::NoiseStableDecon::NoiseStableDecon | ( | ) |
| mspass::algorithms::deconvolution::NoiseStableDecon::NoiseStableDecon | ( | const mspass::utility::Metadata & | md | ) |
Construct from metadata defining FFT and NS-GID parameters.
| md | metadata containing FFT sizing, shaping-wavelet, and noise-stable inverse parameters. |
| mspass::algorithms::deconvolution::NoiseStableDecon::NoiseStableDecon | ( | const mspass::utility::Metadata & | md, |
| const std::vector< double > & | wavelet, | ||
| const std::vector< double > & | data | ||
| ) |
Construct and load wavelet and data vectors.
| md | metadata containing FFT sizing, shaping-wavelet, and noise-stable inverse parameters. |
| wavelet | source wavelet samples. |
| data | data samples to deconvolve with the source wavelet. |
References mspass::algorithms::deconvolution::ScalarDecon::data, and mspass::algorithms::deconvolution::ScalarDecon::wavelet.
|
virtual |
Return the actual output of the deconvolution operator.
The actual output is defined as w^-1*w and is compable to resolution kernels in linear inverse theory. Although not required we would normally expect this function to be peaked at 0. Offsets from 0 would imply a bias.
Implements mspass::algorithms::deconvolution::ScalarDecon.
References mspass::algorithms::deconvolution::FFTDeconOperator::nfft, mspass::algorithms::deconvolution::ComplexArray::ptr(), mspass::algorithms::deconvolution::ScalarDecon::result, mspass::algorithms::deconvolution::ShapingWavelet::sample_interval(), mspass::algorithms::deconvolution::ScalarDecon::shapingwavelet, mspass::algorithms::deconvolution::ComplexArray::size(), mspass::algorithms::deconvolution::ScalarDecon::wavelet, mspass::algorithms::deconvolution::FFTDeconOperator::wavetable, mspass::algorithms::deconvolution::FFTDeconOperator::winv, and mspass::algorithms::deconvolution::FFTDeconOperator::workspace.
|
virtual |
Update operator parameters from a Metadata container.
Implements mspass::algorithms::deconvolution::BasicDeconOperator.
References mspass::algorithms::deconvolution::ScalarDecon::result, and mspass::algorithms::deconvolution::FFTDeconOperator::winv.
|
inline |
Return the configured hard cap on inverse-filter gain.
|
virtual |
Return a FIR represention of the inverse filter.
After any deconvolution is computed one can sometimes produce a finite impulse response (FIR) respresentation of the inverse filter.
Implements mspass::algorithms::deconvolution::ScalarDecon.
References inverse_wavelet().
|
virtual |
Return the inverse filter impulse response.
| t0parent | parent waveform start time used to set the output time standard. |
Implements mspass::algorithms::deconvolution::ScalarDecon.
References mspass::algorithms::deconvolution::FFTDeconOperator::FourierInverse(), mspass::algorithms::deconvolution::FFTDeconOperator::nfft, mspass::algorithms::deconvolution::ComplexArray::ptr(), mspass::algorithms::deconvolution::ShapingWavelet::sample_interval(), mspass::algorithms::deconvolution::ScalarDecon::shapingwavelet, mspass::algorithms::deconvolution::ComplexArray::size(), and mspass::algorithms::deconvolution::FFTDeconOperator::winv.
| void mspass::algorithms::deconvolution::NoiseStableDecon::loadnoise | ( | const mspass::seismic::CoreTimeSeries & | noise | ) |
Load a noise waveform from a core time series.
| noise | scalar noise time series. |
References loadnoise(), and mspass::seismic::CoreTimeSeries::s.
| void mspass::algorithms::deconvolution::NoiseStableDecon::loadnoise | ( | const mspass::seismic::PowerSpectrum & | noise_spectrum | ) |
Load a precomputed noise power spectrum.
| noise_spectrum | spectrum that covers DC and describes noise power. |
References mspass::algorithms::deconvolution::ScalarDecon::result, and mspass::algorithms::deconvolution::FFTDeconOperator::winv.
| void mspass::algorithms::deconvolution::NoiseStableDecon::loadnoise | ( | const std::vector< double > & | noise | ) |
Load a noise waveform used to form frequency-dependent damping.
| noise | scalar noise samples. |
References mspass::algorithms::deconvolution::ScalarDecon::result, and mspass::algorithms::deconvolution::FFTDeconOperator::winv.
|
inline |
Return the largest gain reached by the processed inverse filter.
|
virtual |
Compute the noise-stable inverse filter and result.
The method requires loaded wavelet and data vectors and rebuilds cached output, inverse-filter, and QC state.
Implements mspass::algorithms::deconvolution::ScalarDecon.
References mspass::algorithms::deconvolution::ScalarDecon::data, mspass::algorithms::deconvolution::FFTDeconOperator::nfft, mspass::algorithms::deconvolution::ComplexArray::ptr(), mspass::algorithms::deconvolution::ScalarDecon::result, mspass::algorithms::deconvolution::ComplexArray::rms(), mspass::algorithms::deconvolution::ShapingWavelet::sample_interval(), mspass::algorithms::deconvolution::FFTDeconOperator::sample_shift, mspass::algorithms::deconvolution::ScalarDecon::shapingwavelet, mspass::algorithms::deconvolution::ScalarDecon::wavelet, mspass::algorithms::deconvolution::FFTDeconOperator::wavetable, mspass::algorithms::deconvolution::FFTDeconOperator::winv, and mspass::algorithms::deconvolution::FFTDeconOperator::workspace.
|
virtual |
Return appropriate quality measures.
Each operator commonly has different was to measure the quality of the result. This method should return these in a generic Metadata object.
Implements mspass::algorithms::deconvolution::ScalarDecon.
References mspass::algorithms::deconvolution::ScalarDecon::BasicQCMetrics(), mspass::algorithms::deconvolution::FFTDeconOperator::nfft, mspass::utility::Metadata::put(), and mspass::algorithms::deconvolution::FFTDeconOperator::sample_shift.