From 76b151e8453518636ccf55ebdac5cfd9fff3c711 Mon Sep 17 00:00:00 2001 From: Julio Cesar Contreras Huerta <126512018+JulioContrerasH@users.noreply.github.com> Date: Thu, 22 Aug 2024 10:38:49 -0500 Subject: [PATCH] up --- .github/workflows/mkdocs.yml | 30 +++++ CHANGELOG.md | 34 ++++++ CODE_OF_CONDUCT.md | 54 +++++++++ CONTRIBUTING.md | 192 ++++++++++---------------------- README.md | 185 ++++++++++++++++++++++++------ docs/index.md | 8 -- docs/modules.md | 1 - mkdocs.yml | 126 ++++++++++++++------- png/aligned_image_1.tif | Bin 0 -> 524852 bytes png/aligned_image_1.tif.aux.xml | 29 +++++ png/image_1.tif | Bin 0 -> 524852 bytes png/image_1.tif.aux.xml | 29 +++++ requirements.txt | 9 ++ satalign/utils.py | 5 + 14 files changed, 485 insertions(+), 217 deletions(-) create mode 100644 .github/workflows/mkdocs.yml create mode 100644 CHANGELOG.md create mode 100644 CODE_OF_CONDUCT.md delete mode 100644 docs/index.md delete mode 100644 docs/modules.md create mode 100644 png/aligned_image_1.tif create mode 100644 png/aligned_image_1.tif.aux.xml create mode 100644 png/image_1.tif create mode 100644 png/image_1.tif.aux.xml create mode 100644 requirements.txt diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml new file mode 100644 index 0000000..de72fa0 --- /dev/null +++ b/.github/workflows/mkdocs.yml @@ -0,0 +1,30 @@ +name: deploy +on: + push: + branches: [ "main" ] + + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v3 + with: + python-version: "3.11" + architecture: "x64" + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + python3 -m pip install wheel + python3 -m pip install -r requirements.txt + - name: Build site + run: mkdocs build + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./site \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..33adc2c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,34 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added โœจ +- Documentation updates and additional examples for alignment methods. ๐Ÿ“š + +### Changed ๐Ÿ› ๏ธ +- Enhanced performance optimizations in co-registration methods. ๐Ÿš€ + +### Fixed ๐Ÿ› +- Minor bug fixes in spatial alignment functions. ๐Ÿ”ง + +## [0.1.3] - 2024-05-25 +### Added โœจ +- New methods for spatial alignment of satellite imagery. ๐Ÿ›ฐ๏ธ +- Expanded documentation with examples and usage guides. ๐Ÿ“„ + +## [0.1.1] - 2024-05-12 +### Added โœจ +- Initial release of Satalign with basic functionalities for image co-registration. ๐Ÿ› ๏ธ +- Examples demonstrating the use of PCC, ECC, and LGM alignment methods. ๐Ÿ“Š + +## [0.1.0] - 2024-05-08 +### Added โœจ +- Basic structure for Satalign. ๐Ÿ—๏ธ +- Set up CI/CD pipeline with GitHub Actions. โš™๏ธ +- Added basic tests and coverage reports. โœ… + +--- \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..4b02435 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,54 @@ +# **Contributor covenant code of conduct** ๐Ÿ“œ + +## **Our pledge** ๐Ÿค + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. ๐ŸŒŽ๐Ÿค— + +## **Our standards** ๐Ÿ“ + +Examples of behavior that contributes to creating a positive environment +include: + +- Using welcoming and inclusive language. ๐Ÿ˜Š +- Being respectful of differing viewpoints and experiences. ๐Ÿค”๐Ÿ‘‚ +- Gracefully accepting constructive criticism. ๐Ÿ› ๏ธ +- Focusing on what is best for the community. ๐Ÿคฒ +- Showing empathy towards other community members. ๐Ÿฅบโค๏ธ + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery and unwelcome sexual attention or advances. ๐Ÿšซ๐Ÿ’ฌ +- Trolling, insulting/derogatory comments, and personal or political attacks. ๐Ÿšซ๐Ÿ˜  +- Public or private harassment. ๐Ÿšซ๐Ÿ‘ฅ +- Publishing others' private information, such as a physical or electronic + address, without explicit permission. ๐Ÿšซ๐Ÿก +- Other conduct which could reasonably be considered inappropriate in a + professional setting. ๐Ÿšซ๐Ÿ‘” + +## **Our responsibilities** ๐Ÿ›ก๏ธ + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## **Scope** ๐ŸŒ + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## **Enforcement** ๐Ÿšจ + + +All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## **Attribution** ๐Ÿ‘ + +This Code of Conduct is adapted from the [Contributor covenant][homepage], version 1.4, available at + +[homepage]: + +For answers to common questions about this code of conduct, see + \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8e361bb..4c8fed2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,133 +1,59 @@ -# Contributing to `satalign` - -Contributions are welcome, and they are greatly appreciated! -Every little bit helps, and credit will always be given. - -You can contribute in many ways: - -# Types of Contributions - -## Report Bugs - -Report bugs at https://github.com/csaybar/satalign/issues - -If you are reporting a bug, please include: - -- Your operating system name and version. -- Any details about your local setup that might be helpful in troubleshooting. -- Detailed steps to reproduce the bug. - -## Fix Bugs - -Look through the GitHub issues for bugs. -Anything tagged with "bug" and "help wanted" is open to whoever wants to implement a fix for it. - -## Implement Features - -Look through the GitHub issues for features. -Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it. - -## Write Documentation - -Cookiecutter PyPackage could always use more documentation, whether as part of the official docs, in docstrings, or even on the web in blog posts, articles, and such. - -## Submit Feedback - -The best way to send feedback is to file an issue at https://github.com/csaybar/satalign/issues. - -If you are proposing a new feature: - -- Explain in detail how it would work. -- Keep the scope as narrow as possible, to make it easier to implement. -- Remember that this is a volunteer-driven project, and that contributions - are welcome :) - -# Get Started! - -Ready to contribute? Here's how to set up `satalign` for local development. -Please note this documentation assumes you already have `poetry` and `Git` installed and ready to go. - -1. Fork the `satalign` repo on GitHub. - -2. Clone your fork locally: - -```bash -cd -git clone git@github.com:YOUR_NAME/satalign.git -``` - -3. Now we need to install the environment. Navigate into the directory - -```bash -cd satalign -``` - -If you are using `pyenv`, select a version to use locally. (See installed versions with `pyenv versions`) - -```bash -pyenv local -``` - -Then, install and activate the environment with: - -```bash -poetry install -poetry shell -``` - -4. Install pre-commit to run linters/formatters at commit time: - -```bash -poetry run pre-commit install -``` - -5. Create a branch for local development: - -```bash -git checkout -b name-of-your-bugfix-or-feature -``` - -Now you can make your changes locally. - -6. Don't forget to add test cases for your added functionality to the `tests` directory. - -7. When you're done making changes, check that your changes pass the formatting tests. - -```bash -make check -``` - -Now, validate that all unit tests are passing: - -```bash -make test -``` - -9. Before raising a pull request you should also run tox. - This will run the tests across different versions of Python: - -```bash -tox -``` - -This requires you to have multiple versions of python installed. -This step is also triggered in the CI/CD pipeline, so you could also choose to skip this step locally. - -10. Commit your changes and push your branch to GitHub: - -```bash -git add . -git commit -m "Your detailed description of your changes." -git push origin name-of-your-bugfix-or-feature -``` - -11. Submit a pull request through the GitHub website. - -# Pull Request Guidelines - -Before you submit a pull request, check that it meets these guidelines: - -1. The pull request should include tests. - -2. If the pull request adds functionality, the docs should be updated. - Put your new functionality into a function with a docstring, and add the feature to the list in `README.md`. +# **Contributing** ๐Ÿค + +We welcome contributions from the community! Every contribution, no matter how small, is appreciated and credited. Hereโ€™s how you can get involved: + +## **How to contribute** ๐Ÿ› ๏ธ + +1. **Fork the repository:** Start by forking the [Satalign](https://github.com/IPL-UV/Satalign) repository to your GitHub account. ๐Ÿด +2. **Clone your fork locally:** + ```bash + cd + git clone https://github.com/YOUR_GITHUB_USERNAME/Satalign.git + cd Satalign + ``` +3. **Create a branch:** Create a new branch for your feature or bug fix: + ```bash + git checkout -b name-of-your-bugfix-or-feature + ``` +4. **Set up the environment:** ๐ŸŒฑ + - If you're using `pyenv`, select a Python version: + ```bash + pyenv local + ``` + - Install dependencies and activate the environment: + ```bash + poetry install + poetry shell + ``` + - Install pre-commit hooks: + ```bash + poetry run pre-commit install + ``` +5. **Make your changes:** ๐Ÿ–‹๏ธ Develop your feature or fix, ensuring you write clear, concise commit messages and include any necessary tests. +6. **Check your changes:** โœ… + - Run formatting checks: + ```bash + make check + ``` + - Run unit tests: + ```bash + make test + ``` + - Optionally, run tests across different Python versions using tox: + ```bash + tox + ``` +7. **Submit a pull request:** ๐Ÿš€ Push your branch to GitHub and submit a pull request to the `develop` branch of the Satalign repository. Ensure your pull request meets these guidelines: + - Include tests. + - Update the documentation if your pull request adds functionality. + - Provide a detailed description of your changes. + +## **Types of contributions** ๐Ÿ“ฆ + +- **Report bugs:** ๐Ÿ› + - Report bugs by creating an issue on the [Satalign GitHub repository](https://github.com/IPL-UV/Satalign/issues). Please include your operating system, setup details, and steps to reproduce the bug. +- **Fix bugs:** ๐Ÿ› ๏ธ Look for issues tagged with "bug" and "help wanted" in the repository to start fixing. +- **Implement features:** โœจ Contribute by implementing features tagged with "enhancement" and "help wanted." +- **Write documentation:** ๐Ÿ“š Contribute to the documentation in the official docs, docstrings, or through blog posts and articles. +- **Submit feedback:** ๐Ÿ’ฌ Propose new features or give feedback by filing an issue on GitHub. + - Use the [Satalign GitHub issues page](https://github.com/IPL-UV/Satalign/issues) for feedback. \ No newline at end of file diff --git a/README.md b/README.md index f44a82d..2e6178b 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,171 @@ -# satalign +# -[![Release](https://img.shields.io/github/v/release/csaybar/satalign)](https://img.shields.io/github/v/release/csaybar/satalign) -[![Build status](https://img.shields.io/github/actions/workflow/status/csaybar/satalign/main.yml?branch=main)](https://github.com/csaybar/satalign/actions/workflows/main.yml?query=branch%3Amain) -[![codecov](https://codecov.io/gh/csaybar/satalign/branch/main/graph/badge.svg)](https://codecov.io/gh/csaybar/satalign) -[![Commit activity](https://img.shields.io/github/commit-activity/m/csaybar/satalign)](https://img.shields.io/github/commit-activity/m/csaybar/satalign) -[![License](https://img.shields.io/github/license/csaybar/satalign)](https://img.shields.io/github/license/csaybar/satalign) +

