tedana.utils.check_te_values
- check_te_values(te_values)[source]
Check and convert TE values to seconds for internal use.
This function checks if TE values are provided in seconds (preferred per BIDS convention) or milliseconds. Echo times are returned in seconds for internal processing.
- Parameters:
te_values (list) – TE values to check. Per BIDS convention, these should be in seconds.
- Returns:
list – TE values in seconds for internal use.
- Raises:
ValueError – If TE values are not positive or appear to be in unexpected units.
Notes
The heuristic used is:
If all TE values are between 0 and 1: values are assumed to be in seconds (correct per BIDS), returned as-is
If all TE values are >= 1: values are assumed to be in milliseconds, a deprecation warning is logged, and values are converted to seconds
Mixed values or negative values raise an error