Sequence.apply_soft_delay

Sequence.apply_soft_delay#

Sequence.apply_soft_delay()[source]#

Set the duration of every block carrying a named soft delay.

The duration of a block with a soft delay is value / factor + offset, rounded onto the block duration raster.

Parameters:

**kwargs – Value (s) of each soft delay, by its hint. Soft delays not named are unchanged.

Raises:

ValueError – If a name is not a hint in the sequence, if a hint and a numeric id are inconsistent between blocks, or if a value gives a negative block duration.

Warns:

UserWarning – When rounding onto the raster moves a duration by more than half a microsecond; once per soft delay.

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
>>> seq.apply_soft_delay(TE=5e-3)
>>> seq.block_durations[1]
0.005