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: