parameters#
- pypulseqpp.sequences.parameters()[source]#
Return each protocol parameter of a sequence function with its type, default, unit and description.
The protocol is every parameter after the first, which is
system. Its type, default and whether it admits None are read from the annotation and the default; its unit, choices and description from the NumPyParameterssection of the docstring.- Parameters:
function (callable) – A sequence function
function(system, **protocol).- Returns:
One entry per protocol parameter, in signature order.
- Return type:
Examples
>>> from pypulseqpp import sequences >>> def gre(system, *, te: float | None = None, n: int = 64): ... '''Gradient echo. ... ... Parameters ... ---------- ... te : float | None, default=None ... Echo time (s). ``None`` is as short as the readout admits. ... n : int, default=64 ... Matrix size. ... ''' >>> protocol = sequences.parameters(gre) >>> list(protocol), protocol["te"].unit, protocol["te"].optional (['te', 'n'], 's', True)