k-Wave Toolbox |
Attenuation compensation using time-variant filtering
signal = attenComp(signal, dt, c, alpha_0, y) signal = attenComp(signal, dt, c, alpha_0, y, ...) [signal, tfd, cutoff_freq] = attenComp(signal, dt, c, alpha_0, y) [signal, tfd, cutoff_freq] = attenComp(signal, dt, c, alpha_0, y, ...)
attenComp
corrects for frequency dependent acoustic attenuation in photoacoustic signals using time-variant filtering [1]. The time-variant filter is constructed to correct for acoustic attenuation and dispersion following a frequency power law of the form alpha_0*f^y
under the assumption the distribution of attenuation parameters is homogeneous. The filter is applied directly to the recorded time-domain signals using a form of non-stationary convolution. The approach is computationally efficient and can be used with any detector geometry or reconstruction algorithm.
To prevent high-frequency noise from being amplified, the compensation is regularised using a Tukey window with a time-variant cutoff frequency. The cutoff frequency can be specified manually using the optional input 'FilterCutoff'
. This is set as a two-element vector corresponding to the cutoff frequency in Hz for the first and last time points, respectively. For a fixed cutoff, these should be specified as the same value, e.g., [3e6, 3e6]
. Alternatively, if 'FilterCutoff'
is set to 'auto'
(the default), the cutoff frequency is chosen based on the local time-frequency distribution of the recorded signals using the following steps:
'Distribution'
)'NoiseThreshold'
)cumsum
'EnergyThreshold'
)'FrequencyMultiplier'
)'FitType'
)If the input contains a matrix of signals, the cutoff frequency is based on the average time frequency distribution. To calculate the cutoff frequency for each signal individually, this function should be called in a loop. This can be parallelised, for example, using parfor
from the parallel computing toolbox. For further details about this function and attenuation compensation using time variant filtering, see the reference below.
[1] B. E. Treeby (2013) "Acoustic attenuation compensation in photoacoustic tomography using time-variant filtering," J. Biomed. Opt., vol. 18, no. 3, p.036008.
|
matrix of time series to compensate indexed as |
|
time step [s] |
|
sound speed [m/s] |
|
power law absorption prefactor [dB/(MHz^y cm)] |
|
power law absorption exponent [0 < y < 3, y ~= 1] |
Optional 'string', value pairs that may be used to modify the default computational settings.
Input | Valid Settings | Default | Description |
---|---|---|---|
|
(Boolean scalar) |
|
Boolean controlling whether command line updates and compute time are printed to the command line. |
|
|
|
Time-frequency distribution used to automatically compute the filter cutoff frequency if |
|
(numeric scalar) |
|
Threshold value given as a percentage of the total amplitude spectrum used to choose the filter cutoff frequency at each time point. |
|
(numeric two element vector) or |
|
Option to manually define the cutoff frequencies for a linear variation in the filter cutoff instead of using an automatic search. |
|
|
|
Fitting type used to smooth the filter cutoff frequency after an automatic search, where |
|
(numeric scalar) |
|
By default, the compensation is regularised using a Tukey window with a time-variant cutoff frequency. The default Tukey window has a taper ratio of 0.5, so the filter cutoff frequency found by the automatic search is increased by a frequency multiplier so that the filter cutoff frequency corresponds to the edge of the passband of the Tukey window. |
|
(numeric scalar) |
|
Number of spline segments used in the smoothing spline if |
|
(numeric scalar) |
|
Threshold value given as a percentage of the signal maximum used to threshold the TFD before the automatic search for the filter cutoff. |
|
(Boolean scalar) |
|
Boolean controlling whether a plot of the time frequency distribution and filter cutoff frequency are displayed. |
|
(numeric two element vector) or |
|
Option to manually set the plot range in the frequency axis when |
|
(numeric scalar) |
|
Taper ratio used to construct the Tukey Windows. |
|
(numeric scalar) |
|
Time index of T0 in the input signals. For photoacoustic imaging, T0 corresponds to the arrival of the excitation laser pulse at the sample. |
|
time series after attenuation compensation |
|
average time frequency distribution of the input signals |
|
filter cutoff frequency for each time index |
applyFilter | attenuationWater |
© 2009-2014 Bradley Treeby and Ben Cox.