Sequence.get_default_soft_delay_values

Sequence.get_default_soft_delay_values#

Sequence.get_default_soft_delay_values()[source]#

Return each soft delay’s default value.

A soft delay says how a block’s duration follows from a value the console supplies: duration = value / factor + offset. Read the other way, the duration a block was built with says what value that is – and every block sharing a numeric id has to agree about it.

Returns:

  • defaults (dict[str, float]) – The default value for each soft delay, by its hint.

  • error_report (list[str]) – One line per disagreement found; empty when they all agree.

  • limits (list[dict | None]) – Per numeric id, the default, the hint, the block it came from, and the range of values that keep the block duration positive.

Raises:

ValueError – If two numeric ids carry the same hint.

Warns:

UserWarning – If the numeric ids are not contiguous.

Examples

>>> import pypulseqpp as pp
>>> seq = pp.Sequence(pp.Opts())
>>> seq.add_block(pp.make_delay(1e-3), pp.make_soft_delay("TE", numID=0))
1
>>> defaults, error_report, limits = seq.get_default_soft_delay_values()
>>> defaults, error_report
({'TE': 0.001}, [])