read_acoustic_response#
- pypulseqpp.safety.read_acoustic_response()[source]#
Read a gradient coil’s acoustic transfer function from an HDF5 file.
The file holds the response of each physical axis to a gradient in G/cm, and an A-weighting filter, each as the
Nbins of the discrete Fourier transform of a waveform sampled everysampling_interval: two rows, real and imaginary part. The bins below the Nyquist frequency are kept.- Parameters:
path (str | os.PathLike) – The HDF5 file to read.
sampling_interval (float) – Sampling interval (s) the bins refer to; bin
klies atk / (N * sampling_interval)Hz.
- Returns:
The response in Pa per mT/m, for
check_spl()to take as itsresponse.- Return type:
- Raises:
ValueError – If
sampling_intervalis not positive, or the file lacks an axis or holds one of another shape than the others.OSError – If the file cannot be read.
- Warns:
UserWarning – If the file’s A-weighting departs from the IEC 61672 curve on the frequency axis
sampling_intervalsets, which is then likely not the interval the file was tabulated at.