hsntools.timestamps.utils.compute_sample_length

hsntools.timestamps.utils.compute_sample_length(n_samples, fs, output='minutes')[source]

Compute the length of time corresponding to a given number of samples.

Parameters:
n_samplesint

Number of samples.

fsint

Sampling rate.

output{‘minutes’, ‘seconds’}

The output unit.

Returns:
lengthfloat

Time length for the input number of samples, in unit of output.