skrf.network.Network.drop_non_monotonic_increasing

Network.drop_non_monotonic_increasing()[source]

Drop invalid values based on duplicate and non increasing frequency values.

Example

The following example shows how to use the drop_non_monotonic_increasing() automatically, if invalid frequency data is detected and an InvalidFrequencyWarning is thrown.

>>> import warnings
>>> import skrf as rf
>>> from skrf.frequency import InvalidFrequencyWarning
>>> with warnings.catch_warnings(record=True) as warns:
>>>     net = rf.Network('corrupted_network.s2p')
>>>     w = [w for w in warns if issubclass(w.category, InvalidFrequencyWarning)]
>>>     if w:
>>>         net.drop_non_monotonic_increasing()
Return type:

None