vak.common.files.spect.timebin_dur#
- vak.common.files.spect.timebin_dur(spect_path: str | Path, spect_format: str, timebins_key: str = 't', n_decimals_trunc: int = 5)[source]#
get duration of time bins from a spectrogram file
- Parameters:
spect_path (str, Path) β path to spectrogram file.
spect_format (str) β format of file containing spectrogram. One of {βmatβ, βnpzβ}
timebins_key (str) β key for accessing vector of time bins in files. Default is βtβ.
n_decimals_trunc (int) β number of decimal places to keep when truncating the timebin duration calculated from the vector of time bins. Default is 3, i.e. assumes milliseconds is the last significant digit.
- Returns:
timebin_dur
- Return type: