twistpy.polarization.TimeFrequencyAnalysis6C#
- class TimeFrequencyAnalysis6C(traN: Trace, traE: Trace, traZ: Trace, rotN: Trace, rotE: Trace, rotZ: Trace, window: dict, dsfacf: int = 1, dsfact: int = 1, frange: Optional[Tuple[float, float]] = None, trange: Optional[Tuple[UTCDateTime, UTCDateTime]] = None, k: float = 1, scaling_velocity: float = 1.0, free_surface: bool = True, verbose: bool = True, timeaxis: str = 'utc')[source]#
Time-frequency domain six-component polarization analysis.
Single-station six degree-of-freedom polarization analysis on time-frequency decomposed signals. The time-frequency representation is obtained via the S-transform (
twistpy.utils.s_transform
) [1], [2].Hint
[1] Sollberger et al. (2018). 6-C polarization analysis using point measurements of translational and rotational ground-motion: theory and applications, Geophysical Journal International, 213(1), https://doi.org/10.1093/gji/ggx542
[2] Sollberger et al. (2020). Seismological processing of six degree-of-freedom ground-motion data, Sensors, 20(23), https://doi.org/10.3390/s20236904
- Parameters
- traN
Trace
North component of translation
- traE
Trace
East component of translation
- traZ
Trace
Vertical component of translation (positive downwards!)
- rotN
Trace
North component of rotation
- rotE
Trace
East component of rotation
- rotZ
Trace
Vertical component of rotation (right-handed, pointing downwards!)
- window
dict
2-D time-frequency window within which the covariance matrices are averaged:
- dsfact
int
, default=1 Down-sampling factor of the time-axis prior to the computation of polarization attributes.
- dsfacf
int
, default=1 Down-sampling factor of the frequency-axis prior to the computation of polarization attributes.
Warning
Downsampling of the frequency axis (dsfacf > 1) prevents the accurate computation of the inverse S-transform! Down-sampling should be avoided for filtering applications.
- frange
tuple
, (f_min, f_max) Limit the analysis to the specified frequency band in Hz
- trange
tuple
, (t_min, t_max) Limit the analysis to the specified time window. t_min and t_max should either be specified as a tuple of two
UTCDateTime
objects (if timeaxis=’utc’), or as a tuple offloat
(if timeaxis=’rel’).- k
float
, default=1. k-value used in the S-transform, corresponding to a scaling factor that controls the number of oscillations in the Gaussian window. When k increases, the frequency resolution increases, with a corresponding loss of time resolution.
See also
twistpy.utils.s_transform
- scaling_velocity
float
, default=1. Scaling velocity (in m/s) to ensure numerical stability. The scaling velocity is applied to the translational data only (amplitudes are divided by scaling velocity) and ensures that both translation and rotation amplitudes are on the same order of magnitude and dimensionless. Ideally, v_scal is close to the S-Wave velocity at the receiver. After applying the scaling velocity, translation and rotation signals amplitudes should be similar.
- free_surface
bool
, default=True Specify whether the recording station is located at the free surface in order to use the corresponding polarization models.
- verbose
bool
, default=True Run in verbose mode.
- timeaxis:obj:’str’, default=’utc’
Specify whether the time axis of plots is shown in UTC (timeaxis=’utc’) or in seconds relative to the first sample (timeaxis=’rel’).
- traN
- Attributes
- classification
dict
Dictionary containing the labels of classified wave types at each position of the analysis window in time and frequency. The dictionary has six entries corresponding to classifications for each eigenvector.
classification = {‘0’: list_with_classifications_of_first_eigenvector, ‘1’: list_with_classification_of_second_eigenvector, … , ‘5’: list_with_classification_of_last_eigenvector}- wave_parameters
dict
Dictionary containing the estimated wave parameters.
- t_pol
list
ofUTCDateTime
Time axis of the computed polarization attributes.
- f_pol
ndarray
offloat
Frequency axis of the computed polarization attributes.
- C
ndarray
ofcomplex128
Complex covariance matrices at each window position
- dop
ndarray
offloat
Degree of polarization as a function of time- and frequency.
- time
list
ofUTCDateTime
Time axis of the input traces
- delta
float
Sampling interval of the input data in seconds
- classification
Methods
classify
(svm[, eigenvector_to_classify, ...])Classify wave types using a support vector machine
filter
(svm[, wave_types, ...])Wavefield separation
plot_classification
(ax[, ...])Plot wave type classification labels as a function of time and frequency.
plot_wave_parameters
(...)Plot estimated wave parameters
polarization_analysis
([...])Perform polarization analysis.
save
(name)Save the current TimeFrequencyAnalaysis6C object to a file on the disk in the current working directory.
Examples using twistpy.polarization.TimeFrequencyAnalysis6C
#
6-C Wave parameter estimation: gulf of alaska earthquake