step_from_rate

function of dascore.io.utils source

step_from_rate(
    rate ,
)-> ‘Fraction | np.timedelta64’

The time step a file states as a sampling rate in Hz.

A rate that is a simple number (1024.0, 3000.0, 62.5, 999.9) gives an exact Fraction step in seconds, which get_coord keeps on its grid; any other rate gives the nearest nanosecond timedelta, as before. A float32 rate recovers only the values it holds exactly, which is the honest reading of it.