Skip to main content

A Python utility for downloading Sentinel-1 Orbit files from the Registry of Open Data on AWS

Project description

s1-orbits

A Python utility for downloading Sentinel-1 Orbit files from the Registry of Open Data on AWS.

>>> import s1_orbits

>>> orbit_file = s1_orbits.fetch_for_scene('S1A_IW_SLC__1SDV_20230727T075102_20230727T075131_049606_05F70A_AE0A')
>>> orbit_file
PosixPath('S1A_OPER_AUX_POEORB_OPOD_20230816T080815_V20230726T225942_20230728T005942.EOF')

Installation

In order to easily manage dependencies, we recommend using dedicated project environments via Anaconda/Miniconda or Python virtual environments.

s1_orbits can be installed into a conda environment with:

conda install -c conda-forge s1_orbits

or into a virtual environment with:

python -m pip install s1_orbits

Usage

s1-orbits provides one function - fetch_for_scene - to download the "best available" orbit file for a given scene. This means it will download the AUX_POEORB file if it exists; otherwise, it will download the AUX_RESORB file. For a more full-featured API, see sentineleof or CDSE's APIs.

fetch_for_scene(scene: str, dir: Union[pathlib.Path, str] = '.') -> pathlib.Path
    """
    For the given scene, downloads the AUX_POEORB file if available, otherwise downloads the AUX_RESORB file.

    Args:
        scene: The scene name for which to download the orbit file.
        dir: The directory that the orbit file should download into.

    Raises:
        InvalidSceneError: Thrown if the scene name is not a proper Sentinel-1 scene name.
        OrbitNotFoundError: Thrown if an orbit cannot be found for the provided scene.

    Returns:
        download_path: The path to the downloaded file.
    """

Development

  1. Install git and conda.
  2. Clone the repository.
    git clone git@github.com:ASFHyP3/sentinel1-orbits-py.git
    cd sentinel1-orbits-py
    
  3. Create and activate the conda environment.
    conda env create -f environment.yml
    conda activate s1-orbits
    
  4. Run the tests.
    pytest tests
    

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

s1_orbits-0.1.1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

s1_orbits-0.1.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file s1_orbits-0.1.1.tar.gz.

File metadata

  • Download URL: s1_orbits-0.1.1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for s1_orbits-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0cb460a97cfea5ee39633998bc5d5b21ad293bc7cb3ddab00644e5ecd18a8adb
MD5 483a514004d5aa88dff6d10ddcaf124f
BLAKE2b-256 a83f09f7cdde5111f2c0dffb64edec825d159285fb83cf77e628ed051e7fe5ac

See more details on using hashes here.

File details

Details for the file s1_orbits-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: s1_orbits-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for s1_orbits-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 465e66116d402ee738fc5c7fbc5bf16adfc1604f8103a2d887d72649540fbc1d
MD5 fd890bc51c4ed2436517f414a673ae3c
BLAKE2b-256 2078b5fbe0224b2faf5f63db441d411326c1680a8d04baa51820f52b3632380d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page