mach.io.must#
Helper functions for reading PyMUST data.
Functions
Download and load the PyMUST PWI_disk.mat test data. |
|
|
Extract PyMUST parameters from loaded MATLAB data. |
|
Generate element positions for a linear array. |
|
Return a flattened meshgrid of the given axes. |
- mach.io.must.download_pymust_doppler_data() dict #
Download and load the PyMUST PWI_disk.mat test data.
This data contains ultrasound RF data from a rotating disk phantom, commonly used for benchmarking beamforming algorithms.
- Returns:
MATLAB data structure containing RF data and parameters
- Return type:
- mach.io.must.extract_pymust_params(mat_data: dict) dict #
Extract PyMUST parameters from loaded MATLAB data.
- Parameters:
mat_data – PyMUST data loaded from .mat file by download_pymust_doppler_data
- Returns:
- PyMUST acquisition parameters including:
Nelements: Number of array elements
pitch: Element spacing [m]
c: Speed of sound [m/s]
fs: Sampling frequency [Hz]
fc: Center frequency [Hz]
t0: Start time [s]
fnumber: F-number for beamforming
- Return type:
- mach.io.must.linear_probe_positions( ) Float[ndarray, '{n_elements} xyz=3'] #
Generate element positions for a linear array.
- Parameters:
n_elements – Number of elements
pitch – Element spacing [m]
- Returns:
Element positions [x, y, z] with shape (N_elements, 3)
- mach.io.must.scan_grid(
- *axes: ndarray,
Return a flattened meshgrid of the given axes.
- Example
>>> x = np.linspace(-1.25e-2, 1.25e-2, num=251, endpoint=True) >>> y = np.array([0.0]) >>> z = np.linspace(1e-2, 3.5e-2, num=251, endpoint=True) >>> grid = scan_grid(x, y, z) >>> grid.shape (63001, 3) >>> grid