data_downloader.services.HyP3JobsDownloader#

class data_downloader.services.HyP3JobsDownloader(service: HyP3Service, job_type: JobType)#

Class to download HyP3 jobs

__init__(service: HyP3Service, job_type: JobType) None#

Initialize the HyP3JobsDownloader.

Parameters:
  • service (HyP3Service) – The HyP3 service

  • job_type (JobType) – The job type to download. e.g. INSAR_GAMMA, INSAR_ISCE_BURST

Methods

__init__(service, job_type)

Initialize the HyP3JobsDownloader.

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

Download jobs from HyP3.

Attributes

jobs_on_service

Get the jobs on the service

__init__(service: HyP3Service, job_type: JobType) None#

Initialize the HyP3JobsDownloader.

Parameters:
  • service (HyP3Service) – The HyP3 service

  • job_type (JobType) – The job type to download. e.g. INSAR_GAMMA, INSAR_ISCE_BURST

property jobs_on_service: Jobs#

Get the jobs on the service

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