HydrophoneCalibrations
Installation
HydrophoneCalibrations can be installed using the Julia package manager. From the Julia REPL, type ] to enter the Pkg REPL mode and run
pkg> add HydrophoneCalibrations
Using this library
This library
using HydrophoneCalibrations
# Separate Hydrophone and Preamplifier
volt_to_pressure(1e6, :Onda_HGL0200_2322, :Onda_AH2020_1238_20dB)
# Hydrophone and Preamplifier are single unit
volt_to_pressure(1e6, :PA_3197)
Loading your configuration data
By default this package looks in "./calibration/config.jl" for your hydrophone and preamplifier calibration data.
To add your calibration data create functions in the following style:
@calibration :MyHydrophone [
{ Your data goes here }
]
@calibration :MyPreamplifier [
{ Your data goes here }
]
Now :MyHydrophone and :MyPreamplifier are available in the code and you should be able to use them:
using HydrophoneCalibrations
# Separate Hydrophone and Preamplifier
volt_to_pressure_and_phase(1e6, :MyHydrophone, :MyPreamplifier)
To make sure your device is loaded you can run:
methods(calibration)
or
julia>using HydrophoneCalibrations
help>calibration
MyHydrophone
────────────────────────────────────────────────────────────────────────────────
MyPreamplifier
See the calibration folder in this repo for an example of how to structure your calibration data when you have multiple devices.
Fast convert data
If your calibration is done by Onda. There is a quick way to convert your calibration data into the format required by this package.
parse_onda("onda-device-calibration.txt")
This will auto generate the data for you in a new file: Onda_Device_Serial.jl
and from there you can change the symbol name to whatever you want and include this file in your calibration/config.jl file
As of now only Onda calibrations have been done but feel free to make a PR and add support for any manufacture's standard calibration format