data_downloader.services.HyP3JobsGAMMA#
- class data_downloader.services.HyP3JobsGAMMA(service: ~data_downloader.services.hyp3.job_manager.HyP3Service, granules: ~pandas.core.series.Series = Series([], dtype: object), job_parameters: dict = {})#
Class to manage
INSAR_GAMMAjobs.This class provides a pythonic interface to submit and download
INSAR_GAMMAjobs 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_parametersattribute. - You can use theshow_parametersmethod 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
The index of the date in the granule name
Job parameters
Get the jobs on the service
Pairs that failed in the job submission
Pairs that succeeded in the job submission
- date_idx: int = 5#
The index of the date in the granule name
- __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_parametersattribute. - You can use theshow_parametersmethod 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
retrytimes. The download will be retried everywait_minutesminutes. 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