impulse_response()
Description: Calculates the impulse response of a transducer array.
Usage
ir = impulse_response(xdcr_array, coord_grid, medium, time_samples);
ir = impulse_response(xdcr_array, coord_grid, medium, time_samples, disp_flag);
ir = impulse_response(xdcr_array, coord_grid, medium, time_samples, disp_flag,nthreads);
Arguments
- xdcr_array A FOCUS transducer array.
- coord_grid A coordinate grid struct like the ones created by set_coordinate_grid.
- medium A medium struct like the ones created by set_medium.
- time_samples A time sample struct created by set_time_samples.
- disp_flag Display flag, 1 = display, 0 = suppress.
- nthreads The number of threads to use in the calculation.
Output Parameters
- ir A 4-d array representing the impulse response at each point in space and time.
Notes
This function only calculates pressures in lossless media, so any attenuation parameter set by the user will be ignored.
Threading in FOCUS is implemented at the transducer level, meaning that single transducers will not benefit from this feature.
Specifying a number of threads larger than the number of CPU cores available will not result in a significant additional speed increase and may in fact result in slower speeds due to additional inter-thread communication overhead.

