Data.threshold¶
- Data.threshold(threshold, **kargs)¶
Find partial indices where the data in column passes the threshold, rising or falling.
- Parameters:
threshold (float) – Value to look for in column col
- Keyword Arguments:
col (index) – Column index to look for data in
rising (bool) – look for case where the data is increasing in value (default True)
falling (bool) – look for case where data is fallinh in value (default False)
xcol (index, bool or None) – rather than returning a fractional row index, return the interpolated value in column xcol. If xcol is False, then return a complete row all_vals (bool): return all crossing points of the threshold or just the first. (default False)
transpose (bbool) – Swap the x and y columns around - this is most useful when the column assignments have been done via the setas attribute
all_vals (bool) – Return all values that match the criteria, or just the first in the file.
- Returns:
(float) – Either a sing;le fractional row index, or an in terpolated x value
Note
If you don’t specify a col value or set it to None, then the assigned columns via the
DataFile.setas
attribute will be used.Warning
There has been an API change. Versions prior to 0.1.9 placed the column before the threshold in the positional argument list. In order to support the use of assigned columns, this has been swapped to the present order.