+ +

-A python package to align satellite images. +

+ A Python package for efficient multi-temporal image co-registration ๐Ÿš€ +

-- **Github repository**: -- **Documentation** +

+ + PyPI + + + License + + + Black + + + isort + +

-## Getting started with your project +--- + +**GitHub**: [https://github.com/IPL-UV/satalign](https://github.com/IPL-UV/satalign) ๐ŸŒ + +**PyPI**: [https://pypi.org/project/satalign/](https://pypi.org/project/satalign/) ๐Ÿ› ๏ธ + +--- + +## Overview ๐Ÿ“Š + +**Satalign** is a Python package designed for efficient multi-temporal image co-registration. It enables aligning temporal data cubes with reference images using advanced techniques such as Phase Cross-Correlation (PCC), Enhanced Cross-Correlation (ECC), and Local Features Matching (LGM). This package facilitates the manipulation and processing of large volumes of Earth observation data efficiently. + +## Key features โœจ +- **Advanced alignment algorithms**: Leverages ECC, PCC, and LGM to accurately align multi-temporal images. ๐Ÿ” +- **Efficient data cube management**: Processes large data cubes with memory and processing optimizations. ๐Ÿงฉ +- **Support for local feature models**: Utilizes models like SuperPoint, SIFT, and more for keypoint matching. ๐Ÿ–ฅ๏ธ +- **Parallelization**: Executes alignment processes across multiple cores for faster processing. ๐Ÿš€ + +## Installation โš™๏ธ +Install the latest version from PyPI: -First, create a repository on GitHub with the same name as this project, and then run the following commands: ```bash -git init -b main -git add . -git commit -m "init commit" -git remote add origin git@github.com:csaybar/satalign.git -git push -u origin main +pip install satalign ``` -Finally, install the environment and the pre-commit hooks with +## How to use ๐Ÿ› ๏ธ + + +### Align an ee.ImageCollection with `satalign.PCC` ๐ŸŒ + +```python +import fastcubo +import ee +import satalign + +ee.Initialize(opt_url="https://earthengine-highvolume.googleapis.com") + +# Download an image collection +table = fastcubo.query_getPixels_imagecollection( + point=(-75.71260, -14.18835), + collection="COPERNICUS/S2_HARMONIZED", + bands=["B2", "B3", "B4", "B8"], + data_range=["2018-01-01", "2024-12-31"], + edge_size=256, + resolution=10, +) + +fastcubo.getPixels(table, nworkers=10, output_path="output/aligned_images/s2") + +# Create the data cube +s2_datacube = satalign.utils.create_array("output/aligned_images/s2", "output/datacube_pcc.pickle") + +# Define the reference image +reference_image = s2_datacube.sel(time=s2_datacube.time > "2024-01-03").mean("time") + +# Initialize the PCC model +pcc_model = satalign.PCC( + datacube=s2_datacube, # T x C x H x W + reference=reference_image, # C x H x W + channel="mean", + crop_center=128, + num_threads=2, +) + +# Run the alignment on multiple cores +aligned_cube, warp_matrices = pcc_model.run_multicore() -```bash -make install ``` -You are now ready to start development on your project! -The CI/CD pipeline will be triggered when you open a pull request, merge to main, or when you create a new release. +### Align an Image Collection with `satalign.ECC` ๐Ÿ“š -To finalize the set-up for publishing to PyPi or Artifactory, see [here](https://fpgmaas.github.io/cookiecutter-poetry/features/publishing/#set-up-for-pypi). -For activating the automatic documentation with MkDocs, see [here](https://fpgmaas.github.io/cookiecutter-poetry/features/mkdocs/#enabling-the-documentation-on-github). -To enable the code coverage reports, see [here](https://fpgmaas.github.io/cookiecutter-poetry/features/codecov/). +```python +import fastcubo +import ee +import satalign -## Releasing a new version +ee.Initialize(opt_url="https://earthengine-highvolume.googleapis.com") -- Create an API Token on [Pypi](https://pypi.org/). -- Add the API Token to your projects secrets with the name `PYPI_TOKEN` by visiting [this page](https://github.com/csaybar/satalign/settings/secrets/actions/new). -- Create a [new release](https://github.com/csaybar/satalign/releases/new) on Github. -- Create a new tag in the form `*.*.*`. +# Download an image collection +table = fastcubo.query_getPixels_imagecollection( + point=(51.079225, 10.452173), + collection="COPERNICUS/S2_HARMONIZED", + bands=["B4", "B3", "B2"], + data_range=["2016-06-01", "2017-07-01"], + edge_size=128, + resolution=10, +) -For more details, see [here](https://fpgmaas.github.io/cookiecutter-poetry/features/cicd/#how-to-trigger-a-release). +fastcubo.getPixels(table, nworkers=4, output_path="output/aligned_images/ecc") ---- +# Create the data cube +s2_datacube = satalign.utils.create_array("output/aligned_images/ecc", "output/datacube_ecc.pickle") + +# Define the reference image +reference_image = s2_datacube.isel(time=0) + +# Initialize the ECC model +ecc_model = satalign.ECC( + datacube=s2_datacube, + reference=reference_image, + gauss_kernel_size=3, +) + +# Run the alignment +aligned_cube, warp_matrices = ecc_model.run() +``` +### Align using Local Features with `satalign.LGM` ๐Ÿงฎ + +```python +import fastcubo +import ee +import satalign + +ee.Initialize(opt_url="https://earthengine-highvolume.googleapis.com") + +# Download an image collection +table = fastcubo.query_getPixels_imagecollection( + point=(-76.5, -9.5), + collection="NASA/NASADEM_HGT/001", + bands=["elevation"], + edge_size=128, + resolution=90 +) + +fastcubo.getPixels(table, nworkers=4, output_path="output/aligned_images/lgm") + +# Create the data cube +datacube = satalign.utils.create_array("output/aligned_images/lgm", "output/datacube_lgm.pickle") + +# Define the reference image +reference_image = datacube.isel(time=0) + +# Initialize the LGM model +lgm_model = satalign.LGM( + datacube=datacube, + reference=reference_image, + feature_model="superpoint", + matcher_model="lightglue", +) + +# Run the alignment +aligned_cube, warp_matrices = lgm_model.run() +``` -Repository initiated with [fpgmaas/cookiecutter-poetry](https://github.com/fpgmaas/cookiecutter-poetry). +In this document, we presented three different examples of how to use SatAlign with PCC, ECC, and LGM for multi-temporal image co-registration. Each example shows how to download an image collection from Google Earth Engine, create a data cube, and align the images using one of the three methods provided by the SatAlign package. \ No newline at end of file diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index faadbdb..0000000 --- a/docs/index.md +++ /dev/null @@ -1,8 +0,0 @@ -# satalign - -[![Release](https://img.shields.io/github/v/release/csaybar/satalign)](https://img.shields.io/github/v/release/csaybar/satalign) -[![Build status](https://img.shields.io/github/actions/workflow/status/csaybar/satalign/main.yml?branch=main)](https://github.com/csaybar/satalign/actions/workflows/main.yml?query=branch%3Amain) -[![Commit activity](https://img.shields.io/github/commit-activity/m/csaybar/satalign)](https://img.shields.io/github/commit-activity/m/csaybar/satalign) -[![License](https://img.shields.io/github/license/csaybar/satalign)](https://img.shields.io/github/license/csaybar/satalign) - -A python package to align satellite images. diff --git a/docs/modules.md b/docs/modules.md deleted file mode 100644 index ce5bc92..0000000 --- a/docs/modules.md +++ /dev/null @@ -1 +0,0 @@ -::: satalign.foo diff --git a/mkdocs.yml b/mkdocs.yml index 66bb288..d029175 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,54 +1,94 @@ -site_name: satalign -repo_url: https://github.com/csaybar/satalign -site_url: https://csaybar.github.io/satalign -site_description: A python package to align satellite images. -site_author: Cesar Aybar -edit_uri: edit/main/docs/ -repo_name: csaybar/satalign -copyright: Maintained by Florian. +docs_dir: . -nav: - - Home: index.md - - Modules: modules.md -plugins: - - search - - mkdocstrings: - handlers: - python: - setup_commands: - - import sys - - sys.path.append('../') +# Project information +site_name: Satalign +site_url: https://ipl-uv.github.io/satalign/ +site_author: AndesDataCube Project +site_description: Satalign is a Python library for the alignment of satellite images using deep learning models. + + +# Repository +repo_url: https://github.com/IPL-UV/satalign +repo_name: satalign +use_directory_urls: false + +# Configuration theme: name: material - feature: - tabs: true + language: en palette: - - media: "(prefers-color-scheme: light)" - scheme: default - primary: white - accent: deep orange + - scheme: default + primary: black + accent: black toggle: - icon: material/brightness-7 + icon: material/toggle-switch-off-outline name: Switch to dark mode - - media: "(prefers-color-scheme: dark)" - scheme: slate - primary: black - accent: deep orange + - scheme: slate + primary: '#201357' + accent: white toggle: - icon: material/brightness-4 + icon: material/toggle-switch name: Switch to light mode - icon: - repo: fontawesome/brands/github + font: + text: Roboto + code: Roboto Mono + logo: https://huggingface.co/datasets/JulioContrerasH/DataMLSTAC/resolve/main/logo_satalign.png + favicon: resources/ms_icon.png + features: + - navigation.instant + - navigation.tabs + - navigation.top + - navigation.expand + - navigation.indexes + - header.autohide + +# Page tree +nav: + - Home: + - README.md + - Contributing: CONTRIBUTING.md + - Changelog: CHANGELOG.md + - Code of conduct: CODE_OF_CONDUCT.md + # - Tasks: + # - ./mlstac/collection/tasks/README.md + # - Remote Sensing: + # - Tensor Classification: ./mlstac/collection/tasks/TensorClassification.md + # - Tensor Regression: ./mlstac/collection/tasks/TensorRegression.md + # - Tensor Object Detection: ./mlstac/collection/tasks/TensorObjectDetection.md + # - Tensor Segmentation: ./mlstac/collection/tasks/TensorSegmentation.md + # - Tensor to Tensor: ./mlstac/collection/tasks/TensorToTensor.md + + # - Multimodal: + # - Tensor to Text: ./mlstac/collection/tasks/TensorToText.md + # - Text to Tensor: ./mlstac/collection/tasks/TextToTensor.md + # - Sample: + # - ./mlstac/sample/README.md + # - Specification: ./mlstac/sample/specification.md + # - Safetensor: ./mlstac/sample/safetensor.md + # - Schema: ./mlstac/sample/squema.md + # # - Catalog: + # # - ./mlstac/catalog/README.md + # # - Specification: ./mlstac/catalog/specification.md + # # - Squema: ./mlstac/catalog/squema.md + # - Collection: + # - ./mlstac/collection/README.md + # - Specification: ./mlstac/collection/specification.md + # - Schema: ./mlstac/collection/squema.md + # - API: ./mlstac/api/README.md -extra: - social: - - icon: fontawesome/brands/github - link: https://github.com/csaybar/satalign - - icon: fontawesome/brands/python - link: https://pypi.org/project/satalign +# Plugins +plugins: + - search + - same-dir + - mkdocstrings + - awesome-pages markdown_extensions: - - toc: - permalink: true - - pymdownx.arithmatex: - generic: true + - meta + - admonition + - pymdownx.highlight + - pymdownx.superfences + - pymdownx.pathconverter + - pymdownx.tabbed + - mdx_truly_sane_lists + - pymdownx.tasklist \ No newline at end of file diff --git a/png/aligned_image_1.tif b/png/aligned_image_1.tif new file mode 100644 index 0000000000000000000000000000000000000000..4ae91faa94abfd00d03e15952343a3137f684fde GIT binary patch literal 524852 zcmeIwF>cdf7=U5N32g@k7=VQVF?6UHdjRCEE8M_G@j)0o^dLTpPr_?8Ll$P1C)S&M z`M+3-p5*1_X?Pfh;r%e2&cmtccskw8WAmlsKXtyIAD_FsnLnN`!_UqhTYS2nANPE| znZGn2pLwmXH~0Q(K6myw4#V%}$&gq{Jo}{YpJ!i+G{+uuc_u* zYOSsI8prlE)m%%hwbfqZxqVGF*HUY3wbyuQUsKJs)LL8ZHNI + + + 0 + 0 + 0 + 0 + 100 + + + + + 0 + 0 + 0 + 0 + 100 + + + + + 0 + 0 + 0 + 0 + 100 + + + diff --git a/png/image_1.tif b/png/image_1.tif new file mode 100644 index 0000000000000000000000000000000000000000..4ae91faa94abfd00d03e15952343a3137f684fde GIT binary patch literal 524852 zcmeIwF>cdf7=U5N32g@k7=VQVF?6UHdjRCEE8M_G@j)0o^dLTpPr_?8Ll$P1C)S&M z`M+3-p5*1_X?Pfh;r%e2&cmtccskw8WAmlsKXtyIAD_FsnLnN`!_UqhTYS2nANPE| znZGn2pLwmXH~0Q(K6myw4#V%}$&gq{Jo}{YpJ!i+G{+uuc_u* zYOSsI8prlE)m%%hwbfqZxqVGF*HUY3wbyuQUsKJs)LL8ZHNI + + + 0 + 0 + 0 + 0 + 100 + + + + + 0 + 0 + 0 + 0 + 100 + + + + + 0 + 0 + 0 + 0 + 100 + + + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..53a88ff --- /dev/null +++ b/requirements.txt @@ -0,0 +1,9 @@ +mkdocs==1.3.* +mkdocs-material==8.2.* +pymdown-extensions>=10.0 +markdown==3.3.* +mdx_truly_sane_lists==1.2.* +mkdocs-git-revision-date-localized-plugin==1.0.* +mkdocs-awesome-pages-plugin==2.9.1 +mkdocstrings +mkdocs-same-dir \ No newline at end of file diff --git a/satalign/utils.py b/satalign/utils.py index c99e7ca..426cbb2 100644 --- a/satalign/utils.py +++ b/satalign/utils.py @@ -32,9 +32,14 @@ def create_array( s2_files = [f for _, f in sorted(zip(s2_dates, s2_files))] s2_dates.sort() + # check if the dates are unique + if len(s2_dates) != len(set(s2_dates)): + raise ValueError("The dates are not unique") + # Create a data cube print("Creating data cube...") for file, date in zip(s2_files, s2_dates): + with rio.open(file) as src: data = src.read() if "s2_data" not in locals():