分析器
InSARHub 分析器模块提供 InSAR 时序分析工作流。
-
导入分析器
导入 Analyzer 类以访问所有时序分析功能
-
查看可用分析器
列出所有已注册的分析器
可用分析器
InSARHub 将 Mintpy 封装为其分析后端之一。Mintpy_SBAS_Base_Analyzer 基于可复用的基础配置类实现,提供 Mintpy 完整的 smallbaselineApp 逻辑。为用户提供类似于直接使用 MintPy 的体验,支持对处理参数和步骤进行完整自定义。
Source code in src/insarhub/analyzer/mintpy_base.py
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 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 | |
使用方法
-
使用参数创建分析器
初始化分析器实例
或analyzer = Analyzer.create('Mintpy_SBAS_Base_Analyzer', workdir="/your/work/dir", load_processor="hyp3", ....)或params = {"workdir": "/your/work/dir", "load_processor": "hyp3" ....} analyzer = Analyzer.create('Mintpy_SBAS_Base_Analyzer', **params)from insarhub.config import Mintpy_SBAS_Base_Config cfg = Mintpy_SBAS_Base_Config(workdir="/your/work/dir", load_processor="hyp3", ....) analyzer = Analyzer.create('Mintpy_SBAS_Base_Analyzer', config=cfg)基础配置
Mintpy_SBAS_Base_Config包含 MintpysmallbaselineApp.cfg的所有参数。有关每个参数的详细说明,请参阅 Mintpy 官方配置文档。Source code in
src/insarhub/config/defaultconfig.py1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170
@dataclass class Mintpy_SBAS_Base_Config: ''' Dataclass containing all configuration options for Mintpy SBAS jobs. UI metadata is stored in ``_ui_groups`` / ``_ui_fields`` and consumed by the API layer to auto-generate the settings panel. ''' # ── UI metadata consumed by the API / settings panel ───────────────────── _ui_groups: ClassVar[list] = [ {"label": "Compute Resources", "fields": ["compute_maxMemory", "compute_cluster", "compute_numWorker", "compute_config"]}, {"label": "Load Data", "fields": ["load_processor", "load_autoPath", "load_updateMode", "load_compression", "load_metaFile", "load_baselineDir", "load_unwFile", "load_corFile", "load_connCompFile", "load_intFile", "load_magFile", "load_ionUnwFile", "load_ionCorFile", "load_ionConnCompFile", "load_azOffFile", "load_rgOffFile", "load_azOffStdFile", "load_rgOffStdFile", "load_offSnrFile", "load_demFile", "load_lookupYFile", "load_lookupXFile", "load_incAngleFile", "load_azAngleFile", "load_shadowMaskFile", "load_waterMaskFile", "load_bperpFile", "subset_yx", "subset_lalo", "multilook_method", "multilook_ystep", "multilook_xstep"]}, {"label": "Modify Network", "fields": ["network_tempBaseMax", "network_perpBaseMax", "network_connNumMax", "network_startDate", "network_endDate", "network_excludeDate", "network_excludeDate12", "network_excludeIfgIndex", "network_referenceFile", "network_coherenceBased", "network_minCoherence", "network_areaRatioBased", "network_minAreaRatio", "network_keepMinSpanTree", "network_maskFile", "network_aoiYX", "network_aoiLALO"]}, {"label": "Reference Point", "fields": ["reference_yx", "reference_lalo", "reference_maskFile", "reference_coherenceFile", "reference_minCoherence"]}, {"label": "Unwrap Error Correction", "fields": ["unwrapError_method", "unwrapError_waterMaskFile", "unwrapError_connCompMinArea", "unwrapError_numSample", "unwrapError_ramp", "unwrapError_bridgePtsRadius"]}, {"label": "Network Inversion", "fields": ["networkInversion_weightFunc", "networkInversion_waterMaskFile", "networkInversion_minNormVelocity", "networkInversion_maskDataset", "networkInversion_maskThreshold", "networkInversion_minRedundancy", "networkInversion_minTempCoh", "networkInversion_minNumPixel", "networkInversion_shadowMask"]}, {"label": "Solid Earth Tides", "fields": ["solidEarthTides"]}, {"label": "Ionosphere Correction", "fields": ["ionosphericDelay_method", "ionosphericDelay_excludeDate", "ionosphericDelay_excludeDate12"]}, {"label": "Troposphere Correction", "fields": ["troposphericDelay_method", "troposphericDelay_weatherModel", "troposphericDelay_weatherDir", "troposphericDelay_polyOrder", "troposphericDelay_looks", "troposphericDelay_minCorrelation", "troposphericDelay_gacosDir"]}, {"label": "Deramp", "fields": ["deramp", "deramp_maskFile"]}, {"label": "Topography Correction", "fields": ["topographicResidual", "topographicResidual_polyOrder", "topographicResidual_phaseVelocity", "topographicResidual_stepDate", "topographicResidual_excludeDate", "topographicResidual_pixelwiseGeometry"]}, {"label": "Residual RMS", "fields": ["residualRMS_maskFile", "residualRMS_deramp", "residualRMS_cutoff"]}, {"label": "Reference Date", "fields": ["reference_date"]}, {"label": "Velocity", "fields": ["timeFunc_startDate", "timeFunc_endDate", "timeFunc_excludeDate", "timeFunc_polynomial", "timeFunc_periodic", "timeFunc_stepDate", "timeFunc_exp", "timeFunc_log", "timeFunc_uncertaintyQuantification", "timeFunc_timeSeriesCovFile", "timeFunc_bootstrapCount"]}, {"label": "Geocode", "fields": ["geocode", "geocode_SNWE", "geocode_laloStep", "geocode_interpMethod", "geocode_fillValue"]}, {"label": "Google earth", "fields": ["save_kmz"]}, {"label": "Hdfeos5", "fields": ["save_hdfEos5", "save_hdfEos5_update", "save_hdfEos5_subset"]}, {"label": "Plot", "fields": ["plot", "plot_dpi", "plot_maxMemory"]}, {"label": "HPC (SLURM)", "fields": ["hpc_mode"]}, {"label": "Container", "fields": ["container"]}, ] _ui_fields: ClassVar[dict] = { # Compute Resources "compute_maxMemory": {"type": "number", "min": 1, "max": 512, "step": 1, "default": max(1, _env['memory'] - 1), "hint": "Max memory in GB to allocate (default: system memory minus 1 GB reserve)"}, "compute_cluster": {"type": "select", "options": ["local", "slurm", "pbs", "lsf", "oar", "sge", "none"], "hint": "Cluster type for parallel processing (local = dask LocalCluster)"}, "compute_numWorker": {"type": "number", "min": 1, "max": 64, "step": 1, "default": _env['cpu'], "hint": "Number of workers for parallel processing"}, "compute_config": {"type": "text", "hint": "Configuration file for dask distributed cluster"}, # Load Data "load_processor": {"type": "select", "options": ["auto", "isce", "aria", "hyp3", "gmtsar", "snap", "gamma", "roipac"], "hint": "SAR processor of the input dataset"}, "load_autoPath": {"type": "text", "hint": "Auto-detect input file paths based on processor type (auto)"}, "load_updateMode": {"type": "select", "options": ["auto", "yes", "no"], "hint": "Skip re-loading if file already exists with same dataset and metadata"}, "load_compression": {"type": "select", "options": ["auto", "lzf", "gzip", "no"], "hint": "Data compression for HDF5 files"}, "load_metaFile": {"type": "text", "hint": "Metadata file path (ISCE only), e.g. reference/IW1.xml"}, "load_baselineDir": {"type": "text", "hint": "Baseline directory (ISCE only), e.g. baselines"}, "load_unwFile": {"type": "text", "hint": "Unwrapped interferogram file(s), e.g. ./../pairs/*/filt*.unw"}, "load_corFile": {"type": "text", "hint": "Coherence file(s), e.g. ./../pairs/*/filt*.cor"}, "load_connCompFile": {"type": "text", "hint": "Connected components file(s), e.g. ./../pairs/*/filt*.unw.conncomp"}, "load_intFile": {"type": "text", "hint": "Wrapped interferogram file(s), e.g. ./../pairs/*/filt*.int"}, "load_magFile": {"type": "text", "hint": "Interferogram magnitude file(s), e.g. ./../pairs/*/filt*.int"}, "load_ionUnwFile": {"type": "text", "hint": "Unwrapped ionospheric phase file(s)"}, "load_ionCorFile": {"type": "text", "hint": "Ionospheric coherence file(s)"}, "load_ionConnCompFile":{"type": "text", "hint": "Ionospheric connected component file(s)"}, "load_azOffFile": {"type": "text", "hint": "Azimuth offset file(s)"}, "load_rgOffFile": {"type": "text", "hint": "Range offset file(s)"}, "load_azOffStdFile": {"type": "text", "hint": "Azimuth offset standard deviation file(s)"}, "load_rgOffStdFile": {"type": "text", "hint": "Range offset standard deviation file(s)"}, "load_offSnrFile": {"type": "text", "hint": "Offset SNR file(s)"}, "load_demFile": {"type": "text", "hint": "DEM file in radar/geo coordinates, e.g. ./inputs/geometryRadar.h5"}, "load_lookupYFile": {"type": "text", "hint": "Lookup table lat/y file, e.g. ./inputs/geometryGeo.h5"}, "load_lookupXFile": {"type": "text", "hint": "Lookup table lon/x file"}, "load_incAngleFile": {"type": "text", "hint": "Incidence angle file"}, "load_azAngleFile": {"type": "text", "hint": "Azimuth angle file"}, "load_shadowMaskFile": {"type": "text", "hint": "Shadow/layover mask file"}, "load_waterMaskFile": {"type": "text", "hint": "Water mask file"}, "load_bperpFile": {"type": "text", "hint": "Perpendicular baseline file"}, "subset_yx": {"type": "text", "hint": "Subset in row/column, e.g. 1200:2000,0:2000"}, "subset_lalo": {"type": "text", "hint": "Subset in lat/lon, e.g. 37.5:38.5,-118.5:-117.5"}, "multilook_method": {"type": "select", "options": ["auto", "mean", "nearest", "no"], "hint": "Multilook method: mean, nearest, or no for skip"}, "multilook_ystep": {"type": "auto_number", "hint": "Multilook factor in y/azimuth direction"}, "multilook_xstep": {"type": "auto_number", "hint": "Multilook factor in x/range direction"}, # Modify Network "network_tempBaseMax": {"type": "auto_number", "hint": "Maximum temporal baseline in days"}, "network_perpBaseMax": {"type": "auto_number", "hint": "Maximum perpendicular baseline in meters"}, "network_connNumMax": {"type": "auto_number", "hint": "Maximum number of nearest-neighbor connections"}, "network_startDate": {"type": "text", "hint": "Start date in YYYYMMDD format"}, "network_endDate": {"type": "text", "hint": "End date in YYYYMMDD format"}, "network_excludeDate": {"type": "text", "hint": "Date(s) to exclude in YYYYMMDD, separated by space"}, "network_excludeDate12": {"type": "text", "hint": "Interferogram date pairs to exclude, e.g. 20150115_20150127"}, "network_excludeIfgIndex": {"type": "text", "hint": "Index(es) of interferograms to exclude, e.g. 2 8 230"}, "network_referenceFile": {"type": "text", "hint": "Reference network file (pairs in date12_list.txt format)"}, "network_coherenceBased": {"type": "select", "options": ["auto", "yes", "no"], "hint": "Enable coherence-based network modification"}, "network_minCoherence": {"type": "adaptive_number", "min": 0, "max": 1, "step": 0.05, "hint": "Minimum coherence for coherence-based modification. " "'adaptive' = derive from this stack; 'auto' = MintPy 0.7"}, "network_areaRatioBased": {"type": "select", "options": ["auto", "yes", "no"], "hint": "Enable area-ratio-based network modification (ECR method)"}, "network_minAreaRatio": {"type": "auto_number", "hint": "Minimum area ratio for area-ratio-based modification"}, "network_keepMinSpanTree": {"type": "select", "options": ["auto", "yes", "no"], "hint": "Keep the minimum spanning tree of the network"}, "network_maskFile": {"type": "text", "hint": "Mask file for coherence-based network modification"}, "network_aoiYX": {"type": "text", "hint": "AOI in row/column for coherence calculation, e.g. 100:200,300:400"}, "network_aoiLALO": {"type": "text", "hint": "AOI in lat/lon for coherence calculation, e.g. 37.5:38.0,-118.0:-117.5"}, # Reference Point "reference_yx": {"type": "text", "hint": "Reference point in row/column, e.g. 257 151"}, "reference_lalo": {"type": "text", "hint": "Reference point in lat/lon, e.g. 37.65 -118.45"}, "reference_maskFile": {"type": "text", "hint": "Mask file for reference point selection"}, "reference_coherenceFile": {"type": "text", "hint": "Coherence file for reference point selection"}, "reference_minCoherence": {"type": "adaptive_number", "min": 0, "max": 1, "step": 0.05, "hint": "Minimum coherence for reference point selection. " "'adaptive' = derive from this stack; 'auto' = MintPy 0.85"}, # Unwrap Error "unwrapError_method": {"type": "select", "options": ["auto", "bridging", "phase_closure", "bridging+phase_closure", "no"], "hint": "Phase unwrapping error correction method"}, "unwrapError_waterMaskFile": {"type": "text", "hint": "Water mask file for bridging method"}, "unwrapError_connCompMinArea": {"type": "auto_number", "hint": "Minimum area in pixels for a connected component"}, "unwrapError_numSample": {"type": "auto_number", "hint": "Number of randomly sampled triplets for phase_closure method"}, "unwrapError_ramp": {"type": "select", "options": ["auto", "linear", "quadratic", "no"], "hint": "Remove ramp before bridging"}, "unwrapError_bridgePtsRadius": {"type": "auto_number", "hint": "Radius in pixels to search for bridge points"}, # Network Inversion "networkInversion_weightFunc": {"type": "select", "options": ["auto", "var", "fim", "no"], "hint": "var = spatial variance, fim = Fisher info matrix, no = uniform"}, "networkInversion_waterMaskFile": {"type": "text", "hint": "Water mask file applied before inversion"}, "networkInversion_minNormVelocity": {"type": "select", "options": ["auto", "yes", "no"], "hint": "Minimize L2-norm of velocity (vs. timeseries) in SBAS inversion"}, "networkInversion_maskDataset": {"type": "text", "hint": "Dataset for masking, e.g. coherence or connectComponent"}, "networkInversion_maskThreshold": {"type": "adaptive_number", "min": 0, "max": 1, "step": 0.05, "hint": "Threshold for maskDataset to mask unwrapped phase. " "'adaptive' = derive from this stack; 'auto' = MintPy 0.4"}, "networkInversion_minRedundancy": {"type": "auto_number", "hint": "Minimum redundancy of interferograms per pixel"}, "networkInversion_minTempCoh": {"type": "auto_number", "hint": "Minimum temporal coherence for pixel masking"}, "networkInversion_minNumPixel": {"type": "auto_number", "hint": "Minimum number of coherent pixels to proceed"}, "networkInversion_shadowMask": {"type": "select", "options": ["auto", "yes", "no"], "hint": "Use shadow mask from geometry"}, # Solid Earth Tides "solidEarthTides": {"type": "select", "options": ["auto", "yes", "no"], "hint": "Correct for solid earth tides using pysolid"}, # Ionosphere "ionosphericDelay_method": {"type": "select", "options": ["auto", "split_spectrum", "no"], "hint": "Ionospheric delay correction method"}, "ionosphericDelay_excludeDate": {"type": "text", "hint": "Dates to exclude from ionospheric correction, e.g. 20180202 20180414"}, "ionosphericDelay_excludeDate12":{"type": "text", "hint": "Interferogram date pairs to exclude from ionospheric correction"}, # Troposphere "troposphericDelay_method": {"type": "select", "options": ["auto", "pyaps", "gacos", "height_correlation", "no"], "hint": "Tropospheric delay correction method"}, "troposphericDelay_weatherModel": {"type": "select", "options": ["auto", "ERA5", "ERA5T", "MERRA", "NARR"], "hint": "Weather model for pyaps (ERA5 recommended)"}, "troposphericDelay_weatherDir": {"type": "text", "hint": "Directory of downloaded weather data files for pyaps"}, "troposphericDelay_polyOrder": {"type": "auto_number", "hint": "Polynomial order for height-correlation method"}, "troposphericDelay_looks": {"type": "auto_number", "hint": "Extra multilook factor for height-correlation estimation"}, "troposphericDelay_minCorrelation": {"type": "auto_number", "hint": "Minimum correlation between height and phase"}, "troposphericDelay_gacosDir": {"type": "text", "hint": "Directory of GACOS delay files"}, # Deramp "deramp": {"type": "select", "options": ["auto", "linear", "quadratic", "no"], "hint": "Remove phase ramp in x/y direction"}, "deramp_maskFile": {"type": "text", "hint": "Mask file for ramp estimation"}, # Topography "topographicResidual": {"type": "select", "options": ["auto", "yes", "no"], "hint": "Correct topographic residuals (DEM error)"}, "topographicResidual_polyOrder": {"type": "auto_number", "hint": "Polynomial order for DEM error estimation"}, "topographicResidual_phaseVelocity": {"type": "select", "options": ["auto", "yes", "no"], "hint": "Minimize phase velocity (not phase) in DEM error inversion"}, "topographicResidual_stepDate": {"type": "text", "hint": "Step function date(s) for co-seismic jumps, e.g. 20140911"}, "topographicResidual_excludeDate": {"type": "text", "hint": "Dates to exclude in DEM error inversion"}, "topographicResidual_pixelwiseGeometry":{"type": "select", "options": ["auto", "yes", "no"], "hint": "Use pixel-wise geometry in DEM error estimation"}, # Residual RMS "residualRMS_maskFile": {"type": "text", "hint": "Mask file for residual phase quality assessment"}, "residualRMS_deramp": {"type": "select", "options": ["auto", "linear", "quadratic", "no"], "hint": "Remove ramp before RMS calculation"}, "residualRMS_cutoff": {"type": "auto_number", "hint": "Cutoff value in RMS threshold for outlier date detection"}, # Reference Date "reference_date": {"type": "text", "hint": "Reference date in YYYYMMDD; 'auto' = first date with full coherence"}, # Velocity "timeFunc_startDate": {"type": "text", "hint": "Start date of the time function fit"}, "timeFunc_endDate": {"type": "text", "hint": "End date of the time function fit"}, "timeFunc_excludeDate": {"type": "text", "hint": "Date(s) to exclude from time function fitting"}, "timeFunc_polynomial": {"type": "auto_number", "hint": "Polynomial order: 1 = linear velocity, 2 = acceleration"}, "timeFunc_periodic": {"type": "text", "hint": "Periodic periods in years, e.g. 1.0 0.5 for annual+semi-annual"}, "timeFunc_stepDate": {"type": "text", "hint": "Step function date(s), e.g. 20161231 for co-seismic jump"}, "timeFunc_exp": {"type": "text", "hint": "Exponential decay: onset_date char_time, e.g. 20181026 60"}, "timeFunc_log": {"type": "text", "hint": "Logarithmic relaxation: onset_date char_time, e.g. 20181026 60"}, "timeFunc_uncertaintyQuantification":{"type": "select", "options": ["auto", "bootstrap", "residue"], "hint": "Method for velocity uncertainty quantification"}, "timeFunc_timeSeriesCovFile": {"type": "text", "hint": "Time-series covariance file for uncertainty propagation"}, "timeFunc_bootstrapCount": {"type": "auto_number", "hint": "Number of bootstrap iterations"}, # Geocode "geocode": {"type": "select", "options": ["auto", "yes", "no"], "hint": "Geocode datasets in radar coordinates to geo coordinates"}, "geocode_SNWE": {"type": "text", "hint": "Bounding box: south north west east, e.g. 31 40 -115 -100"}, "geocode_laloStep": {"type": "text", "hint": "Output pixel size in lat/lon, e.g. -0.000833 0.000833 (≈90 m)"}, "geocode_interpMethod": {"type": "select", "options": ["auto", "nearest", "linear"], "hint": "Interpolation method for geocoding"}, "geocode_fillValue": {"type": "text", "hint": "Fill value for pixels outside coverage, e.g. nan or 0"}, # Google Earth "save_kmz": {"type": "select", "options": ["auto", "yes", "no"], "hint": "Save geocoded velocity to Google Earth KMZ file"}, # HDF-EOS5 "save_hdfEos5": {"type": "select", "options": ["auto", "yes", "no"], "hint": "Save time-series to HDF-EOS5 format"}, "save_hdfEos5_update": {"type": "select", "options": ["auto", "yes", "no"], "hint": "Update HDF-EOS5 file if already exists"}, "save_hdfEos5_subset": {"type": "select", "options": ["auto", "yes", "no"], "hint": "Save subset of HDF-EOS5 file"}, # Plot "plot": {"type": "select", "options": ["auto", "yes", "no"], "hint": "Plot results during processing"}, "plot_dpi": {"type": "auto_number", "hint": "Figure DPI for saved plots"}, "plot_maxMemory": {"type": "auto_number", "hint": "Maximum memory in GB for plot_smallbaseline.py"}, "hpc_mode": {"type": "bool", "hint": "Submit the full MintPy run as a single sbatch job. " "SLURM resources come from sbatch_options.json (step \"17\": \"SBAS\") " "in the workdir, generated automatically on first use."}, "container": {"type": "text", "hint": "Path to a .sif/Apptainer image or a Docker image reference with insarhub " "installed — re-runs this command inside the container instead of on the " "host. Not remembered between runs; pass again for subsequent runs."}, } # ───────────────────────────────────────────────────────────────────────── name: str = "Mintpy_SBAS_Base_Config" workdir: Path | str = field(default_factory=lambda: Path.cwd()) debug: bool = False hpc_mode: bool = False container: str | None = None # Default container image used when `--container` is passed with no value. # MintPy analyzers need MintPy + (for ISCE2) ISCE2 -- the isce2 image has both. container_default: str = "ghcr.io/jldz9/insarhub-isce2-mintpy:0.4.0" ## computing resource configuration # System memory minus a 1 GB reserve for the OS/scheduler: giving dask the # FULL machine RAM over-subscribes every worker and OOM-kills them # ("Lost all workers"). 31 G -> 30 G on a 32 G box. compute_maxMemory : float | int = max(1, _env['memory'] - 1) compute_cluster : str = 'local' # Mintpy's slurm parallel processing is buggy, so we will handle parallel processing with dask instead. Switch to none to turn off parallel processing to save memory. compute_numWorker : int = _env['cpu'] compute_config: str = 'none' ## Load data load_processor: str = 'auto' load_autoPath: str = 'auto' load_updateMode: str = 'no' load_compression: str = 'auto' ##---------for ISCE only: load_metaFile: str = 'auto' load_baselineDir: str = 'auto' ##---------interferogram stack: load_unwFile: str = 'auto' load_corFile: str = 'auto' load_connCompFile: str = 'auto' load_intFile: str = 'auto' load_magFile: str = 'auto' ##---------ionosphere stack (optional): load_ionUnwFile: str = 'auto' load_ionCorFile: str = 'auto' load_ionConnCompFile: str = 'auto' ##---------offset stack (optional): load_azOffFile: str = 'auto' load_rgOffFile: str = 'auto' load_azOffStdFile: str = 'auto' load_rgOffStdFile: str = 'auto' load_offSnrFile: str = 'auto' ##---------geometry: load_demFile: str = 'auto' load_lookupYFile: str = 'auto' load_lookupXFile: str = 'auto' load_incAngleFile: str = 'auto' load_azAngleFile: str = 'auto' load_shadowMaskFile: str = 'auto' load_waterMaskFile: str = 'auto' load_bperpFile: str = 'auto' ##---------subset (optional): subset_yx: str = 'auto' subset_lalo: str = 'auto' ##---------multilook (optional): multilook_method: str = 'auto' multilook_ystep: str | int = 'auto' multilook_xstep: str | int= 'auto' # 2. Modify Network network_tempBaseMax: str | float = 'auto' network_perpBaseMax: str | float = 'auto' network_connNumMax: str | int = 'auto' network_startDate: str = 'auto' network_endDate: str = 'auto' network_excludeDate: str = 'auto' network_excludeDate12: str = 'auto' network_excludeIfgIndex: str = 'auto' network_referenceFile: str = 'auto' ## 2) Data-driven network modification network_coherenceBased: str = 'auto' network_minCoherence: str |float = 'auto' ## b - Effective Coherence Ratio network modification = (threshold + MST) by default network_areaRatioBased: str = 'auto' network_minAreaRatio: str |float= 'auto' ## Additional common parameters for the 2) data-driven network modification network_keepMinSpanTree: str = 'auto' network_maskFile: str = 'auto' network_aoiYX: str = 'auto' network_aoiLALO: str = 'auto' # 3. Reference Point reference_yx: str = 'auto' reference_lalo: str = 'auto' reference_maskFile: str = 'auto' reference_coherenceFile: str = 'auto' reference_minCoherence: str |float = 'auto' # 4. Correct Unwrap Error unwrapError_method: str = 'auto' unwrapError_waterMaskFile: str = 'auto' unwrapError_connCompMinArea: str |float = 'auto' ## phase_closure options: unwrapError_numSample: str | int= 'auto' ## bridging options: unwrapError_ramp: str = 'auto' unwrapError_bridgePtsRadius: str | int= 'auto' # 5. Invert Network networkInversion_weightFunc: str = 'auto' networkInversion_waterMaskFile: str = 'auto' networkInversion_minNormVelocity: str = 'auto' ## mask options for unwrapPhase of each interferogram before inversion (recommend if weightFunct=no): networkInversion_maskDataset: str = 'auto' networkInversion_maskThreshold: str | float = 'auto' networkInversion_minRedundancy: str | float = 'auto' ## Temporal coherence is calculated and used to generate the mask as the reliability measure networkInversion_minTempCoh: str | float = 'auto' networkInversion_minNumPixel: str | int = 'auto' networkInversion_shadowMask: str = 'auto' # 6. Correct SET (Solid Earth Tides) solidEarthTides: str = 'auto' # 7. Correct Ionosphere ionosphericDelay_method: str = 'auto' ionosphericDelay_excludeDate: str = 'auto' ionosphericDelay_excludeDate12: str = 'auto' # 8. Correct Troposphere troposphericDelay_method: str = 'auto' ## Notes for pyaps: troposphericDelay_weatherModel: str = 'auto' troposphericDelay_weatherDir: str = 'auto' ## Notes for height_correlation: troposphericDelay_polyOrder: str | int = 'auto' troposphericDelay_looks: str | int = 'auto' troposphericDelay_minCorrelation: str | float = 'auto' ## Notes for gacos: troposphericDelay_gacosDir: str = 'auto' # 9. Deramp deramp: str = 'auto' deramp_maskFile: str = 'auto' # 10. Correct Topography topographicResidual: str = 'auto' topographicResidual_polyOrder: str = 'auto' topographicResidual_phaseVelocity: str = 'auto' topographicResidual_stepDate: str = 'auto' topographicResidual_excludeDate: str = 'auto' topographicResidual_pixelwiseGeometry: str = 'auto' # 11.1 Residual RMS residualRMS_maskFile: str = 'auto' residualRMS_deramp: str = 'auto' residualRMS_cutoff: str | float = 'auto' # 11.2 Reference Date reference_date: str = 'auto' # 12. Velocity timeFunc_startDate: str = 'auto' timeFunc_endDate: str = 'auto' timeFunc_excludeDate: str = 'auto' ## Fit a suite of time functions timeFunc_polynomial: str | int = 'auto' timeFunc_periodic: str = 'auto' timeFunc_stepDate: str = 'auto' timeFunc_exp: str = 'auto' timeFunc_log: str = 'auto' ## Uncertainty quantification methods: timeFunc_uncertaintyQuantification: str = 'auto' timeFunc_timeSeriesCovFile: str = 'auto' timeFunc_bootstrapCount: str | int = 'auto' # 13.1 Geocode geocode: str = 'auto' geocode_SNWE: str = 'auto' geocode_laloStep: str = 'auto' geocode_interpMethod: str = 'auto' geocode_fillValue: str | float = 'auto' # 13.2 Google Earth save_kmz: str = 'auto' # 13.3 HDFEOS5 save_hdfEos5: str = 'auto' save_hdfEos5_update: str = 'auto' save_hdfEos5_subset: str = 'auto' # 13.4 Plot plot: str = 'auto' plot_dpi: str | int = 'auto' plot_maxMemory: str | int = 'auto' def __post_init__(self): if isinstance(self.workdir, str): self.workdir = Path(self.workdir).expanduser().resolve() def write_mintpy_config(self, outpath: Union[Path, str]): """ Writes the dataclass to a mintpy .cfg file, excluding operational parameters that MintPy doesn't recognize. """ outpath = Path(outpath).expanduser().resolve() outpath.parent.mkdir(parents=True, exist_ok=True) exclude_fields = ['name', 'workdir', 'debug'] # InSARHub stores these space-separated (e.g. "37.84 -112.82", # matching --reference_lalo CLI input), but MintPy's own template # reader does value.split(',') -- it requires "lat,lon"/"y,x". comma_join_fields = ['reference_yx', 'reference_lalo'] with open(outpath, 'w') as f: f.write("## MintPy Config File Generated via InSARHub\n") for key, value in asdict(self).items(): if key in exclude_fields: continue if key in comma_join_fields and isinstance(value, str) and ',' not in value: parts_val = value.split() if len(parts_val) == 2: value = ",".join(parts_val) parts = key.split('_') if len(parts) > 1: mintpy_key = f"mintpy.{parts[0]}.{'.'.join(parts[1:])}" else: mintpy_key = f"mintpy.{parts[0]}" f.write(f"{mintpy_key:<40} = {value}\n") return Path(outpath).resolve()自适应相干性阈值
有三个相干性参数默认取字面值
"adaptive"而非固定数值。在prep_data期间,InSARHub 会检查堆叠实际的相干性分布,并将每个参数解析写入.mintpy.cfg:参数 解析依据 上限 network_minCoherence在保持网络连通且冗余的前提下最严格的阈值 ≤ 0.6 networkInversion_maskThreshold保留可靠像素比例的分位数 ≤ 0.6 reference_minCoherence第 98 百分位(最低 0.30),用于稳定的参考点 ≤ 0.85 仅当数据低于上限时才会启用自适应;干净、高相干的堆叠直接取上限值。将其中任一参数设为明确的数值即可完全覆盖自适应逻辑。
-
运行
根据提供的配置运行 Mintpy 时序分析
Parameters:
Name Type Description Default stepslist[str] | NoneList of MintPy processing steps to execute. If None, the default full workflow is executed: [ 'load_data', 'modify_network', 'reference_point', 'quick_overview', 'correct_unwrap_error', 'invert_network', 'correct_LOD', 'correct_SET', 'correct_ionosphere', 'correct_troposphere', 'deramp', 'correct_topography', 'residual_RMS', 'reference_date', 'velocity', 'geocode', 'google_earth', 'hdfeos5' ]
NoneRaises:
Type Description RuntimeErrorIf tropospheric delay method requires CDS authorization and authorization fails.
ExceptionPropagates exceptions raised during MintPy execution.
-
提交(HPC / SLURM 模式)
生成一个涵盖所有选定步骤的单个
sbatch脚本并提交至 SLURM。Hyp3_Mintpy_SBAS和ISCE2_Mintpy_SBAS均继承此方法。# 将完整流程作为一个 SLURM 作业提交 analyzer.submit_hpc() # 仅提交特定步骤 analyzer.submit_hpc(steps=["velocity", "geocode"])脚本写入
<workdir>/mintpy/mintpy_sbas.sbatch,作业状态保存至mintpy/mintpy_job.json。SLURM 资源来自<workdir>/sbatch_options.json的"17"步骤键 — 与ISCE2_S1自身 HPC 提交(步骤01–16)使用同一个文件,因为处理器和分析器通常共用同一工作目录。默认值:time=24:00:00、ntasks=1、cpus_per_task=16、mem=128G、partition=all。submit_hpc()成功时返回 SLURM 作业 ID 字符串;若sbatch_options.json刚被创建(或补充了缺失的"17"条目),则返回None— 调用方应检查None并停止,而不是将其当作提交成功处理:cfg = Mintpy_SBAS_Base_Config( workdir="/your/work/dir", load_processor="hyp3", hpc_mode=True, ) analyzer = Analyzer.create('Hyp3_Mintpy_SBAS', config=cfg) job_id = analyzer.submit_hpc() if job_id is None: print("sbatch_options.json 刚被创建/更新 — 请先检查,再重新提交。")直接编辑
sbatch_options.json中的"17"步骤以更改资源(例如{"17": {"time": "48:00:00", "mem": "256G", "partition": "gpu"}}),然后再次调用submit_hpc()。 -
绘图
基于已计算完成的结果,(重新)生成
mintpy/pic/下的图片,不重新计算任何内容。run()自身的自动绘图只在单次调用中涵盖一个以上步骤时才会触发(与 MintPy 自身的 CLI 语义一致)— CLI 和 GUI 在内部都是逐步执行每个步骤以提供逐步进度反馈,因此该条件在那里实际上永远不会触发;plot()是显式的独立替代方案,两者都在各自的步骤序列完成后调用一次(或按需调用,例如调整了与绘图相关的配置值后,只想重新生成图片而不重新运行整个流程)。 -
无需本地安装 MintPy(或 ISCE2)
将
container字段设置为 Apptainer/Singularity.sif镜像的路径,或 Docker 镜像引用(name[:tag]),run()/prep_data()/submit_hpc()都会在容器内而非宿主机上重新执行同一个insarhub analyzer ...CLI 调用 — 工作目录会以相同路径绑定挂载,因此输出会像本机运行一样落在原处。容器镜像只需在 MintPy(ISCE2_Mintpy_SBAS还需要 ISCE2)旁额外安装insarhub(可参考仓库根目录的docker/dev/Dockerfile.isce2-mintpy作为现成示例)。cfg = Mintpy_SBAS_Base_Config( workdir="/your/work/dir", load_processor="hyp3", container="ghcr.io/jldz9/insarhub-isce2-mintpy:0.4.0", ) analyzer = Analyzer.create('Hyp3_Mintpy_SBAS', config=cfg) analyzer.run()container是按次调用的设置,而非持久化配置 — 之后每次调用若也要在容器内运行,都需要再次设置。 -
清理
删除时序处理过程中生成的中间处理文件
Hyp3_Mintpy_SBAS 是专门为处理 HyP3 InSAR 产品时序数据而预配置的分析器,扩展自 Mintpy_SBAS_Base_Analyzer。
Source code in src/insarhub/analyzer/hyp3_mintpy_s1_sbas.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 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 211 212 213 214 | |
使用方法
-
使用参数创建分析器
初始化分析器实例
或 或 -
准备数据
将从 HyP3 服务器下载的干涉图数据准备至 MintPy
Raises:
Type Description FileNotFoundErrorIf required input files are missing.
ValueErrorIf no common overlap region can be determined among rasters.
ExceptionPropagates any unexpected errors during preprocessing.
Source code in
src/insarhub/analyzer/hyp3_mintpy_s1_sbas.py -
运行
根据提供的配置运行 Mintpy 时序分析
Parameters:
Name Type Description Default stepslist[str] | NoneList of MintPy processing steps to execute. If None, the default full workflow is executed: [ 'load_data', 'modify_network', 'reference_point', 'quick_overview', 'correct_unwrap_error', 'invert_network', 'correct_LOD', 'correct_SET', 'correct_ionosphere', 'correct_troposphere', 'deramp', 'correct_topography', 'residual_RMS', 'reference_date', 'velocity', 'geocode', 'google_earth', 'hdfeos5' ]
NoneRaises:
Type Description RuntimeErrorIf tropospheric delay method requires CDS authorization and authorization fails.
ExceptionPropagates exceptions raised during MintPy execution.
Source code in
src/insarhub/analyzer/mintpy_base.py679 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
def run(self, steps=None): """ Run the MintPy SBAS time-series analysis workflow. This method writes the MintPy configuration file, optionally authorizes CDS access for tropospheric correction, and executes the selected MintPy processing steps using TimeSeriesAnalysis. Args: steps (list[str] | None, optional): List of MintPy processing steps to execute. If None, the default full workflow is executed: [ 'load_data', 'modify_network', 'reference_point', 'quick_overview', 'correct_unwrap_error', 'invert_network', 'correct_LOD', 'correct_SET', 'correct_ionosphere', 'correct_troposphere', 'deramp', 'correct_topography', 'residual_RMS', 'reference_date', 'velocity', 'geocode', 'google_earth', 'hdfeos5' ] Raises: RuntimeError: If tropospheric delay method requires CDS authorization and authorization fails. Exception: Propagates exceptions raised during MintPy execution. Notes: - If `troposphericDelay_method` is set to 'pyaps', CDS authorization is performed before running MintPy. - The configuration file is written to `self.cfg_path`. - Processing is executed inside `self.workdir`. - This method wraps MintPy TimeSeriesAnalysis for SBAS workflows. """ # HPC: hand the whole analysis to SLURM instead of running MintPy in this # process -- mirrors processor.submit()'s hpc dispatch so the API is # symmetric (set hpc_mode, call run()). Returns submit_hpc()'s job id, or # None if it just wrote sbatch_options.json for review (call run() again # after tuning it). The sbatch body re-invokes `insarhub analyzer ... run` # WITHOUT --hpc-mode (hpc_mode is skipped by _serialize_config_overrides), # so the compute-node run() sees hpc_mode=False and runs locally -- no # resubmission loop. Guarded off inside a container child for the same # reason (hpc_mode isn't carried in there either). if getattr(self.config, "hpc_mode", False) and not os.environ.get("INSARHUB_CONTAINER_CHILD"): return self.submit_hpc(steps=steps) # not INSARHUB_CONTAINER_CHILD: run the steps locally when already inside # the container (see prep_data's guard for the full rationale). if self.config.container and not os.environ.get("INSARHUB_CONTAINER_CHILD"): return self._run_via_container(steps) run_steps = steps or [ 'load_data', 'modify_network', 'reference_point', 'quick_overview', 'correct_unwrap_error', 'invert_network', 'correct_LOD', 'correct_SET', 'correct_ionosphere', 'correct_troposphere', 'deramp', 'correct_topography', 'residual_RMS', 'reference_date', 'velocity', 'geocode', 'google_earth', 'hdfeos5' ] # prep_data is what fills mintpy.load.* with the real geocoded file # paths (plus the resolved adaptive thresholds and HEADING). The GUI # lets users deselect it, and load_data can be run on its own, so # self-heal: if it isn't in this run and the cfg still has no resolved # load paths, run prep_data first. Otherwise MintPy finds no files, # writes no ifgramStack.h5, and load_data fails. prep_data is cheap to # repeat (cached DEM / baselines). if 'prep_data' not in run_steps and not self._cfg_load_paths_resolved(): print(f"{Fore.YELLOW}mintpy.load.* not resolved yet — running prep_data " f"first to set the file locations.{Fore.RESET}") self.prep_data() if not self.cfg_path.exists(): print(f"{Fore.YELLOW}Warning: .mintpy.cfg not found — writing config now. " f"If this is a Hyp3_Mintpy_SBAS run, make sure 'prep_data' (or '--step prep') " f"was completed first so load parameters are correct.{Fore.RESET}") # Re-apply the (possibly CLI-/GUI-overridden) config to .mintpy.cfg on # every run, not just the first: prep_data creates the file, so without # this any parameter passed to a later step (e.g. --networkInversion_ # minTempCoh on invert_network) was silently dropped because the stale # file already existed. Preserves the load paths / HEADING prep_data # computed into the file (they are not on self.config here). self._sync_runtime_cfg() if self.config.troposphericDelay_method == 'pyaps' and 'correct_troposphere' in run_steps: self._cds_authorize() print(f'{Style.BRIGHT}{Fore.MAGENTA}Running MintPy Analysis...{Fore.RESET}') self.mintpy_dir.mkdir(parents=True, exist_ok=True) _patch_mintpy_plot_bugs() from mintpy.smallbaselineApp import TimeSeriesAnalysis app = TimeSeriesAnalysis(self.cfg_path.as_posix(), self.mintpy_dir.as_posix()) try: app.open() app.run(steps=run_steps) if 'geocode' in run_steps: self._geocode_diagnostic_files(self.mintpy_dir) # Mirrors mintpy.smallbaselineApp's own CLI wrapper # (run_smallbaselineApp()), which calls these two after run() -- # plot_result() is what actually populates mintpy_dir/pic/, and # close() is what restores the process's working directory after # open() changed into mintpy_dir (skipping it would leave a # long-running server process permanently cd'd into the last # analyzed folder). if app.template.get('mintpy.plot') and len(run_steps) > 1: self._plot_result_safe(app) finally: app.close() -
提交(HPC / SLURM 模式)
继承自
Mintpy_SBAS_Base_Analyzer,将完整 MintPy 流程作为单个 sbatch 作业提交。 -
清理
删除时序处理过程中生成的中间处理文件
ISCE2_Mintpy_SBAS 分析器扩展自 Mintpy_SBAS_Base_Analyzer,专为 ISCE2 stackSentinel 输出预配置。prep_data() 自动发现 isce/ 目录中的干涉图和几何数据,并将 MintPy 配置写入 mintpy/.mintpy.cfg。所有 MintPy 输出写入 workdir/mintpy/。
Source code in src/insarhub/analyzer/isce2_mintpy_s1_sbas.py
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 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 | |
使用方法
-
创建分析器
from insarhub import Analyzer analyzer = Analyzer.create('ISCE2_Mintpy_SBAS', workdir='/your/work/dir')或使用显式配置:
-
准备数据
自动发现 ISCE2 输出并写入
mintpy/.mintpy.cfg。 -
运行
运行 MintPy SBAS 时序分析。所有输出写入
workdir/mintpy/。 -
提交(HPC / SLURM 模式)
继承自
Mintpy_SBAS_Base_Analyzer,将完整 MintPy 流程作为单个 sbatch 作业提交。 -
清理
删除
load_data后不再需要的大型 ISCE2 中间目录和输入数据。 删除isce/coarse_interferograms/、isce/ESD/、isce/coreg_secondarys/、isce/interferograms/、slc/和dem/。
对 GMTSAR_S1 处理器生成的堆叠运行 MintPy SBAS,将 GMTSAR 的地理编码 *_ll.grd 产品和 baseline_table.dat 交给 MintPy 的 prep_gmtsar.py 加载器。它是 ISCE2_Mintpy_SBAS 的 MintPy 对应物。输出写入 workdir/gmtsar_mintpy/,独立目录,不会与同一工作目录中的 Hyp3 或 ISCE MintPy 运行相互覆盖。
Source code in src/insarhub/analyzer/gmtsar_mintpy_s1_sbas.py
26 27 28 29 30 31 32 33 34 35 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 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 | |
使用方法
-
创建分析器
from insarhub import Analyzer analyzer = Analyzer.create('GMTSAR_Mintpy_SBAS', workdir='/your/work/dir')或使用显式配置:
-
准备数据
发现 GMTSAR 输出(stack_mode 的
merge/<julian_pair>/,或 p2p 的gmtsar/<ref>_<sec>/merge/)并写入 MintPy 配置。对于 p2p 输出,它将合并后的unwrap_ll.grd/corr_ll.grd暂存为 MintPy 期望的<pair>/unwrap_ll.grd结构(符号链接,无需复制数 GB 网格),并保留 GMTSAR 的儒略日yyyyddd_yyyyddd目录命名,prep_gmtsar.py据此推导配对日期。 -
运行
运行 MintPy SBAS 时序分析。所有输出写入
workdir/gmtsar_mintpy/。Parameters:
Name Type Description Default stepslist[str] | NoneList of MintPy processing steps to execute. If None, the default full workflow is executed: [ 'load_data', 'modify_network', 'reference_point', 'quick_overview', 'correct_unwrap_error', 'invert_network', 'correct_LOD', 'correct_SET', 'correct_ionosphere', 'correct_troposphere', 'deramp', 'correct_topography', 'residual_RMS', 'reference_date', 'velocity', 'geocode', 'google_earth', 'hdfeos5' ]
NoneRaises:
Type Description RuntimeErrorIf tropospheric delay method requires CDS authorization and authorization fails.
ExceptionPropagates exceptions raised during MintPy execution.
-
提交(HPC / SLURM 模式)
继承自
Mintpy_SBAS_Base_Analyzer,将完整 MintPy 流程作为单个 sbatch 作业提交(脚本写入workdir/gmtsar_mintpy/mintpy_sbas.sbatch)。 -
清理
在 GMTSAR_S1 stack_mode 堆叠上运行 GMTSAR 自带的原生 SBAS 反演(prep_sbas + sbas 二进制程序)——不涉及 MintPy。读取 workdir/gmtsar/,在 workdir/gmtsar_sbas/ 下以雷达坐标生成每个日期的累计位移(disp_*.grd)和线性速度(vel.grd)。
此处 gmtsar_root 与 gmtsar_env_bin 均为必需项:sbas 二进制程序和 gmt 来自 GMTSAR 自身的安装,而非 InSARHub。
Source code in src/insarhub/analyzer/gmtsar_s1_sbas.py
31 32 33 34 35 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 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 | |
使用方法
-
创建分析器
from insarhub import Analyzer analyzer = Analyzer.create('GMTSAR_SBAS', workdir='/your/work/dir', gmtsar_root='/path/to/gmtsar', gmtsar_env_bin='/path/to/conda/envs/gmtsar/bin')或使用显式配置:
-
准备数据
从堆叠的
baseline_table.dat构建intf.tab和scene.tab,然后回显待运行的sbas intf.tab scene.tab N S xdim ydim命令行。 -
运行
运行
sbas反演,将进度实时输出到控制台及workdir/gmtsar_sbas/下的sbas.log。
在 ISCE3_Burst 处理器(Sentinel-1 burst)生成的解缠堆叠上运行 dolphin 的 timeseries.run,输出写入 workdir/timeseries/。NISAR 对应版本为 ISCE3_Dolphin_NISAR_PL,两者的反演逻辑均继承自 Dolphin_PL_Base_Analyzer。
默认将水体排除在反演之外(apply_water_mask=True),使用处理器的 dem/water_mask.tif;关闭后开阔水域也会参与反演。
旧名称
ISCE3_Dolphin_PL、ISCE3_Dolphin_TS、Dolphin_TS 与 Dolphin_SBAS 均仍解析到本分析器,因此已保存的 insarhub_config.json 和旧的 CLI 命令继续可用;它们不会出现在分析器列表中。配置类同理:ISCE3_Dolphin_PL_Config 与 ISCE3_Dolphin_PL_S1_Config 是 ISCE3_Dolphin_S1_PL_Config 的别名。
Source code in src/insarhub/analyzer/isce3_dolphin_s1_pl.py
使用方法
ISCE3_Dolphin_S1_PL 的 NISAR 对应版本——相同的 timeseries.run、相同的产品、相同的 workdir/timeseries/ 输出——消费 ISCE3_NISAR 处理器生成的堆叠。
三处差异,均由 ISCE3_NISAR 的产出决定:
- 波长从 GSLC 元数据读取,而非固定常量;NISAR 为 L 波段,且 frequency A/B 的中心频率不同。显式设置
wavelength可覆盖。 apply_water_mask默认为False——ISCE3_NISAR不执行dem阶段,没有可用的掩膜。- 不提供
los_projection——'vertical'需要处理器的static阶段,而ISCE3_NISAR不执行该阶段。
nisar_frequency / nisar_polarization 必须与处理器进行相位链接时所用的设置一致。
旧名称
ISCE3_Dolphin_PL_NISAR 仍解析到本分析器;ISCE3_Dolphin_PL_NISAR_Config 是 ISCE3_Dolphin_NISAR_PL_Config 的别名。