read_forbidden_bands

read_forbidden_bands#

pypulseqpp.safety.read_forbidden_bands()[source]#

Read forbidden bands from a Siemens .asc hardware description.

The file is read with upstream PyPulseq’s readasc. Its acoustic resonances are a centre and a bandwidth, with no axis and no tolerance, so every band guards every axis with tolerance 0. Bands from any other table are passed to check_mech_resonance() as ForbiddenBand values.

Parameters:

path (str or os.PathLike) – Siemens .asc hardware description.

Returns:

The bands, for check_mech_resonance() to take as its bands.

Return type:

list of ForbiddenBand

Raises:

ValueError – If the file is not a .asc file.