parameters#
- pypulseqpp.sequences.parameters()[source]#
Return the protocol parameters of a sequence function.
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)