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_attributes
bool
, default = False If set to True, a plot will be generated that shows the polarization attributes after filtering
- suppress
bool
, 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_eigenvectors
int
, 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_mask
bool
, 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.
- clip
float
, 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_frequency
bool
= False Only used if plot_filtered_attributes = True. Plot polarization attributes on a logarithmic frequency axis.
- fmin
float
, optional Only used if plot_filtered_attributes = True. Set the lower limit of the frequency axis.
- fmax
float
, optional Only used if plot_filtered_attributes = True. Set the upper limit of the frequency axis.
- Returns
- data_filtered
Stream
Filtered data. The order of traces in the stream is Z, N, E.
- data_filtered