Skip to main content

Speeding up Ground Penetrating Radar (GPR) processing

Project description

PyPI Crates.io CI

Ridal — Speeding up Ground Penetrating Radar (GPR) processing

The aim of ridal is to quickly and accurately process GPR data. In one command, most data can be processed in pre-set profiles or with custom filter settings, and batch modes allow for sequences of datasets to be processed with the same settings. Built in rust with a high focus on testing and performance, ridal may be for you if large data volumes and strange fileformats are common issues.

The name is a take on the loosely defined "Data Abstraction Library" (DAL) projects like GDAL and PDAL, but for radar. A near-term goal of Ridal is to enable easy conversion between formats, such as ridal convert input.rad output.dzt (this is not yet implemented).

Much of the functionality has been inspired from the projects RGPR and ImpDAR; both of which are more mature projects. For example, Ridal currently only works on Malå (.rd3) and pulseEKKO (.dt1) radar formats. For many uses, these will more likely be the tools for you!

Image of a glacier radargram Radargram (100 MHz Malå) of Kroppbreen in Svalbard. Collected 28 Feb. 2023.

Notes

  • Prior to Feb. 2026, this program was called rsgpr.
  • The CLI/Python interface changed completely in version 0.5. See Issue #82 for more info.

Installation

Requirements

  • cargo(only for the CLI; not the python package). Easiest installed using rustup.
  • gdal (optional, for sampling heights from DEMs). For Debian or derivatives, this means gdal-bin.
  • proj (optional, for CRS support other than WGS84 UTM Zones). For Debian or derivatives, this means proj-bin.

Using cargo, the ridal CLI can be installed (after installing the requirements):

cargo install ridal

with nix, the flake can be used without worrying about the requirements above:

inputs = {
  ridal.url = "github:erikmannerfelt/ridal";
};

or in an ephemeral shell:

nix shell github:erikmannerfelt/ridal

Python

There's an early implementation of a Python package:

pip install ridal
>>> import ridal
# Print useful info as a dictionary
>>> ridal.info("path/to/file.rad")
'{...}'
# Process and save to a file
>>> ridal.process("path/to/file.rad", steps=["zero_corr", "auto_gain"], output="processed.nc")
# Process and load into memory
>>> ridal.process("path/to/file.rad", steps=["zero_corr"], return_dataset=True, return_dataset_format="xarray")
<xarray.Dataset> Size: ...
Dimensions:     (y: ..., x: ...)
Coordinates:
...
# Only load into memory with no processing
>>> ridal.read("path/to/file.rad", return_dataset_format="xarray")
<same as above>

See scripts/render_kroppbreen.py for an example of how it can be used.

Simple CLI usage

See the help page of ridal for info on how to interact with the CLI:

ridal -h

To toggle useful information on a file, the info subcommand shows the metadata and a summary of the location data:

ridal info DAT_001_A1.rd3

Processing a file using the default processing profile:

ridal process DAT_001_A1.rd3 --default

All processing steps are shown in the steps.md file. It can also be printed with ridal steps.

A processing step pipeline is defined using ridal process file.rad --steps "zero_corr,dewow,..." or using a file: --steps steps.txt:

subset(1 100) # Comments are supported!
zero_corr
dewow

correct_topography

The output will be a NetCDF file with the same name but an .nc suffix. By default, the output is saved in the same directory as the input. For more control, the output directory and/or filename can be controlled with -o or --output.

To process multiple files in "batch mode", provide a "glob" pattern as the filename. Optionally, for many sequential files, the --merge argument allows merging multiple files into one.

