Skip to main content

Label and track unique geospatial features from gridded datasets

Project description

ocetrac

Build Status codecov Conda Version pypi downloads Documentation Status License:MIT DOI All platform

ocetrac is a Python package for labelling and tracking geospatial features in gridded datasets. It provides two tracking algorithms:

  • DeepTrack — 4-D connected-component labelling and temporal tracking across (time, depth, lat, lon), designed for subsurface features such as volumetric marine heatwaves.
  • SurfTrack — 3-D connected-component labelling and temporal tracking across (time, lat, lon), designed for surface features. SurfTrack supports two temporal connectivity modes:
    • Permissive — any spatial overlap between consecutive timesteps links two features as the same event.
    • Restrictive — a user-defined overlap threshold (e.g. 0.45) must be exceeded to link two features.

Both trackers operate lazily with Dask for memory-efficient, parallelised execution on large datasets.


Installation

Mamba (Recommended)

We recommend mamba for installation. Mamba is a fast drop-in replacement for conda. If you don't have mamba, install Miniforge which ships with mamba by default, or install mamba into an existing conda environment:

conda install -n base -c conda-forge mamba

Then install ocetrac:

mamba install -c conda-forge ocetrac

PyPI

pip install ocetrac

From source

git clone https://github.com/ocetrac/ocetrac.git
cd ocetrac
pip install -e .

Development environment

mamba env create -f environment.yml
mamba activate ocetrac
python -m pytest tests/ -v

Package structure

ocetrac/
├── preprocessing/       — anomaly computation, morphological cleaning, thresholding
├── DeepTrack/           — 4-D tracker (time, depth, lat, lon)
└── SurfTrack/           — 3-D tracker (time, lat, lon)

Contributing

Issues and pull requests are welcome on GitHub. Please file a bug report if you find a problem, or open a pull request if you make an improvement.


Citation

SurfTrack — When using the SurfTrack module, please cite the original software and Spatiotemporal Evolution of Marine Heatwaves Globally.

DeepTrack — The DeepTrack module is currently being prepared for publication. Citation details will be added here upon publication.


Acknowledgements

  • We rely heavily on scikit-image and its community of contributors.
  • This work is currently supported through a collaboration with the UW eScience Institute.
  • This work originally grew from a collaboration with NCAR during the ASP Graduate Visitor Program attended by Hillary Scannell. This project received support from the Leonardo DiCaprio Foundation, Microsoft, and the Gordon and Betty Moore Foundation.

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

ocetrac-0.1.7.tar.gz (31.7 MB view details)

Uploaded Source

Built Distribution

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

ocetrac-0.1.7-py3-none-any.whl (42.3 kB view details)

Uploaded Python 3

File details

Details for the file ocetrac-0.1.7.tar.gz.

File metadata

  • Download URL: ocetrac-0.1.7.tar.gz
  • Upload date:
  • Size: 31.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.12

File hashes

Hashes for ocetrac-0.1.7.tar.gz
Algorithm Hash digest
SHA256 632f646ba166b704f8a7254d84f64203cf0bcb0ce911571f0c27bf9e7afcdaaa
MD5 9e2680811ef977b0f4cf80069c4a1e31
BLAKE2b-256 fdc989539fa54d4d7ca34d0afab2b8a974fa23f64d93be34e2e85e715f054e43

See more details on using hashes here.

File details

Details for the file ocetrac-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: ocetrac-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 42.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.12

File hashes

Hashes for ocetrac-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 5f83f02155a036b34aba3183956b197fafc52187ceaa72f78f272097f5e7e229
MD5 d479c478b61a6217b2c02d7dcf3b0f0f
BLAKE2b-256 73ad419fa186e11cfd28febd419d9431ec688dadedab772a4a93f8cb774ce29e

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