Skip to content

Commit

Permalink
Add description of units to absorption docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
ElOceanografo authored and mchitre committed May 21, 2024
1 parent f00db85 commit c740962
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/uw_basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,19 @@ Compute volume acoustic absorption coefficient in water, given:
- `depth` in meters
- `pH` of water
Implementation based on the Francois-Garrison model.
The result is a unitless linear scale factor for sound pressure over the given `distance`. To get
absorption in terms of dB / m, set `distance = 1.0` and convert the result to decibels. For instance,
at a frequency of 100 kHz:
```julia-repl
julia> A = absorption(100e3, 1.0)
0.9959084838594522
julia> α = -20log10(A)
0.035611359656810865
```
Implementation based on the Francois and Garrison (1982) model.
"""
function absorption(frequency, distance=1000.0, salinity=35.0, temperature=27.0, depth=10.0, pH=8.1)
f = frequency/1000.0
Expand Down

2 comments on commit c740962

@mchitre
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/109329

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.3 -m "<description of version>" c740962d01ed7e769b70fa52eb13dd338d623c47
git push origin v0.3.3

Also, note the warning: Version 0.3.3 skips over 0.3.2
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

Please sign in to comment.