Skip to main content

Python library for enumerating ASF product inputs

Project description

ASF Enumeration

Enumeration code for ARIA S1 GUNW products

>>> from asf_enumeration import aria_s1_gunw

>>> frames = aria_s1_gunw.get_frames(flight_direction='ASCENDING', path=175)
>>> frames[0]
AriaFrame(id=27236, path=175, flight_direction='ASCENDING', polygon=<POLYGON ((30.157 1.767...>)))

>>> acquisitions = aria_s1_gunw.get_acquisitions(frames[0])
>>> acquisitions[0]
Sentinel1Acquisition(date=datetime.date(2014, 10, 17), frame=AriaFrame(...), products=[<asf_search.ASFProduct>])

Installation

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

asf_enumeration can be installed into a conda environment with:

conda install -c conda-forge asf_enumeration

or into a virtual environment with:

python -m pip install asf_enumeration

Usage

These are the main data classes used by the asf_enumeration.aria_s1_gunw module

  • AriaFrame which represents all metadata associated with a ARIA frame (id, path, flight direction and it's polygon)
  • Sentinel1Acquisition which represents all available Sentinel-1 SLC's over an ARIA frame on a specific date (products, date, frame)

The asf_enumeration.aria_s1_gunw module exposes these functions

  • get_frames get all ARIA frames based on filter critiria (geometry, flight direction, path)
  • get_frame get a single ARIA frame based on it's ID
  • get_acquisitions get all Sentinel-1 acquisitions for a given ARIA frame
  • get_acquisition get a Sentinel-1 acquisition for a given ARIA frame and date
  • get_product get an ARIA product for a given reference date, secondary date, and ARIA frame, if the product exists
  • product_exists check if an ARIA product exists in the ASF archive given reference date, secondary date, and ARIA frame

Getting Frames

aria_s1_gunw.get_frames allows for filtering based on any shapely.Geometry, as well as flight_direction and path

frames_over_point = aria_s1_gunw.get_frames(geometry=shapely.Point(122.78, -8.55))
frames_filtered  = aria_s1_gunw.get_frames(flight_direction='DESCENDING', path=2)

A single frame can be looked up using aria_s1_gunw.get_frame

frame = aria_s1_gunw.get_frame(100)

Getting Acquisitions

aria_s1_gunw.get_acquisitions returns all the Sentinel-1 acqusitions over a ARIA frame. It takes either the ARIA frame ID or an AriaFrame object as input.

acquisitions_frame_id = aria_s1_gunw.get_acquisitions(9852)
frame = aria_s1_gunw.get_frame(9852)
acquisitions_frame_obj = aria_s1_gunw.get_acquisitions(frame)

An acquisition for a specific date can be found using aria_s1_gunw.get_acquisition

single_acquisition = aria_s1_gunw.get_acquisition(frame=9852, date=datetime.date(2014, 11, 3))

Getting Products

aria_s1_gunw.get_product gets an ARIA product from the ASF archive if it exists.

# S1-GUNW-D-R-163-tops-20250527_20250503-212910-00121E_00010S-PP-07c7-v3_0_1
product = aria_s1_gunw.get_product(datetime.date(2025, 5, 27), datetime.date(2025, 5, 3), 25388)

Checking if a Product Exists

aria_s1_gunw.product_exists checks if an ARIA product already exists in the ASF archive

# S1-GUNW-D-R-163-tops-20250527_20250503-212910-00121E_00010S-PP-07c7-v3_0_1
aria_s1_gunw.product_exists(datetime.date(2025, 5, 27), datetime.date(2025, 5, 3), 25388)

Development

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

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

asf_enumeration-0.2.0.tar.gz (5.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asf_enumeration-0.2.0-py3-none-any.whl (5.5 MB view details)

Uploaded Python 3

File details

Details for the file asf_enumeration-0.2.0.tar.gz.

File metadata

  • Download URL: asf_enumeration-0.2.0.tar.gz
  • Upload date:
  • Size: 5.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for asf_enumeration-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f82d133df50fc10b38c3120c1c31f356b6d34b397c371e8999fc0937fb672704
MD5 0596797a67bb114415a00e45a1326572
BLAKE2b-256 6bc06980c66c7bceeb3a70ad6cca1fc947cfb39ba1f9eacebd9004eece9dba3f

See more details on using hashes here.

File details

Details for the file asf_enumeration-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for asf_enumeration-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa40d7baded3b9eefe28ba6b3ee916b6bb2c5d6868066b09203a6994c8b89eef
MD5 0a1b0891b4f5280fcabd4ad88e9e62f0
BLAKE2b-256 fa691b3a7572ec325ed93593407be06864ce980d00f9970a008c1c19c1f5f2be

See more details on using hashes here.

Supported by

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