MsPASS C++ API  2.4.4.dev113+gc53d735d5
Defines the C++ API for MsPASS
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
mspass::algorithms::amplitudes::BandwidthData Class Reference

Holds parameters defining a passband computed from snr. More...

#include <amplitudes.h>

Public Member Functions

double bandwidth_fraction () const
 
double bandwidth () const
 

Public Attributes

double low_edge_f
 
double high_edge_f
 
double low_edge_snr
 
double high_edge_snr
 
double f_range
 

Detailed Description

Holds parameters defining a passband computed from snr.

This deconvolution operator has the option to determine the optimal shaping wavelet on the fly based on data bandwidth. This class is a struct in C++ disguise used to hold the encapsulation of the output of function(s) used to estimate the data bandwidth. This class is used only internally with CNR3CDecon to hold this information. It is not expected to be visible to python in MsPaSS, for example.

Constructor & Destructor Documentation

◆ BandwidthData()

mspass::algorithms::amplitudes::BandwidthData::BandwidthData ( )
inline
316 {
317 low_edge_f = 0.0;
318 high_edge_f = 0.0;
319 low_edge_snr = 0.0;
320 high_edge_snr = 0.0;
321 f_range = 0.0;
322 };
double low_edge_f
Definition amplitudes.h:307
double high_edge_f
Definition amplitudes.h:309
double f_range
Definition amplitudes.h:315
double low_edge_snr
Definition amplitudes.h:311
double high_edge_snr
Definition amplitudes.h:313

Member Function Documentation

◆ bandwidth()

double mspass::algorithms::amplitudes::BandwidthData::bandwidth ( ) const
inline

Return bandwidth in dB.

332 {
333 /* All these conditionals are necessary for handling unexpected
334 * values. 0 is effectively and error return. Without these
335 * the function can return NaN or generate floating point exceptions. */
336 if ((f_range <= 0.0) || (high_edge_f <= low_edge_f) ||
337 (high_edge_f < 0.0) || (low_edge_f <= 0.0))
338 return 0.0;
339 else {
340 double ratio = high_edge_f / low_edge_f;
341 return 20.0 * log10(ratio);
342 }
343 };

References f_range, high_edge_f, and low_edge_f.

◆ bandwidth_fraction()

double mspass::algorithms::amplitudes::BandwidthData::bandwidth_fraction ( ) const
inline

Return a metric of the estimated bandwidth divided by total frequency range

325 {
326 if (f_range <= 0.0)
327 return 0.0;
328 else
329 return (high_edge_f - low_edge_f) / f_range;
330 };

References f_range, high_edge_f, and low_edge_f.

Member Data Documentation

◆ f_range

double mspass::algorithms::amplitudes::BandwidthData::f_range

Total frequency range of the original data used to normalize bandwidth.

◆ high_edge_f

double mspass::algorithms::amplitudes::BandwidthData::high_edge_f

Upper corner frequency for band being defined.

◆ high_edge_snr

double mspass::algorithms::amplitudes::BandwidthData::high_edge_snr

Signal to noise ratio at upper band edge.

◆ low_edge_f

double mspass::algorithms::amplitudes::BandwidthData::low_edge_f

Low corner frequency for band being defined.

◆ low_edge_snr

double mspass::algorithms::amplitudes::BandwidthData::low_edge_snr

Signal to noise ratio at lower band edge.


The documentation for this class was generated from the following file: