A refactorized Julia version of the Ecosons software written originally in Octave.
The Ecosons Julia package aims to modernize and optimize sonar data processing originally developed in Octave by leveraging Julia's high-performance capabilities. It improves data handling, visualization, and computation time, making it suitable for real-time or large-scale oceanographic applications.
You can find this test example in /test/Echogram.jl:
using Ecosons
using Test
using JSON
@testset begin
# Load config from JSON
json_path = joinpath(@__DIR__, "../config/params.json")
config = JSON.parsefile(json_path)
# Get .raw files
dir = joinpath(@__DIR__, config["data_dir"])
files = filter(f -> endswith(f, ".raw"), readdir(dir))
full_paths = joinpath.(dir, files)
channel = config["channel"]
# Load sonar data
JLD2_path = joinpath(@__DIR__, config["JLD2_dir"]["data"])
data, dim = load_sonar_data(channel, full_paths; jld2_path = JLD2_path)
# Select the transect
transect = config["transect"]
# Bottom detection using parameters
bottom_args = Dict(Symbol(k) => v for (k, v) in config["bottom_detection"])
data = compute_bottom(data; bottom_args...)
# Save the data to JLD2
saveJLD2("$(JLD2_path)_$(channel)", data)
# Visualize the result
data_selected = data[transect]
plot_echobottom(data_selected)
# Plot the ping's intensity
ping = 1
plot_ping(1:length(data_selected.P[ping, :]), data_selected.P[ping, :])
# Export to file
export_dir = joinpath(@__DIR__, "..", "data", "echobottom.dat")
export_echobottom(data_selected, transect, export_dir)
endThe JSON file can be traced here, and the JSON is documented here.
Example of an echogram plot:
See CHANGELOG.md and the docs folder.
To use the package locally:
- Open a Julia REPL.
- Change to the project directory (where
Project.tomlis located). For example:
cd("Ecosons") # or the appropriate path to the repo- Activate the environment:
using Pkg
Pkg.activate(".")- Load the package:
using EcosonsCarlos Vázquez Monzón: Refactorization, Review, Optimization software. Pablo Rubial: Refactorization, Review, Optimization software. Noela Sánchez: Software, Methodology, Conceptualization. Daniel Rodríguez: Software, Methodology, Conceptualization. Andrés Prieto: Review, Supervision, Funding acquisition.
This work is licensed under CC BY 4.0


