Closed ElOceanografo closed 3 months ago
The absorption coefficient is a scale factor for the acoustic pressure to account for absorption. To get absorption in dB/m, simply compute it at 1 m range and convert to dB. Example:
plot(fkHz -> -20*log10(absorption(1000fkHz, 1)), 1, 100;
xscale=:log10, yscale=:log10, xlims=(1, 100), ylims=(0.0001, 0.1),
legend=false, xlabel="Frequency (kHz)", ylabel="Absorption (dB/m)")
Thanks, that clarifies it. Could that info be added to the docstring?
Thanks for the PR. Approved and will merge shortly.
It's unclear from the documentation what units the result of the
absorption
function has. Is it just a loss ratio?I would find it useful to have a function that calculates the absorption coefficient in units of dB/m. Maybe this could be factored out of the current
absorption
function, or, at the very least, to have a description in the docstring for how to back this quantity out of the returned value...