tedana.utils.parse_volume_indices

parse_volume_indices(indices_str)[source]

Parse volume indices string into a list of integers.

As in Python lists, ranges are start-inclusive and end-exclusive (for example, ‘0:5’ includes the first [0] through fifth [4] timepoints).

Supports: - None: None - Individual indices: ‘0,5,10’ - Ranges: ‘0:5’ - Mixed: ‘0,5:10,15,20:25’

Does not support: - Negative indices: ‘-1,-2,-3’ - Open-ended ranges: ‘0:’ or ‘:5’ - Ranges with step size: ‘0:5:2’ or ‘::2’

Parameters:

indices_str (str) – Comma-separated string of indices and ranges

Returns:

list of int – Sorted list of unique volume indices