Sequence.get_or_create_trid_id

Sequence.get_or_create_trid_id#

Sequence.get_or_create_trid_id()[source]#

Return the TRID number assigned to label_name, assigning one if new.

Parameters:

label_name (str) – What this repetition is called.

Returns:

Its number, counting from 1 in the order names were first seen.

Return type:

int

Raises:

ValueError – If label_name is empty.

Examples

>>> import pypulseqpp as pp
>>> seq = pp.Sequence()
>>> [seq.get_or_create_trid_id(name) for name in ("prep", "imaging", "prep")]
[1, 2, 1]