Skip to content

NumSeaHy/Ecosons.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EU Flag

Ecosons.jl

Dev

A refactorized Julia version of the Ecosons software written originally in Octave.

Purpose

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.

Example: Load, Process, and Export Echogram Data

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)
end

The JSON file can be traced here, and the JSON is documented here.

Example of an echogram plot:

Echogram

Documentation

See CHANGELOG.md and the docs folder.

Build

To use the package locally:

  1. Open a Julia REPL.
  2. Change to the project directory (where Project.toml is located). For example:
cd("Ecosons")  # or the appropriate path to the repo
  1. Activate the environment:
using Pkg
Pkg.activate(".")
  1. Load the package:
using Ecosons

CRediT authorship contribution statement

Carlos 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.

License

This work is licensed under CC BY 4.0

EU Flag

About

Single-beam echosounder data processing in Julia

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages