step_from_interval

function of dascore.io.utils source

step_from_interval(
    seconds ,
)-> ‘Fraction | np.timedelta64’

The time step a file states as a sampling interval in seconds.

The counterpart of step_from_rate for a file that stores the step itself: an interval that is a simple number (0.001, 1/1024 written as 0.0009765625, or the double nearest 1/3000) gives an exact Fraction step; any other interval, including one already rounded to whole nanoseconds such as 0.000976562, gives the nearest nanosecond timedelta, as before.