ridal batch-process data/*.rd3 --merge "10 min" --default -o output/

A rudimentary profile renderer is available with the -r argument. This will be saved in the same location as the output file as a JPG if another filename is not given.

Papers using Ridal

... and many others in preparation/review

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ridal-0.5.0.tar.gz (622.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ridal-0.5.0-cp313-cp313-win_amd64.whl (4.7 MB view details)

Uploaded CPython 3.13Windows x86-64

ridal-0.5.0-cp313-cp313-manylinux_2_39_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

ridal-0.5.0-cp312-cp312-win_amd64.whl (4.7 MB view details)

Uploaded CPython 3.12Windows x86-64

ridal-0.5.0-cp312-cp312-manylinux_2_39_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

ridal-0.5.0-cp311-cp311-win_amd64.whl (4.7 MB view details)

Uploaded CPython 3.11Windows x86-64

ridal-0.5.0-cp311-cp311-manylinux_2_39_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

ridal-0.5.0-cp310-cp310-win_amd64.whl (4.7 MB view details)

Uploaded CPython 3.10Windows x86-64

ridal-0.5.0-cp310-cp310-manylinux_2_39_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

File details

Details for the file ridal-0.5.0.tar.gz.

File metadata

  • Download URL: ridal-0.5.0.tar.gz
  • Upload date:
  • Size: 622.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.6

File hashes

Hashes for ridal-0.5.0.tar.gz
Algorithm Hash digest
SHA256 1a2f00959ba39293ce27371f8e03524b57c256bbc1dd37c6c487f2b30815707f
MD5 dec2b18fb8de7afd4d1e4cb12c9dea2d
BLAKE2b-256 834a57c95107d20bcf8fdd9babfde0f489d629ca8f4837fce15db4cbee0659e2

See more details on using hashes here.

File details

Details for the file ridal-0.5.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: ridal-0.5.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 4.7 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.6

File hashes

Hashes for ridal-0.5.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 24d12b5a0e41bb139d511388eb83750fe475b09092bdb490f812a6377c535f43
MD5 18bb3d9f66edebe181779d04ca4a9f00
BLAKE2b-256 610f0b2d5d5b6766c65ef4af62cfe407e97fbba8daf9e87c7b3df7a747781258

See more details on using hashes here.

File details

Details for the file ridal-0.5.0-cp313-cp313-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for ridal-0.5.0-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 c1361b2b580e09b3e09c4632393fec3234da2b962de49a9eb728b6a99f1f0f63
MD5 dc2ea6eae36bf29d21008c9bd42ec1ed
BLAKE2b-256 d56ed7493de5d85880cb410cae0deb32c40dc9692affbe6b4c82c5407faa15d6

See more details on using hashes here.

File details

Details for the file ridal-0.5.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: ridal-0.5.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 4.7 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.6

File hashes

Hashes for ridal-0.5.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c32ecc0745a134890d052b23b2edcdb604ee810c92322e7ee4acb94ae32765a2
MD5 3c9400c4cba0d7ca10455f22063a3636
BLAKE2b-256 74ca369203d9da75d293012f00bb43036a0a5b6d77a3700fb8e77d619ad0be11

See more details on using hashes here.

File details

Details for the file ridal-0.5.0-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for ridal-0.5.0-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 07a878423ce9815f90c56cbcffede9fe890eae1060ccc0a0bceb98c1482dd486
MD5 e54b0f958c260150bf20a08958d4279d
BLAKE2b-256 ba684569c71627f92b8a58f7cb798f24aaedc6ba8f47d8a340a191a728376ab8

See more details on using hashes here.

File details

Details for the file ridal-0.5.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: ridal-0.5.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 4.7 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.6

File hashes

Hashes for ridal-0.5.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e2c58af23132e4191922edabf8c4cb9f3363c996616c6c492c7c105b5ffb8503
MD5 1815a63525989c6b5bd637407ddd38dd
BLAKE2b-256 8128d245b2b93987ef0f9c0523c2c42deac71316e4c797efc10bd355d531837c

See more details on using hashes here.

File details

Details for the file ridal-0.5.0-cp311-cp311-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for ridal-0.5.0-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 f40f9199d298fc6837b23103ccd9b8701f876b0eab33d69cb33806f22c4e9674
MD5 502682a37ea3a7ec5b70a0ae86962810
BLAKE2b-256 b6876721ddb92f4e4532517d26f24323452d1830d04d8ef16a6fb82c08f47f88

See more details on using hashes here.

File details

Details for the file ridal-0.5.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: ridal-0.5.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 4.7 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.6

File hashes

Hashes for ridal-0.5.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9d602c8c33d9f177dc5cd0b6d42dfe4b889836c5313ce0998956367578f09af8
MD5 9fddb0b51b0a24966eecc954ac56dbbc
BLAKE2b-256 a647668b09115d37502848e4c13773b7d67097f45d8133ba570e65620045a2f5

See more details on using hashes here.

File details

Details for the file ridal-0.5.0-cp310-cp310-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for ridal-0.5.0-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 cbd6bd91be7931a44ab8a2d4ace1b2b7b27075fb47934ed69d294a5e70a1bc9c
MD5 264aea5d1f54326c88c274d276f8b100
BLAKE2b-256 95ebb37ab9a208e2b5d4e457af235e509f62f9fa55516d9b9de42335691d75a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page