read_forbidden_bands

read_forbidden_bands#

pypulseqpp.safety.read_forbidden_bands()[source]#

Read forbidden bands from a vendor table.

A .asc file is a Siemens hardware description, 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.

Any other file is a GE epiesp.dat table: for x, y and z in turn, a count line and that many esp_min_us esp_max_us amplitude_G_per_cm rows; # starts a comment line. An echo-spacing range maps to the frequencies 1 / (2 ESP) of an alternating readout train, and the amplitude, the train’s plateau, is returned in mT/m times _ESP_TOLERANCE_SCALE.

Parameters:

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

Returns:

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

Return type:

list of ForbiddenBand

Raises:

ValueError – If an ESP table is malformed. A present but corrupt table is refused rather than read as having no bands.