A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ASFHyP3/hyp3-sdk below:

ASFHyP3/hyp3-sdk: A python wrapper around the HyP3 API

A python wrapper around the HyP3 API

>>> from hyp3_sdk import HyP3
>>> hyp3 = HyP3(username='MyUsername', password='MyPassword')

>>> granule = 'S1A_IW_SLC__1SSV_20150621T120220_20150621T120232_006471_008934_72D8'
>>> job = hyp3.submit_rtc_job(granule=granule, name='MyNewJob')
>>> job = hyp3.watch(job)
>>> job.download_files()

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

The HyP3 SDK can be installed into a conda environment with

conda install -c conda-forge hyp3_sdk

or into a virtual environment with

python -m pip install hyp3_sdk

There are 3 main classes that the SDK exposes:

An instance of the HyP3 class will be needed to interact with the external HyP3 API.

>>> from hyp3_sdk import HyP3
>>> hyp3 = HyP3(username='MyUsername', password='MyPassword')

>>> granule = 'S1A_IW_SLC__1SSV_20150621T120220_20150621T120232_006471_008934_72D8'
>>> job = hyp3.submit_rtc_job(granule=granule, name='MyNewJob')
>>> job = hyp3.watch(job)
>>> job.download_files()

hyp3 has member functions for submitting new jobs:

rtc_job = hyp3.submit_rtc_job('granule_id', 'job_name')
insar_job = hyp3.submit_insar_job('reference_granule_id', 'secondary_granule_id', 'job_name')
insar_burst_job = hyp3.submit_insar_isce_burst_job('reference_granule_id', 'secondary_granule_id', 'job_name')
insar_multi_burst_job = hyp3.submit_insar_isce_multi_burst_job(['ref_id_1', 'ref_id_2'], ['sec_id_1', 'sec_id_2'], 'job_name')
autorift_job = hyp3.submit_autorift_job('reference_granule_id', 'secondary_granule_id', 'job_name')
aria_s1_gunw_job = hyp3.submit_aria_s1_gunw_job('ref_date', 'sec_date', 'frame_id', 'job_name')
opera_rtc_s1_job = hyp3.submit_opera_rtc_s1_job('granule_id')

Each of these functions will return an instance of the Job class that represents a new HyP3 job request.

To find HyP3 jobs that were run previously, you can use the hyp3.find_jobs()

This will return a Batch instance representing all jobs owned by you. You can also pass parameters to query to a specific set of jobs

Operations on Job and Batch

If your jobs are not complete you can use the HyP3 instance to update them, and wait from completion

batch = hyp3.find_jobs()
if not batch.complete():
    # to get updated information
    batch = hyp3.refresh(batch)
    # or to wait until completion and get updated information (which will take a fair bit)
    batch = hyp3.watch(batch)

Once you have complete jobs you can download the products to your machine

These operations also work on Job objects

job = hyp3.submit_rtc_job('S1A_IW_SLC__1SSV_20150621T120220_20150621T120232_006471_008934_72D8', 'MyJobName')
job = hyp3.watch(job)
job.download_files()

For the full SDK API Reference, see the HyP3 documentation

Want to talk about the HyP3 SDK? We would love to hear from you!

Found a bug? Want to request a feature? Open an issue

General questions? Suggestions? Or just want to talk to the team? Chat with us on Gitter


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4