Enumeration and ops library for the OPERA DIST-S1 project
Project description
dist-s1-enumerator
This is a Python library for enumerating OPERA RTC-S1 inputs necessary for the creation of OPERA DIST-S1 products. The library can enumerate inputs for the creation of a single DIST-S1 product or a time-series of DIST-S1 products over a large area spanning multiple passes. The DIST-S1 measures disturbance comparing a baseline of RTC-S1 images (pre-images) to a current set of acquisition images (post-images). This library also provides functionality for downloading the OPERA RTC-S1 data from ASF DAAC.
Installation/Setup
We recommend managing dependencies and virutal environments using mamba/conda.
mamba update -f environment.yml # creates a new environment dist-s1-enumerator
conda activate dist-s1-enumerator
pip install dist-s1-enumerator
python -m ipykernel install --user --name dist-s1-enumerator
Downloading data
For searching through the metadata of OPERA RTC-S1, you will not need any earthdata credentials.
For downloading data from the ASF DAAC, you will need to make sure you have a Earthdata credentials (see: https://urs.earthdata.nasa.gov/) and successfully accepted the ASF terms of use (this can be checked by downloading any product at the ASF DAAC using your Earthdata credentials: https://search.asf.alaska.edu/).
You will need to create or append to ~/.netrc file with these credentials:
machine urs.earthdata.nasa.gov
login <your_username>
password <your_password>
Development installation
Same as above replacing pip install dist-s1-enumerator with pip install -e ..
Usage
See the Jupyter notebooks for examples.
- Enumerating inputs for a single DIST-S1 product
- Enumerating inputs for a time-series of DIST-S1 products
These notebooks provide discussion about how we curate OPERA RTC-S1 inputes for the creation of DIST-S1 products.
Identifiers for DIST-S1 products
Of course, knowing all the OPERA RTC-S1 products (pre-images and post-images) necessary for a DIST-S1 product uniquely identifies the products. However, this can be upwards of 100 products for each DIST-S1 products and is not human parsable. Thus, it is helpful to know alterate ways to identify and trigger the DIST-S1 product and its' workflow.
Altenrately, we can uniqely identify a DIST-S1 product via its:
- MGRS Tile ID
- Track Number
- Post-image acquisition time (within 1 day)
Each DIST-S1 product is resampled to an MGRS tile, thus explaining 1. One might assume that the post-image acquisition time is enough - however, there are particular instances when Sentinel-1 A and Sentinel-1 C will pass each other in the same day and so fixing the track number differentiates between the two sets of imagery; each satellite will collect data from different geometries and thus provide imagery in different fixed spatial bursts. Thus, it is important to specify the date in addition to the track number. It is also important to note that we are assuming the selection of pre-images (once a post-image set is selected) is fixed. Indeed, varying a baseline of pre-images by which to measure disturbance will alter the final DIST-S1 product. While we can modify strategies of pre-image selection using this library, it is not highlighted here.
Testing
For the test suite:
- Install
pytestviaconda-forge - Run
pytest tests
There are two category of tests: unit tests and integration tests. The former can be run using pytest tests -m 'not integration' and similarly the latter with pytest tests -m 'integration'. The intgeration tests are those that can be integrated into the DAAC data access workflows and thus require internet access with earthdata credentials setup correctly (as described above). The unit tests mock the necessary data inputs.
The integration tests that are the most time consuming are represented by the notebooks and are run only upon a release PR.
These notebook tests are tagged with notebooks and can be excluded from the other tests with pytest tests -m 'not notebooks'.
Contributing
We welcome contributions to this open-source package. To do so:
- Create an GitHub issue ticket desrcribing what changes you need (e.g. issue-1)
- Fork this repo
- Make your modifications in your own fork
- Make a pull-request (PR) in this repo with the code in your fork and tag the repo owner or a relevant contributor.
We use ruff and associated linting packages to ensure some basic code quality (see the environment.yml). These will be checked for each commit in a PR. Try to write tests wherever possible.
Support
- Create an GitHub issue ticket desrcribing what changes you would like to see or to report a bug.
- We will work on solving this issue (hopefully with you).
Acknowledgements
See the LICENSE file for copyright information.
This package was developed as part of the Observational Products for End-Users from Remote Sensing Analysis (OPERA) project. This work was originally carried out at the Jet Propulsion Laboratory, California Institute of Technology, under a contract with the National Aeronautics and Space Administration (80NM0018D0004). Copyright 2024 by the California Institute of Technology. United States Government Sponsorship acknowledged.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dist_s1_enumerator-0.0.3.tar.gz.
File metadata
- Download URL: dist_s1_enumerator-0.0.3.tar.gz
- Upload date:
- Size: 30.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4975b9432c5f3967c5cbde6b7a79e806a4deaaa4c48de86008abaf353f082c2
|
|
| MD5 |
316ea16174c43f5b3e89379227b076ec
|
|
| BLAKE2b-256 |
79236e81b49385fe900ca14fefcee59d2cc1afc5e7ce1c058623e487db624fa3
|
File details
Details for the file dist_s1_enumerator-0.0.3-py3-none-any.whl.
File metadata
- Download URL: dist_s1_enumerator-0.0.3-py3-none-any.whl
- Upload date:
- Size: 28.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37c21b76bc79e1cfcf20b57af33483df921db703f0be09010ebedbc217ed87aa
|
|
| MD5 |
1cde9471452bd370b9a783102384b3aa
|
|
| BLAKE2b-256 |
02f47a6142f1f2f0f1e3a71ef1e6db79df74ef8a208d535f4d7c7b1dfc8a97af
|