Skip to main content

A package for l2 wind direction

Project description

l2 wind direction: README

This repository provides tools for predicting wind direction and estimating uncertainty from SAR images acquired by Sentinel-1 (S1), RADARSAT Constellation Mission (RCM), and RADARSAT-2 (RS2) satellites. It utilizes a trained machine learning model built with PyTorch Lightning and Hydra-Zen

Features

  • Prediction Pipeline: Load trained models and make predictions on new data.

  • Hydra-Zen Integration: Flexible configuration management.

  • Output Options: Generate predictions as a pandas DataFrame or an xarray Dataset.

  • Uncertainty Estimation: Predict both wind direction and associated uncertainty.

  • Georeferencing Support: Adjust predictions for geographical reference using dataset metadata.

Installation

Clone the repository:

git clone https://github.com/jean2262/l2winddir.git
cd l2winddir

Usage

Command-Line Interface

Run predictions using the predict.py script:

python predict.py --model_path <path_to_model> --data_path <path_to_data> --eval <True/False>
  • Arguments:

    • --model_path: Path to the trained model's directory.

    • --data_path: Path to the data file (NetCDF or xarray-compatible format).

    • --eval: If True, outputs a pandas DataFrame; otherwise, modifies and returns the input xarray Dataset.

Example

Command-Line

python predict.py --model_path "/path/to/model" --data_path "/path/to/dataset.nc" --eval True

Programmatic Usage

You can use the make_prediction function directly in Python scripts:

from predict import make_prediction

model_path = "/path/to/model"
data_path = "/path/to/dataset.nc"
result = make_prediction(model_path=model_path, data_path=data_path, eval=True)

print(result)

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

l2winddir-0.0.2.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

l2winddir-0.0.2-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file l2winddir-0.0.2.tar.gz.

File metadata

  • Download URL: l2winddir-0.0.2.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for l2winddir-0.0.2.tar.gz
Algorithm Hash digest
SHA256 40d7063bd0a3410452c3ffe8a7d0354f7bfb6a4630cdc07fd0307406594b5315
MD5 6e31791476ca3687a90c0ad18392a637
BLAKE2b-256 1a73b45901e05b8f3880e864eccf6f4e33a5fcf1d06551ce46fafc397608e3f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for l2winddir-0.0.2.tar.gz:

Publisher: release.yaml on jean2262/l2winddir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file l2winddir-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: l2winddir-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for l2winddir-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 975ba7e995cbd13f5246372b32797af7cf37760149292b98ab85f10cfb693dc6
MD5 12786ddbf8201c504e9f70d5d56607d1
BLAKE2b-256 25a04df40b96fb7cfcb657766bb74b55b0ac78d9f9bde6c49bd8058c3bf3acb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for l2winddir-0.0.2-py3-none-any.whl:

Publisher: release.yaml on jean2262/l2winddir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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