data_downloader.services.HyP3JobsBurst#

class data_downloader.services.HyP3JobsBurst(service: ~data_downloader.services.hyp3.job_manager.HyP3Service, granules: ~pandas.core.series.Series = Series([], dtype: object), job_parameters: dict = {})#

Class to manage INSAR_ISCE_BURST jobs.

This class provides a pythonic interface to submit and download INSAR_ISCE_BURST jobs from HyP3.

__init__(service: ~data_downloader.services.hyp3.job_manager.HyP3Service, granules: ~pandas.core.series.Series = Series([], dtype: object), job_parameters: dict = {}) None#

Initialize the InSARJob class

Parameters:
  • service (HyP3Service) – HyP3Service instance to submit the job and check the submitted jobs.

  • granules (pd.Series, optional) – A pandas Series containing granule information, where the index represents the granule date and the values are the granule names. If not provided, only job downloading from HyP3 is supported; job submission is unavailable.

  • job_parameters (dict, optional) –

    Arguments to be passed to the job, by default {}.

    Hint

    • You can still modify job parameters after initialization by

    resetting the job_parameters attribute. - You can use the show_parameters method to view all available submission parameters.

Methods

__init__(service[, granules, job_parameters])

Initialize the InSARJob class

download_jobs(output_dir[, name, ...])

Download jobs from HyP3.

jobs_to_pairs(jobs)

Convert jobs to pairs

submit_jobs(pairs[, skip_existing])

Submit the job to HyP3

Attributes

date_idx

The index of the date in the granule name

job_parameters

Job parameters

jobs_on_service

Get the jobs on the service

pairs_failed

Pairs that failed in the job submission

pairs_succeed

Pairs that succeeded in the job submission

__init__(service: ~data_downloader.services.hyp3.job_manager.HyP3Service, granules: ~pandas.core.series.Series = Series([], dtype: object), job_parameters: dict = {}) None#

Initialize the InSARJob class

Parameters:
  • service (HyP3Service) – HyP3Service instance to submit the job and check the submitted jobs.

  • granules (pd.Series, optional) – A pandas Series containing granule information, where the index represents the granule date and the values are the granule names. If not provided, only job downloading from HyP3 is supported; job submission is unavailable.

  • job_parameters (dict, optional) –

    Arguments to be passed to the job, by default {}.

    Hint

    • You can still modify job parameters after initialization by

    resetting the job_parameters attribute. - You can use the show_parameters method to view all available submission parameters.

download_jobs(output_dir: PathLike, name: str | None = None, request_time: datetime | str | slice | None = None, unzip: bool = True, remove_zip: bool = True, overwrite: bool = False, wait_until_finished=True, wait_minutes=60, retry=30) None#

Download jobs from HyP3.

Parameters:
  • output_dir (PathLike) – Output directory to save the files

  • name (str, optional) – Name of submitted jobs to filter by, by default None

  • request_time (datetime | str | slice, optional) – Request time of submitted jobs to filter by. Can be a datetime, a string, or a slice object. If a slice object is used, the start must be a string or a datetime, and the stop can be None, a string. If a string is used, it must be in the format that can be converted to a datetime.

  • unzip (bool, optional) – Whether to unzip the files, by default True

  • remove_zip (bool, optional) – Whether to remove the zip files after unzipping, by default True

  • overwrite (bool, optional) – Whether to overwrite the existing files when unzipping. If False, The interferogram folders that are already unzipped will not be downloaded again, by default False.

  • wait_until_finished (bool, optional) –

    Whether to wait for the jobs that are still running or pending to finish, by default True.

    Note

    If the jobs are still running, the download will be retried for retry times. The download will be retried every wait_minutes minutes. The download will be retried until the jobs are finished.

  • wait_minutes (int, optional) – Minutes to wait for the jobs still running or pending to finish, by default 60 (1 hour)

  • retry (int, optional) – Number of times to retry the download if the jobs are still running or pending, by default 10

property job_parameters: dict#

Job parameters

property jobs_on_service: Jobs#

Get the jobs on the service

jobs_to_pairs(jobs: Jobs) Pairs#

Convert jobs to pairs

property pairs_failed: Pairs#

Pairs that failed in the job submission

property pairs_succeed: Pairs#

Pairs that succeeded in the job submission

submit_jobs(pairs: Pairs, skip_existing: bool = True)#

Submit the job to HyP3

Parameters:
  • pairs (Pairs) – Pairs to be submitted to HyP3

  • skip_existing (bool, optional) – Whether to skip the existing pairs that have succeeded or are running, by default True

date_idx: int = 3#

The index of the date in the granule name