read_safe_model

read_safe_model#

pypulseqpp.safety.read_safe_model()[source]#

Read a SAFE nerve model from a Siemens .asc hardware description.

Reading is upstream PyPulseq’s readasc and asc_to_hw; the result is shaped like pypulseq.utils.safe_pns_prediction.safe_example_hw(): x, y and z, each with a1-a3, tau1-tau3 (ms), stim_limit (T/m/s) and g_scale.

Parameters:

path (str | os.PathLike) – The .asc file to read.

Returns:

The model, shaped as described above, for check_pns() to take as its model.

Return type:

types.SimpleNamespace