interoperating

Contents

interoperating#

pypulseqpp.interoperating()[source]#

Wrap a callable with recursive event conversion.

Upstream PyPulseq functions take and return events as plain namespaces. The wrapped callable accepts and returns compiled events: arguments become namespaces for PyPulseq type checks and deepcopy, and returned events become compiled objects. Other values pass through. convert() and as_namespace() convert one event in each direction.

Parameters:

function (callable) – What to wrap. A PyPulseq function is given a note saying its arguments are converted.

Returns:

function with the conversion around it.

Return type:

callable