diff --git a/.zenodo.json b/.zenodo.json index c502bbd..61b6f1a 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -3,14 +3,14 @@ "description": "SpiPy is a Python implementation of SPIRES (SPectral Inversion of REflectance from Snow), a spectral unmixing algorithm for analyzing snow reflectance data from satellite imagery. It retrieves snow properties (grain size, dust concentration, fractional snow-covered area) using lookup tables generated from Mie-scattering theory. This implementation features a hybrid Python/C++ architecture achieving 3000x speedup over pure Python implementations.", "creators": [ { - "name": "Bair, Ned", + "name": "Bair, Edward H.", "affiliation": "University of California, Santa Barbara", - "orcid": "0000-0002-7654-3210" + "orcid": "https://orcid.org/0000-0002-6554-387X" }, { "name": "Griessbaum, Niklas", "affiliation": "Leidos, Inc.", - "orcid": "0000-0000-0000-0000" + "orcid": "https://orcid.org/0000-0001-5037-6266" } ], "license": "MIT", @@ -32,9 +32,5 @@ "scheme": "doi" } ], - "grants": [ - { - "id": "W913E523C0002" - } - ] + "notes": "This work was supported by contract W913E523C0002." } diff --git a/CITATION.cff b/CITATION.cff index 46dd0a5..59d2d74 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -3,19 +3,20 @@ message: "If you use this software, please cite both the software and the algori title: "SpiPy: Python implementation of SPIRES snow property inversion" authors: - family-names: Bair - given-names: Ned + given-names: Edward H. email: edwardbair@ucsb.edu affiliation: "University of California, Santa Barbara" - orcid: "https://orcid.org/0000-0002-7654-3210" # Update with actual ORCID if available + orcid: "https://orcid.org/0000-0002-6554-387X" - family-names: Griessbaum given-names: Niklas affiliation: "Leidos, Inc." - orcid: "https://orcid.org/0000-0000-0000-0000" # Update with actual ORCID if available -version: 0.2.0 -date-released: 2024-11-06 -repository-code: "https://github.com/edwardbair/SpiPy" -url: "https://github.com/edwardbair/SpiPy" -license: MIT # Update if different + orcid: "https://orcid.org/0000-0001-5037-6266" +version: 0.2.8 +date-released: 2026-02-23 +repository-code: "https://github.com/NiklasPhabian/SpiPy" +url: "https://spipy.readthedocs.io" +license: MIT +doi: 10.5281/zenodo.18747284 keywords: - remote sensing - snow properties diff --git a/README.md b/README.md index 963d011..ae19a9c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # SpiPy [![PyPI version](https://badge.fury.io/py/spires.svg)](https://pypi.org/project/spires/) +[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18747284.svg)](https://doi.org/10.5281/zenodo.18747284) [![Documentation Status](https://readthedocs.org/projects/spipy/badge/?version=latest)](https://spipy.readthedocs.io/en/latest/?badge=latest) [![Build and Test](https://github.com/NiklasPhabian/SpiPy/workflows/Build%20and%20Test/badge.svg)](https://github.com/NiklasPhabian/SpiPy/actions) [![Python 3.9-3.14](https://img.shields.io/badge/python-3.9--3.14-blue.svg)](https://github.com/NiklasPhabian/SpiPy) @@ -8,7 +9,7 @@ **[📦 View Source on GitHub](https://github.com/NiklasPhabian/SpiPy)** | **[📖 Documentation](https://spipy.readthedocs.io)** | **[🐛 Report Issues](https://github.com/NiklasPhabian/SpiPy/issues)** -SpiPy is a Python implementation of [SPIRES](https://ieeexplore.ieee.org/document/9290428) (SPectral Inversion of REflectance from Snow), originally implemented in MATLAB ([SPIRES GitHub repository](https://github.com/edwardbair/SPIRES)). +SpiPy is a Python implementation of [SPIRES](https://ieeexplore.ieee.org/document/9290428) (Snow Property Inversion From Remote Sensing), originally implemented in MATLAB ([SPIRES GitHub repository](https://github.com/edwardbair/SPIRES)). ## Overview @@ -239,12 +240,13 @@ If you use this software, please cite the algorithm paper, software implementati **Software:** ```bibtex -@software{bair2024spipy, +@software{bair2026spipy, title={SpiPy: Python implementation of SPIRES snow property inversion}, - author={Bair, Ned and Griessbaum, Niklas}, - year={2024}, - url={https://github.com/edwardbair/SpiPy}, - version={0.2.0}, + author={Bair, Edward H. and Griessbaum, Niklas}, + year={2026}, + url={https://github.com/NiklasPhabian/SpiPy}, + version={0.2.8}, + doi={10.5281/zenodo.18747284}, note={See CITATION.cff for full metadata} } ``` diff --git a/tests/.gitattributes b/tests/.gitattributes new file mode 100644 index 0000000..4d5d840 --- /dev/null +++ b/tests/.gitattributes @@ -0,0 +1 @@ +*.mat filter=lfs diff=lfs merge=lfs -text diff --git a/tests/data/README.md b/tests/data/README.md index 26a2f2a..3d59383 100644 --- a/tests/data/README.md +++ b/tests/data/README.md @@ -4,13 +4,27 @@ This directory contains test data for the SpiPy package. ## Files in Repository (via Git LFS) -Small test data files suitable for CI/CD: +### Lookup Tables - **lut_sentinel2b_b2to12_3um_dust.mat** (70 MB) - Lookup table for Sentinel-2B bands 2-12 with dust parameters - Essential for all Sentinel-2 tests - Also available on Zenodo (see below) +- **lut_HLSS30_b1to13_3um_dust.mat** (101 MB) + - Lookup table for HLS (Harmonized Landsat Sentinel-2) bands 1-13 with dust parameters + - For HLS30 product testing + +- **lut_modis_b1to7_3um_dust.mat** (537 MB) + - Lookup table for MODIS bands 1-7 with dust parameters + - For MODIS testing + +- **lut_oli_b1to7_3um_dust.mat** (55 MB) + - Lookup table for Landsat OLI bands 1-7 with dust parameters + - For Landsat 8/9 testing + +### Test Imagery Subsets + - **sentinel_r_subset.nc** (2.85 MB) - Small spatial subset (50×50 pixels) of full reflectance data - For quick integration tests @@ -26,14 +40,24 @@ Full-resolution test data available on Zenodo: ### Lookup Tables [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18701286.svg)](https://doi.org/10.5281/zenodo.18701286) -- **LUT_MODIS.mat** (537 MB) - - MODIS lookup table generated from Mie-scattering theory - - Download: https://zenodo.org/records/18701286/files/LUT_MODIS.mat +**Note:** All lookup tables are included in the repository via Git LFS. Download from Zenodo if you have LFS quota issues or prefer direct downloads. - **lut_sentinel2b_b2to12_3um_dust.mat** (70 MB) - Sentinel-2B lookup table (also in repository via LFS) - Download: https://zenodo.org/records/18701286/files/lut_sentinel2b_b2to12_3um_dust.mat +- **lut_HLSS30_b1to13_3um_dust.mat** (101 MB) + - HLS (Harmonized Landsat Sentinel-2) lookup table (also in repository via LFS) + - Download: https://zenodo.org/records/18701286/files/lut_HLSS30_b1to13_3um_dust.mat + +- **lut_modis_b1to7_3um_dust.mat** (537 MB) + - MODIS lookup table (also in repository via LFS) + - Download: https://zenodo.org/records/18701286/files/lut_modis_b1to7_3um_dust.mat + +- **lut_oli_b1to7_3um_dust.mat** (55 MB) + - Landsat OLI lookup table (also in repository via LFS) + - Download: https://zenodo.org/records/18701286/files/lut_oli_b1to7_3um_dust.mat + ### Test Imagery [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18704072.svg)](https://doi.org/10.5281/zenodo.18704072) @@ -50,26 +74,41 @@ Full-resolution test data available on Zenodo: ### For Development -The subset files are sufficient for most development and testing: +All lookup tables and test subsets are included in the repository via Git LFS: ```python import xarray as xr import spires -# Use subset files (in repository) +# Sentinel-2 example r = xr.open_dataset('tests/data/sentinel_r_subset.nc') r0 = xr.open_dataset('tests/data/sentinel_r0_subset.nc') -lut = spires.LutInterpolator('tests/data/lut_sentinel2b_b2to12_3um_dust.mat') +lut_s2 = spires.LutInterpolator('tests/data/lut_sentinel2b_b2to12_3um_dust.mat') + +# MODIS example +lut_modis = spires.LutInterpolator('tests/data/lut_modis_b1to7_3um_dust.mat') + +# Landsat OLI example +lut_oli = spires.LutInterpolator('tests/data/lut_oli_b1to7_3um_dust.mat') + +# HLS example +lut_hls = spires.LutInterpolator('tests/data/lut_HLSS30_b1to13_3um_dust.mat') ``` ### For Full Tests -To run tests with full-resolution data, download from Zenodo: +To run tests with full-resolution imagery or download LUTs without LFS, get from Zenodo: ```bash cd tests/data -# Download lookup tables +# Download all LUTs from Zenodo (alternative to LFS) +curl -L -o lut_sentinel2b_b2to12_3um_dust.mat https://zenodo.org/records/18701286/files/lut_sentinel2b_b2to12_3um_dust.mat +curl -L -o lut_HLSS30_b1to13_3um_dust.mat https://zenodo.org/records/18701286/files/lut_HLSS30_b1to13_3um_dust.mat +curl -L -o lut_modis_b1to7_3um_dust.mat https://zenodo.org/records/18701286/files/lut_modis_b1to7_3um_dust.mat +curl -L -o lut_oli_b1to7_3um_dust.mat https://zenodo.org/records/18701286/files/lut_oli_b1to7_3um_dust.mat + +# Download legacy MODIS LUT (if needed for compatibility tests) curl -L -o LUT_MODIS.mat https://zenodo.org/records/18701286/files/LUT_MODIS.mat # Download full test imagery (large!) @@ -90,9 +129,16 @@ python scripts/download_test_data.py --imagery ## CI/CD Behavior GitHub Actions: -- Uses subset files by default (fast, no quota issues) -- Skips tests requiring LUT_MODIS.mat (MODIS-specific tests) -- Can be configured to download full files from Zenodo if needed +- All lookup tables (Sentinel-2, MODIS, OLI, HLS) are available via Git LFS +- Uses subset imagery files by default (fast tests) +- Downloads `lut_sentinel2b_b2to12_3um_dust.mat` from Zenodo to avoid LFS quota +- Skips tests requiring legacy LUT_MODIS.mat format +- Full-resolution imagery can be downloaded from Zenodo if needed + +GitLab CI: +- Configured with `GIT_LFS_SKIP_SMUDGE: "1"` to avoid LFS quota issues +- Downloads required LUTs from Zenodo on-demand +- Uses same test approach as GitHub Actions ## Citation diff --git a/tests/data/lut_HLSS30_b1to13_3um_dust.mat b/tests/data/lut_HLSS30_b1to13_3um_dust.mat new file mode 100644 index 0000000..c304c4c --- /dev/null +++ b/tests/data/lut_HLSS30_b1to13_3um_dust.mat @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5f635a2e90bde0a3c365b1b0331d5167705cdd19254893b19902d2aff9e61b7 +size 105168723 diff --git a/tests/data/lut_modis_b1to7_3um_dust.mat b/tests/data/lut_modis_b1to7_3um_dust.mat new file mode 100644 index 0000000..9dfa900 --- /dev/null +++ b/tests/data/lut_modis_b1to7_3um_dust.mat @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a82d6b829f945f3308c6860888865bc1c62502ad9ed1ac3b64dd205f68a4600b +size 562473461 diff --git a/tests/data/lut_oli_b1to7_3um_dust.mat b/tests/data/lut_oli_b1to7_3um_dust.mat new file mode 100644 index 0000000..471a096 --- /dev/null +++ b/tests/data/lut_oli_b1to7_3um_dust.mat @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1e80c2455ed9a5dd67e210bc38fef77019a543c1c6f596816980f017e8971cf +size 56937951