处理器
InSARHub 处理器模块专门提供干涉图处理功能。
-
导入处理器
导入 Processor 类以访问所有处理器功能
-
查看可用处理器
列出所有已注册的处理器
可用处理器
HyP3 InSAR 处理器是 ASF HyP3 系统提供的基于云端的处理服务,用于从 Sentinel-1 SAR 数据生成干涉图。 InSARHub 将 hyp3_sdk 封装为其处理后端之一。
Hyp3_S1 专门封装了 hyp3_sdk 中的 insar_job,提供 InSAR SLC 处理工作流。
Source code in src/insarhub/processor/hyp3_s1.py
使用方法
-
使用参数创建处理器
使用搜索条件初始化处理器实例
或或params = { "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.py623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722
@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", "max_workers"]}, ] _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"}, "max_workers": {"type": "number", "min": 1, "max": 16, "step": 1, "default": 4, "hint": "Parallel download threads for completed job outputs (default 4)"}, } # ───────────────────────────────────────────────────────────────────────── 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 # 0.5 aligns the Goldstein filter strength with ISCE2_S1.filter_strength # and GMTSAR's phasefilt (hardcoded alpha=0.5), so the three backends # are comparable. ASF's own HyP3 default is 0.6. phase_filter_parameter :float=0.5 -
提交任务
根据当前配置向 HyP3 提交 InSAR 任务。
-
刷新任务
刷新所有任务的状态。
-
重试失败任务
通过重新提交来重试所有失败的任务。
-
下载成功任务
下载所有用户的已成功任务。
-
保存当前任务
将当前任务批次信息保存到 JSON 文件。
-
监控任务
持续监控任务并下载已完成的输出。
-
加载已保存任务
加载之前保存的 JSON 文件并恢复工作。
加载后可恢复检查/下载提交至 HyP3 服务器的任务。
ISCE2_S1 处理器在本地运行 ISCE2 stackSentinel,从下载的 SLC .SAFE 文件生成 Sentinel-1 干涉图。它生成一系列编号运行脚本并顺序执行,在每个步骤内并行运行独立命令。
-
导入处理器
-
创建处理器
from insarhub.config import ISCE2_S1_Config cfg = ISCE2_S1_Config( workdir='/data/p100_f466', bbox=[33.0, 38.0, -120.0, -115.0], # [南, 北, 西, 东] ) pairs = [('20200101', '20200113'), ('20200113', '20200125')] processor = Processor.create('ISCE2_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, preferring the joint footprint of the actual SLCs found in slc_dir/workdir (union of every scene's manifest corners, covering every frame in a merged multi-frame stack) over bbox -- the search AOI only reflects what was searched for, not what ASF actually returned (whole-scene footprints extend beyond it) or what a merge combined. bbox is used only as a fallback when no SLCs are on disk yet to derive a footprint from.
isce_homePath | str | NoneISCE2 installation root. Falls back to $ISCE_HOME env var.
bboxlist[float] | NoneArea of interest as [S, N, W, E] degrees. Only used as a DEM bbox fallback when no SLCs are present yet to auto-derive a footprint from (see dem_path above); otherwise informational.
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. This is the knob that controls concurrency for every step except topo -- InSARHub runs each run-file line itself under a ThreadPoolExecutor.
num_proc4topointISCE2's own multiprocessing pool size for the topo step (run_01), written into config_reference as
numProcess. run_01 is a single command, so max_workers cannot parallelise it and this is the only knob that will. On HPC it is overridden by run_01'ssbatch_options.jsoncpus_per_task.num_procintNo effect under InSARHub. Hidden from the GUI for that reason; kept as a field so saved configs round-trip and because
_resolve_num_proc()still reads it as the HPC fallback.stackSentinel's
--num_procdoes exactly one thing: decide which lines of a run file get a trailing&and wherewaitgoes (Stack.py::write_wrapper_config2run_file), i.e. shell-level parallelism. InSARHub strips those&in_fix_cmd-- it has to, sincesubprocess.run("cmd &", shell=True)returns instantly with rc=0 and reports orphaned work as success -- and schedules the commands under its own pool instead. So the value never reaches ISCE2 as a process count: of the 51 configs stackSentinel writes for a 4-scene stack, only config_reference carriesnumProcess, and that one comes from num_proc4topo. Set max_workers instead. -
提交(本地模式)
生成运行脚本并在后台进程中开始顺序执行。立即返回;使用
refresh()监控进度。 -
提交(HPC / SLURM 模式)
设置
hpc_mode=True启用滑动窗口 SLURM 管理器。步骤会先分组:每场景/每对命令数相同的连续步骤会合并为单个组管理器(例如run_02_unpack_secondary_slc与run_03_average_baseline若每个场景各有一条命令,就会合并);其余步骤各自拥有独立的单步管理器。每个管理器随时保持最多max_concurrent_hpc个子作业同时运行,有空槽时立即补充。每个 sbatch 脚本按命令记录带耗时秒数的START/DONE/FAIL日志。submit()只直接提交第一个分组的管理器。此后每个管理器在自身成功完成后,会通过自己脚本末尾的sbatch调用去提交下一个分组的管理器——而不是依赖 SLURM 的--dependency——因此任意时刻队列中最多只会有一个管理器(加上它自己不超过max_concurrent_hpc个的子作业),而不是把所有分组的管理器一次性提前全部提交。这一点很关键,因为 SLURM 按用户限制提交作业数的 QOS 上限,对"仅仅在等待依赖"的作业和正在运行的作业是一视同仁地计数的;一次性提前提交整条链,可能会让本来什么都没做、只是在排队等轮到自己的管理器把这个上限占满。若某个管理器失败或被取消,它就不会再提交下一个,链条自然中断——不需要额外清理尚未提交的剩余部分。refresh()会自动读取新链式提交作业的 ID(管理器会把它写入该分组日志目录旁的小文件chained_job_id.txt)。管理器作业名简短且能直接看出它管理哪个/哪些运行步骤:单步管理器为
i<NN>_mgr(例如run_04_...对应i04_mgr),组管理器为跨越步骤 NN–MM 的i<NN>-<MM>_grp(例如i02-03_grp)——便于在squeue中一眼辨认。cfg = ISCE2_S1_Config( workdir='/data/p100_f466', bbox=[33.0, 38.0, -120.0, -115.0], hpc_mode=True, max_concurrent_hpc=12, # 默认值;根据集群公平份额限制调整 ) processor = Processor.create('ISCE2_S1', pairs=pairs, config=cfg) processor.submit()retry()从已保存的作业元数据(slurm_job_ids/hpc_manager/hpc_array)自动检测 HPC 模式,无需再次传入hpc_mode=True。 -
试运行
预览运行脚本和路径检查,不执行任何操作。
-
刷新
从磁盘读取步骤和命令状态。
-
重试失败步骤
重新运行所有状态为
FAILED的步骤。 -
取消
终止正在运行的后台进程(本地模式)或对所有活动 SLURM 任务执行
scancel(HPC 模式)。 -
监控
定期轮询步骤状态,直到所有步骤完成。
-
保存 / 加载
任务状态在
submit()后自动保存。从已保存的任务文件重新加载并恢复: -
无需本地安装 ISCE2
将
container字段设置为 Apptainer/Singularity.sif镜像的路径,或 Docker 镜像引用(name[:tag]),submit()/retry()/refresh()/watch()/cancel()都会在容器内而非宿主机上重新执行同一个insarhub processor ...CLI 调用 — 工作目录会以相同路径绑定挂载,因此输出会像本机运行一样落在原处,ISCE2 也完全不需要在宿主机上被发现。容器镜像只需在 ISCE2/topsStack 旁额外安装insarhub(可参考docker/dev/Dockerfile.isce2-mintpy作为现成示例)。运行应用/CLI 的宿主机需要在PATH上有容器运行时(docker,或对.sif用apptainer/singularity);容器镜像本身不需要 — 流水线直接在镜像内运行,不会再嵌套一次docker run。cfg = ISCE2_S1_Config( workdir='/data/p100_f466', bbox=[33.0, 38.0, -120.0, -115.0], container='ghcr.io/jldz9/insarhub-isce2-mintpy:0.4.0', ) processor = Processor.create('ISCE2_S1', pairs=pairs, config=cfg) processor.submit()CLI 用法相同:
insarhub processor -N ISCE2_S1 -w /data/p100_f466 submit \\ --container ghcr.io/jldz9/insarhub-isce2-mintpy:0.4.0container会持久化写入工作目录的insarhub_config.json,因此之后的retry()/refresh()/cancel()(以及 GUI 中的重试)会在同一镜像内重新运行,无需再次传入。后续调用若显式给出--container/container=会覆盖已保存的值;不带值的--container会解析为处理器的container_default镜像。container_default是每个处理器固定的建议镜像(GUI “在容器中运行” 复选框会用它预填),从不持久化 —— 只有你实际选择的container会被保存。在 HPC 模式下,只有各阶段的子作业在容器内运行,sbatch 管理器脚手架仍留在宿主机上。
在本地运行 GMTSAR 的 Python 流程,从 .SAFE SLC 生成 Sentinel-1 干涉图。入口由 subswath 决定:
- 单个 IW(例如
2)——单子条带,走p2p_processing - 多个 IW(例如默认的
"1 2 3")——多子条带合并,走p2p_S1_TOPS_Frame
两种模式下调用方都只需传入原始的 .SAFE/.EOF 名称,子条带与极化方式由内部提取。
GMTSAR 运行在自己的 conda 环境中。gmtsar_root 与 gmtsar_env_bin 用于定位它,两者均可自动探测,仅在探测失败时才需显式指定。也可将 container 设为包含 insarhub+GMTSAR 的 .sif/Docker 镜像,从而跳过本地探测。
-
导入处理器
-
创建处理器
from insarhub.config import GMTSAR_S1_Config cfg = GMTSAR_S1_Config( workdir = '/data/stack', slc_dir = '/data/slcs', orbit_dir = '/data/orbits', dem_path = '/data/dem.grd', # GMTSAR 格式 DEM;未设置时在暂存阶段自动下载 subswath = 2, # 仅 IW2 — 单子条带。默认 "1 2 3" 为多子条带合并 ) pairs = [ ("REF.SAFE", "REF.EOF", "SEC.SAFE", "SEC.EOF"), ] processor = Processor.create('GMTSAR_S1', pairs=pairs, config=cfg)多子条带模式下请设置
dem_path多子条带模式为每个干涉对建立独立的 case 目录。若
dem_path未设置,DEM 会在暂存阶段自动下载 — 也就是每个干涉对下载一次。对 27 个干涉对的网络而言,这意味着重复下载 27 次同一个 DEM。Attributes:
Name Type Description workdirPath | strProcessing root. gmtsar/ (raw/, topo/, config.py, intf/ or per-pair subdirs) lives here.
slc_dirPath | str | NoneDirectory containing Sentinel-1 SLC .SAFE dirs (or .zips).
orbit_dirPath | str | NoneDirectory with .EOF orbit files.
dem_pathPath | str | NoneGMTSAR-format DEM grid (topo/dem.grd). Unlike ISCE2_S1, bbox-driven auto-download is NOT implemented yet -- must be supplied explicitly. See gmtsar_s1.py's module docstring for the concrete "known gaps" list.
satstrp2p_processing's SAT argument (single-subswath mode only). Exposed (not hardcoded) for forward-compat -- GMTSAR already supports 14 sensor families beyond S1_TOPS (see gmtsar/python/tests/cases.py upstream), this processor is just the first one wired in.
subswathint | strIW subswath(s), ISCE-style space-separated (e.g. "1 2 3" = full frame merged via p2p_S1_TOPS_Frame, "2" = single-subswath via p2p_processing). p2p_processing itself does not read .SAFE directories -- it expects one subswath's .tiff/.xml files already extracted to matching-stem files in raw/ (confirmed against GMTSAR's own bundled single-subswath test fixture, H_res/raw/: its per-stem files are plain symlinks into the equivalent Frame-mode F
/ subswath files pulled from the same .SAFE). GMTSAR_S1 does this extraction itself. Default "1 2 3" (full frame, matching stack_mode's own default). parallelboolp2p_S1_TOPS_Frame's own internal subswath parallelism flag (0=sequential, 1=parallel). Only used in multi-subswath mode.
config_templatePath | str | NonePath to a GMTSAR config.py to reuse as-is. If None, one is auto-generated per case via
pop_config <sat>(GMTSAR's own default-config tool), matching p2p_processing's own "no config.py given" behavior.max_workersintIndependent pairs processed concurrently.
skip_existingboolDon't redo a pair whose output dir already has a .succeeded status marker.
gmtsar_rootPath | str | NoneGMTSAR repo root ($GMTSAR). Required -- GMTSAR_S1 raises at construction time if unset. Its bin/ is prepended to every GMTSAR subprocess call's PATH.
gmtsar_env_binPath | str | Nonebin/ dir of the conda env GMTSAR needs (provides the real
gmtbinary plus numba/scipy). Required -- InSARHub's own env does not providegmtat all (confirmed via a real end-to-end test, 2026-07-21), so subprocess calls fail near-instantly without this. See gmtsar_s1.py's _subprocess_env() docstring for the full writeup. -
提交
暂存 GMTSAR case 目录(单子条带模式下还会提取每个干涉对的子条带),随后在后台启动
p2p_processing/p2p_S1_TOPS_Frame,最多同时运行max_workers个干涉对。该调用立即返回;请用refresh()/watch()查看进度。 -
提交(HPC / SLURM 模式)
两种模式都支持
hpc_mode=True。p2p 模式(
stack_mode=False,默认)是两者中较简单的:干涉对之间完全独立 — 多子条带模式下各自拥有独立的 case 目录,单子条带模式的输出以intf/<julian_pair>/隔离 — 因此由单个滑动窗口管理器一次性展开全部干涉对,同时最多max_concurrent_hpc个,完全不需要链式提交。每个子作业通过内部的run-stage-unit --stage pair --index N重入,运行该干涉对的完整流程(配准 → 干涉图 → 滤波 → 解缠 → 地理编码)。作业名为g_p2p_mgr/g_p2p_<idx>。cfg = GMTSAR_S1_Config(workdir='/data/stack', hpc_mode=True) Processor.create('GMTSAR_S1', pairs=pairs, config=cfg).submit()stack_mode 则把每个栈阶段(
align_F<N>/intf_F<N>/merge,单子条带时为扁平的align/intf)作为各自的滑动窗口管理器运行,与ISCE2_S1采用相同的链式提交设计:只直接提交第一个阶段的管理器,其余每个管理器在自己成功后再提交下一个 — 而不是预先排入--dependency依赖链 — 因此队列中同时最多只有一个管理器(外加它自己的 ≤max_concurrent_hpc个子作业)。与
ISCE2_S1的一个真实差异:GMTSAR_S1没有stackSentinel.py的run_NN_*那种扁平 shell 命令清单 — 每个阶段的实际工作都在 Python 方法中(_run_align_unit/_run_intf_unit/_run_merge_unit),因此每个 HPC 子作业的"命令"都是重新进入insarhub自身(内部的run-stage-unitCLI 动作),在新进程中调用其中一个方法,而不是直接执行调用 GMTSAR 可执行文件的 shell 命令行。详见 HPC(SLURM)。
-
刷新状态
从 GMTSAR 自身的输出标记读取每个干涉对的状态。p2p 模式下会以每个干涉对一行的彩色表格显示,并用 SLURM 的实时状态覆盖过期的标记文件。
-
重试失败的干涉对
只重新运行状态为
FAILED的干涉对。 -
等待完成
轮询直到每个干涉对都为
SUCCEEDED或FAILED。 -
保存状态
submit()之后作业状态会自动保存到<workdir>/gmtsar/gmtsar_jobs.json。 -
取消(HPC 模式)
对 HPC 提交执行
scancel,涵盖管理器与全部子作业,两种模式均适用。p2p 的作业是通过hpc/p2p/目录识别的,而不是依赖config.hpc_mode,因此直接执行cancel即可找到它们、无需重复加--hpc-mode;任何仍处于PENDING/RUNNING的干涉对会被标记为FAILED,以免refresh继续把它显示为运行中。 -
输出目录结构
单子条带:
<workdir>/gmtsar/intf/<julian_date_pair>/(例如intf/2019184_2019196/— 这是 GMTSAR 自己的儒略日命名,而不是 ref/sec 词干)— 保持 GMTSAR 的原生文件名(corr_ll.grd、phasefilt_ll.grd、*.PRM),正是 MintPy 的prep_gmtsar.py直接期望的形式。多子条带:
<workdir>/gmtsar/<ref_safe>_<sec_safe>/merge/— 跨所有指定子条带的合并、地理编码产品(phasefilt_ll.grd、corr_ll.grd,以及 PNG/KML 预览图)。 -
时序分析:请使用 MintPy,而非 GMTSAR 自带的
sbas这是选择 p2p 的直接后果。GMTSAR 自带的
sbas在雷达坐标下运行,要求所有 SLC 都重采样到同一个公共网格 — 而 p2p 的逐对配准并不提供这一点。MintPy 的prep_gmtsar读取的是地理编码后的*_ll.grd,所有干涉对本来就在同一地理网格上,因此无需公共配准主影像。请使用GMTSAR_Mintpy_SBAS分析器。 -
无需本地安装 GMTSAR 即可运行
与
ISCE2_S1相同,把container设为一个装有insarhub+ GMTSAR 的.sif或 Docker 镜像,即可跳过本地探测:insarhub processor -N GMTSAR_S1 -w /data/stack submit \ --container ghcr.io/jldz9/insarhub-gmtsar-mintpy:0.4.0在 HPC 模式下,只有各阶段的子作业在容器内运行,sbatch 管理器脚手架仍留在宿主机上。
从 ASF SLC-BURST 数据构建干涉图栈,使用 ISCE3/COMPASS 进行地理编码,其后环节由 dolphin 完成。请与 S1_Burst 下载器配合使用。
不做配准:COMPASS 把每一景独立地理编码到绝对 UTM 坐标,因此同一 burst 的任意两个日期在构造上即逐像元对齐。
共九个阶段,按顺序执行:
| 阶段 | 工具 | 产出 |
|---|---|---|
dem |
sardem |
Copernicus DEM + NASADEM 水体掩膜 |
tec |
COMPASS | 每个采集日期一个 IONEX 电离层图 |
cslc |
s1_geocode_stack.py → run_*.sh |
每个 burst-日期一个地理编码 CSLC |
static |
s1_static_layers.py |
LOS/入射角几何量,随后重采样到栈网格 |
crop |
dolphin | 按 AOI 裁剪每个 burst |
ifg |
dolphin | 干涉图(见 ifg_mode) |
stitch |
dolphin | 把每个干涉对的各 burst 拼接成一景 |
filt |
dolphin | 多视 → Goldstein 滤波 → 相干性 |
unwrap |
snaphu | 解缠相位 + 连通分量 |
选择估计方式 — ifg_mode
| 取值 | 干涉对来源 | 说明 |
|---|---|---|
phase_link(默认) |
完整协方差估计 | 所有干涉对都参与;由 pl_* 参数调节 |
network |
规则生成 | n_connections 或 max_temporal_baseline |
user_defined |
本目录的 stack_*.json |
恰好使用 select_pairs 选出的干涉对 |
默认使用 phase_link,因为它的效果有实测优势:在测试栈上得到 1 个连通分量、覆盖率 83%,而逐对网络为 3 个、55%;闭合误差从 0.157 rad 降到 0.067 rad。其参数与 dolphin 自身发布的配置一致(glrt / 0.001、半窗 7×14、ministack 15)。
在 phase_link + pl_ifg_network=single_reference(均为默认值)下,用户自定义网络会被忽略 — 估计器的输出本身就是那个网络。若希望在该模式下仍使用自己的干涉对,请设置 pl_ifg_network=bandwidth。
处理范围
AOI 会自动取自本目录下载器配置中的 intersectsWith,通常已经填好。若要改为处理整个已下载的 burst 范围,勾选 process_full_extent。注意 crop_buffer_deg(默认 0.05°)会在四周各外扩一圈 — 对较小的 AOI 而言,这个缓冲本身就可能接近整个 burst 范围,因此若希望 AOI 真正起到裁剪作用,请调小该值。
dem 与 cslc 在任何地理编码完成之前运行,因此始终使用 AOI;process_full_extent 从 crop 阶段起才生效。
其他说明
- 各阶段针对 SLURM 做了拆分 — 参见 HPC(SLURM)。
cslc是每个 burst-日期一个作业,也是耗时主体;phase_link下的ifg是单个作业,因为估计器没有逐干涉对的单元。 - 干涉图网络取各 burst 日期列表的交集。若 ASF 在某天缺少某个 burst 的数据,该日期会被剔除并明确列出,从而保证每个干涉对在所有 burst 上都能生成。
- 时序分析使用
ISCE3_Dolphin_S1_PL分析器,它同时支持两种估计方式。
Source code in src/insarhub/processor/isce3_burst.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 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 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 | |
从 NISAR L2 GSLC 数据构建干涉图栈,使用 dolphin 完成相位链接、干涉图与解缠。请搭配 NISAR_GSLC 下载器与 ISCE3_Dolphin_NISAR_PL 分析器。
与 ISCE3_Burst 使用相同的 dolphin 引擎,但不做地理编码——GSLC 本身已完成地理编码且每个日期一帧,因此 dem/tec/cslc/static 阶段被去掉,ifg 是对整个栈的单次 wrapped_phase.run。
三个阶段,依次运行:
| 阶段 | 工具 | 输出 |
|---|---|---|
ifg |
dolphin | PS + 相位链接 + 干涉图(对整个栈一次 wrapped_phase.run) |
stitch |
dolphin | 相干性 + 镶嵌(每日期单帧时几乎为空操作) |
unwrap |
snaphu | 解缠相位 + 连通分量 |
为什么这里需要 AOI 裁剪
一帧 NISAR GSLC 极大(如 69840 × 68688 像素),而 AOI 通常只是很小的窗口。ISCE3_Burst 通过 COMPASS 地理编码的 --bbox 免费获得 AOI 裁剪;ISCE3_NISAR 没有地理编码步骤,因此自行裁剪:在 ifg 阶段把每个 GSLC 的复数 SLC 子数据集按 AOI 裁成一个轻量 VRT(gdal_translate -of VRT -projwin,缓存于 workdir/cropped_gslc/),dolphin 只对该窗口做相位链接。
若不裁剪,dolphin 会处理整帧,stitch 的 gdal_merge 会在整帧栅格上耗尽内存(AOI 否则只会作为最后的输出裁剪,为时已晚)。在真实数据上,裁剪把每个输入从 69840 × 68688 降到约 8953 × 8728(缩小约 60×),把约 12 GB 的内存峰值降到几百 MB。勾选 process_full_extent 可禁用裁剪、处理整帧(需要大内存宿主机)。
配置
nisar_frequency(默认A/B)与nisar_polarization(默认HH,HV、VV、VH)选择 dolphin 读取的 GSLC 网格组 ——/science/LSAR/GSLC/grids/frequency<freq>/<pol>。在一个栈内应保持不变。AOI与ISCE3_Burst一样从下载器的intersectsWith自动填充;裁剪直接使用它。pl_*、n_connections/max_temporal_baseline与unwrap_*字段对相位链接、干涉图网络与 snaphu 的调节方式与ISCE3_Burst完全相同。
其他说明
- GSLC 下载得到的是整幅已地理编码的帧 —— 裁剪发生在处理时而非下载时,因此
slc/中的.h5产品不会被改动,可在不同 AOI 间复用。 - 运行于
insarhub-isce3-dolphin镜像(与ISCE3_Burst/Dolphin_SBAS相同);与其他处理器一样,设置container即可在无本地 ISCE3/dolphin 安装的情况下运行。
Source code in src/insarhub/processor/isce3_nisar.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | |