Processor
The InSARHub Processor module provides functionality specifically for interferogram processing.
-
Import processor
Import the Processor class to access all processor functionality
-
View available processors
List all registered processors
Available Processors
The HyP3 InSAR processor is a cloud-based processing service provided by the ASF HyP3 system for generating interferograms from Sentinel-1 SAR data. InSARHub wrapped hyp3_sdk as one of its process backends.
The Hyp3_S1 specifically wraps insar_job in hyp3_sdk to provide InSAR SLC processing workflows.
Source code in src/insarhub/processor/hyp3_s1.py
Usage
-
Create Processor with Parameters
Initialize a processor instance with search criteria
ORORparams = { "workdir": '/your/work/path', "pairs": pairs, } processor = Processor.create('Hyp3_S1', **params)from insarhub.config.defaultconfig import Hyp3_S1_Config cfg = Hyp3_S1_Config(workdir='/your/work/path', pairs=pairs) processor = Processor.create('Hyp3_S1', config=cfg)Attributes:
Name Type Description workdirPath | strDirectory where downloaded products will be stored. If provided as a string, it will be converted to a resolved
Pathobject during initialization.saved_job_pathPath | str | NoneOptional path to a saved job JSON file for reloading previously submitted jobs. If provided as a string, it will be converted to a resolved
Pathobject.earthdata_credentials_pooldict[str, str] | NoneDictionary mapping usernames to passwords for managing multiple Earthdata accounts. Used for parallel or quota-aware submissions.
skip_existingboolIf True, skip submission or download of products that already exist locally.
submission_chunk_sizeintNumber of jobs submitted per batch request to the API. Helps avoid request size limits and API throttling.
max_workersintMaximum number of worker threads used for concurrent submissions or downloads. Recommended to keep below 8 to avoid overwhelming the API or triggering rate limits.
Attributes:
Name Type Description pairslist[tuple[str, str]] | NoneList of Sentinel-1 scene ID pairs in the form [(reference_scene, secondary_scene), ...]. If None, pairs must be provided during submission.
name_prefixstr | NonePrefix added to generated HyP3 job names.
include_look_vectorsboolIf True, include look vector layers in the output product.
include_los_displacementboolIf True, include line-of-sight (LOS) displacement maps.
include_inc_mapboolIf True, include incidence angle maps.
looksstrMulti-looking factor in the format "range x azimuth" (e.g., "20x4").
include_demboolIf True, include the DEM used during processing.
include_wrapped_phaseboolIf True, include wrapped interferometric phase output.
apply_water_maskboolIf True, apply a water mask during processing.
include_displacement_mapsboolIf True, include unwrapped displacement maps.
phase_filter_parameterfloatPhase filtering strength parameter (typically between 0 and 1). Higher values apply stronger filtering.
Source code in
src/insarhub/config/defaultconfig.py255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348
@dataclass class Hyp3_S1_Config(Hyp3_Base_Config): """ Configuration options for `hyp3_sdk` InSAR GAMMA processing jobs. This dataclass defines all parameters used when submitting InSAR jobs to the ASF HyP3 service using the GAMMA workflow. UI metadata is stored in ``_ui_groups`` / ``_ui_fields`` and consumed by the API layer to auto-generate the settings panel. Attributes: pairs (list[tuple[str, str]] | None): List of Sentinel-1 scene ID pairs in the form [(reference_scene, secondary_scene), ...]. If None, pairs must be provided during submission. name_prefix (str | None): Prefix added to generated HyP3 job names. include_look_vectors (bool): If True, include look vector layers in the output product. include_los_displacement (bool): If True, include line-of-sight (LOS) displacement maps. include_inc_map (bool): If True, include incidence angle maps. looks (str): Multi-looking factor in the format "range x azimuth" (e.g., "20x4"). include_dem (bool): If True, include the DEM used during processing. include_wrapped_phase (bool): If True, include wrapped interferometric phase output. apply_water_mask (bool): If True, apply a water mask during processing. include_displacement_maps (bool): If True, include unwrapped displacement maps. phase_filter_parameter (float): Phase filtering strength parameter (typically between 0 and 1). Higher values apply stronger filtering. """ # ── UI metadata consumed by the API / settings panel ───────────────────── _ui_groups: ClassVar[list] = [ {"label": "Processing", "fields": ["looks", "phase_filter_parameter", "name_prefix", "apply_water_mask"]}, {"label": "Outputs", "fields": ["include_dem", "include_look_vectors", "include_inc_map", "include_los_displacement", "include_wrapped_phase", "include_displacement_maps"]}, {"label": "Job", "fields": ["skip_existing", "submission_chunk_size"]}, ] _ui_fields: ClassVar[dict] = { "looks": {"type": "select", "options": ["20x4", "10x2"], "hint": "Range × azimuth looks (20x4 ≈ 80 m, 10x2 ≈ 40 m)"}, "phase_filter_parameter": {"type": "number", "min": 0, "max": 1, "step": 0.1, "default": 0.6, "hint": "Goldstein filter strength (0 = off, 1 = maximum)"}, "name_prefix": {"type": "text"}, "apply_water_mask": {"type": "bool"}, "include_dem": {"type": "bool"}, "include_look_vectors": {"type": "bool"}, "include_inc_map": {"type": "bool"}, "include_los_displacement": {"type": "bool"}, "include_wrapped_phase": {"type": "bool"}, "include_displacement_maps":{"type": "bool"}, "skip_existing": {"type": "bool", "hint": "Skip re-downloading already-completed jobs"}, "submission_chunk_size": {"type": "number", "min": 1, "max": 500, "step": 1, "default": 200, "hint": "Jobs per API batch request"}, } # ───────────────────────────────────────────────────────────────────────── name: str = "Hyp3_S1_Config" pairs: list[tuple[str, str]] | None = None name_prefix: str | None = 'ifg' include_look_vectors:bool=True include_los_displacement:bool=False include_inc_map:bool=True looks:str='20x4' include_dem :bool=True include_wrapped_phase :bool=False apply_water_mask :bool=True include_displacement_maps:bool=True phase_filter_parameter :float=0.6 -
Submit Jobs
Submit InSAR jobs to HyP3 based on the current configuration.
-
Refresh Jobs
Refresh the status of all jobs.
-
Retry Failed Jobs
Retry all failed jobs by re-submitting them.
-
Download Succeeded Jobs
Download all succeeded jobs for all users.
-
Save Current Jobs
Save the current job batch information to a JSON file.
-
Watch Jobs
Continuously monitor jobs and download completed outputs.
-
Load Saved Job
Load a previously saved JSON file and resume work.
When loaded, you can resume checking or downloading jobs submitted to the HyP3 server.
The ISCE_S1 processor runs ISCE2 stackSentinel locally to generate Sentinel-1 interferograms from downloaded SLC .SAFE files. It generates a numbered sequence of run scripts and executes them sequentially, parallelising independent commands within each step.
-
Import processor
-
Create processor
from insarhub.config import ISCE_S1_Config cfg = ISCE_S1_Config( workdir='/data/p100_f466', bbox=[33.0, 38.0, -120.0, -115.0], # [S, N, W, E] ) pairs = [('20200101', '20200113'), ('20200113', '20200125')] processor = Processor.create('ISCE_S1', pairs=pairs, config=cfg)Attributes:
Name Type Description workdirPath | strProcessing root. All outputs (run_files/, merged/, etc.) live here.
slc_dirPath | strDirectory containing all Sentinel-1 SLC .SAFE files (or .zips).
orbit_dirPath | str | NoneDirectory with .EOF orbit files. Created automatically if absent.
aux_dirPath | str | NoneDirectory with Sentinel-1 AUX_CAL files. Defaults to workdir/aux; ISCE2 downloads missing files there on first run.
dem_pathPath | str | NoneISCE2-binary DEM (dem.wgs84 + .xml sidecar). When None, GLO-30 is pre-downloaded using bbox.
isce_homePath | str | NoneISCE2 installation root. Falls back to $ISCE_HOME env var.
bboxlist[float] | NoneArea of interest as [S, N, W, E] degrees. Required when dem_path is None.
num_overlap_connectionsintConnections used for NESD azimuth coregistration.
reference_datestr | NoneStack reference date YYYYMMDD. None = stackSentinel auto-selects.
coregistrationstr'NESD' (default, more accurate) or 'geometry' (faster).
max_workersintParallel commands within each run step.
-
Submit (local mode)
Generate run scripts and start sequential execution in a background process. Returns immediately; use
refresh()to monitor progress. -
Submit (HPC / SLURM mode)
Set
hpc_mode=Truein the config to submit each step as a separatesbatchjob instead of running locally. -
Dry run
Preview the run scripts and path checks without executing anything.
-
Refresh
Read step and command statuses from disk.
-
Retry failed steps
Re-run all steps that have
FAILEDstatus. -
Cancel
Terminate the running background process (local mode) or
scancelall active SLURM jobs (HPC mode). -
Watch
Poll step statuses at regular intervals until all steps complete.
-
Save / Load
Job state is saved automatically after
submit(). To reload and resume from a saved job file: