twistpy.polarization.TimeFrequencyAnalysis3C.filter#

TimeFrequencyAnalysis3C.filter(plot_filtered_attributes: bool = False, suppress: bool = False, smooth_mask: bool = False, return_mask: bool = False, clip: float = 0.05, log_frequency: bool = False, fmin: Optional[float] = None, fmax: Optional[float] = None, no_of_eigenvectors=1, **kwargs) Tuple[source]#

Filter data based on polarization attributes.

Parameters
**kwargsFor example elli=[0, 0.3]

Polarization attributes used for filtering. The filter parameters are specified as a list with two entries, specifying the range of the polarization attributes that are kept by the filter. In the above example the filter would only retain all signal with an ellipticity between 0 and 0.3 and suppress all signal with an ellipticity larger than 0.3. Multiple polarization attributes can be specified.

Hint

Supported polariziation attributes are:

dop (degree of polarization)

elli (Ellipticity)

inc1 (Incidence angle of major semi axis)

inc2 (Incidence angle of minor semi axis)

azi1 (Azimuth of the major semi axis)

azi2 (Azimuth of the minor semi axis)

plot_filtered_attributesbool, default = False

If set to True, a plot will be generated that shows the polarization attributes after filtering

suppressbool, default = False

If set to True the polarization states that fulfill the filtering criterion will be suppressed from the data while preserving any underlying signal that is orthogonal to the polarization state.

no_of_eigenvectorsint, optional

Number of eigenvectors to be isolate or suppress from the signal. For example, no_of_eigenvectors=2 and suppress=True will suppress all signal that is aligned with the first two principal eigenvectors of the data covariance matrix.

smooth_maskbool, default = False

If set to True, the filter mask will be smoothed within the same time-frequency window that was used to compute the polarization attributes

return_mask:obj:´bool´, default = False

If set to True, the filter mask will be returned after the function is called.

clipfloat, default = 0.05

Only used if plot_filtered_attributes = True. Results are only plotted at time-frequency points where the signal amplitudes exceed a value of amplitudes * maximum amplitude in the signal (given by the l2-norm of all three components).

log_frequencybool = False

Only used if plot_filtered_attributes = True. Plot polarization attributes on a logarithmic frequency axis.

fminfloat, optional

Only used if plot_filtered_attributes = True. Set the lower limit of the frequency axis.

fmaxfloat, optional

Only used if plot_filtered_attributes = True. Set the upper limit of the frequency axis.

Returns
data_filteredStream

Filtered data. The order of traces in the stream is Z, N, E.