Sequence.check_timing

Sequence.check_timing#

Sequence.check_timing()[source]#

Check timing, gradient continuity and the stored total duration.

Parameters:

print_errors (bool, default=False) – Print the report as well as returning it.

Returns:

  • is_ok (bool) – True when nothing was found.

  • error_report (list[SimpleNamespace]) – One entry per problem, in block order.

Notes

May record TotalDuration. Does not check all scanner safety constraints.

Examples

>>> import pypulseqpp as pp
>>> seq = pp.Sequence(pp.Opts())
>>> seq.add_block(pp.make_trapezoid("x", area=1000, duration=2e-3))
1
>>> seq.check_timing()
(True, [])
>>> seq.get_definition("TotalDuration")
[0.002]