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.
Release files for l2winddir 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| l2winddir-0.0.3.tar.gz | 11.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| l2winddir-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.0 kB
Release files / l2winddir-0.0.3.tar.gz
| Download URL | l2winddir-0.0.3.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f4fe7e09aab1292bd7a700d2e9f8a54d7003fc545de23a9b7cc68d9891b2d47
|
|
BLAKE2b-256 checksum How to use checksums |
72c09968c3d00050794e175644a2cb322137ff79c17875265bc41fc91b12dc03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 17, 2024.
Transparency logRelease files / l2winddir-0.0.3-py3-none-any.whl
| Download URL | l2winddir-0.0.3-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aab6d397ef625927be8d9ea8f0148d1d3281376328073714db69811134bbdf58
|
|
BLAKE2b-256 checksum How to use checksums |
734c70f1609b28b095c1fed59265111f0febacda5612260c6c533a8ce508988f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 17, 2024.
Transparency log