get_tr

bidsaid.metadata.get_tr(nifti_file_or_img, verbose=False)[source]

Get the repetition time from the header of a NIfTI image.

Parameters

nifti_file_or_imgstr, Path, or Nifti1Image

Path to the NIfTI file or a NIfTI image.

verbosebool, default=False

Logs “INFO” level information if True.

Returns

float

The repetition time.