PHASE (Persistent scatterer Highly Automated Suite for Environmental monitoring) is a MATLAB-based software suite for automated InSAR Persistent Scatterer Interferometry (PSI) processing and advanced geospatial analysis. Built on the foundation of snap2stamps and StaMPS, PHASE introduces enhanced automation, user-friendly interactive map interfaces, and a powerful geospatial modeling module to interpret and visualize displacement time series, making it ideal for environmental and infrastructure monitoring.
- Sentinel-1 (from European Space Agency)
- COSMO-SkyMed (from Agenzia Spaziale Italiana - automatically supports both CSK and CSG generations)
- SNAP (version 9.x is mandatory)
- MATLAB
- StaMPS
- Python 3.x with
openpyxl(for geospatial module report generation)
- Linux: supported end-to-end, including StaMPS, for the complete PSI pipeline.
- Windows: supported end-to-end for the SNAP-based workflow (preprocessing,
StaMPS, and geospatial analysis) via the Windows-native StaMPS fork
pyccino/StaMPS. PHASE auto-discovers the StaMPS Windows install throughStaMPS_CONFIG.ps1and shares the Python interpreter with StaMPS via%APPDATA%\PHASE\python.txt. - macOS: supports preprocessing and geospatial analysis modules.
Note
A detailed, step-by-step guide is available in the provided user manual.
Before using PHASE, please carefully read the entire manual!
-
Install SNAP Software
Download and install SNAP 9.x from the European Space Agency website.
Verify that the following mandatory SNAP plugin module is installed:- Sentinel-1 Toolbox
(Note: Previous versions required multiple toolboxes like Optical or SMOS, but these are no longer needed).
After installing SNAP, it is highly recommended to optimize your memory settings:
- Edit
$HOME/snap/bin/gpt.vmoptionsand modify the-Xmxparameter according to your RAM (e.g.,-Xmx12G). - Edit
$HOME/snap/etc/snap.propertiesand add/verify:#snap.home=#snap.userdir=snap.jai.tileCacheSize = 1024snap.jai.defaultTileSize = 512
- Sentinel-1 Toolbox
-
Install Required Python Modules:
Install Python 3.x on your machine. Ensure Python is added to your system's PATH. The PHASE suite utilizes standard built-in Python libraries, so you only need to install the external Excel library. Run the following command in your terminal:pip install openpyxl
-
Install xterm (only Linux Users):
Install xterm by runningsudo apt-get install xtermin the terminal. -
Install StaMPS:
Install StaMPS from the official GitHub repository.git clone https://github.com/dbekaert/StaMPS/releases/tag/v4.1-beta -
Install PHASE suite
- Download the latest release of the PHASE suite repository.
- Move or extract the downloaded folder into your desired project directory.
- Execute the PHASE_Preprocessing.mlapp MATLAB application.
- Tune the configurable parameters across the available tabs (including the interactive geographic map for AOI selection).
- Once the preprocessing is complete, execute the PHASE_StaMPS.mlapp MATLAB application (on Linux, it will open automatically upon completion).
- For geospatial analysis, run PHASE_model.mlapp to process the final displacement time series.
- Automated SAR Images Download:
Retrieve Sentinel-1 images via the generated Python script from the Alaska SAR Facility, or manually place your COSMO-SkyMed .h5 files into the slaves directory. - Interactive AOI & Automated Master Selection:
Define your precise Area of Interest (AOI) by drawing a bounding box directly on the GUI's geographic map interface. Let PHASE automatically query the Open-Meteo historical weather API to select the optimal, driest master image for your stack. - Master & Slave Pre-Processing:
Automated splitting, precise orbit correction, coregistration, and interferogram formation. For Sentinel-1, optimal swaths and bursts are dynamically calculated from your AOI. Includes StaMPS export, average scene intensity computation, and local incidence angle/coherence calculations. - StaMPS Processing:
Automated data preparation, parameter definition, metadata auto-detection, and StaMPS PS analysis. Includes integration with TRAIN for GACOS tropospheric corrections, exporting displacement time series in Excel format.
The geospatial module enhances PHASE by providing advanced interpolation and modeling of PS displacement time series, tailored for Sentinel-1 data but compatible with any SAR data in the same table format. It offers flexible processing options for environmental and infrastructure monitoring, with user-configurable parameters for experts and automated settings for beginners. Key features include:
- Area of Interest (AOI) Definition: Specify the AOI via shapefiles (preferred for arbitrary shapes) or bounding boxes, with automatic detection and transformation of geographic (WGS84) or projected (UTM) coordinates. PS outside the AOI are filtered to focus analysis.
- Geometry Options: Supports 1D modeling for linear features (e.g., roads, railways) using centerline interpolation and 2D modeling for expansive areas (e.g., volcanoes, large infrastructures) using grid-based meshes, with user-defined resolutions.
- Temporal Modeling: Independently interpolates each time series using cubic splines for outlier removal, trend, and periodic component modeling, followed by least-squares collocation for residuals. Optional nearest-neighbor interpolation extends results spatially for visualization.
- Deterministic Spatio-Temporal Modeling: Creates a continuous displacement field using temporal cubic splines for data cleaning and multi-dimensional splines for spatial interpolation, with per-epoch GIF visualizations.
- Stochastic Spatio-Temporal Modeling: Combines deterministic cubic spline-based cleaning with Least Squares Collocation for deformation modeling, incorporating covariance modeling for robust uncertainty estimates.
- Stability Analysis: Evaluates PS stability via a thresholding procedure based on average velocity and cumulative displacement, assigning risk levels using standardized statistical criteria and exponential/linear risk scaling.
The module generates a comprehensive Excel report across multiple sheets:
- General Sheet: Summarizes project metadata (title, date, location, modeling approach), unwrapping parameters, PS statistics, and visualizations (logo, AOI map, PS plot).
- Raw Displacement Sheet: Presents adjusted raw displacement time series with coordinates and a figure of average scene displacement with velocity annotation.
- Modeled Displacement Sheet: Details modeled displacements with average velocity and a geoscatter plot of velocity across the AOI.
- Uncertainty Sheet: Provides uncertainty estimates with a geoscatter plot of time-averaged uncertainty.
- Alerts Sheet: Reports stability analysis with velocity, cumulative displacement, and global risk percentages.
- Interpolation Sheet (Optional): Includes extrapolated time series at user-specified coordinates with individual displacement plots.
A shapefile and .mat file are generated in WGS84 (EPSG:4326) coordinates, including PS data, velocities, uncertainties, and risks for GIS compatibility.
The procedure has been tested on SNAP 9.x and 13.x, Python 2.7, Python 3.11, Python 3.13, Ubuntu 20.04, Windows 10, macOS Sequoia (15.1), and MATLAB 2025a/2026a.
Tip
Refer to the manual for solutions to common errors encountered during the StaMPS processing.
PHASE preprocessing supports both SNAP 9.x (legacy) and SNAP 13.x (recommended). Choose based on which Sentinel-1 satellites your dataset includes:
- SNAP 9.x: supports Sentinel-1A and Sentinel-1B only. Sentinel-1C (launched Dec 2024) and Sentinel-1D are not supported by the SNAP 9 product readers.
- SNAP 13.x: supports the full Sentinel-1A/1B/1C/1D constellation natively. Required for any dataset containing S1C or S1D acquisitions.
Point GPTBIN_PATH in your project.conf to the SNAP version you want PHASE to use:
GPTBIN_PATH = C:/Program Files/snap13/bin/gpt.exe # SNAP 13 (S1A/B/C/D)
# GPTBIN_PATH = C:/Program Files/snap/bin/gpt.exe # SNAP 9 (S1A/B only)
SNAP 13's StampsExport operator raises NullPointerException on tie-point grids written by SNAP 9 (the BEAM-DIMAP TPG format changed between majors). The error is silent — StaMPS later hangs mid-PSI without a clear diagnostic.
PHASE's SEN_stamps_export.py automatically detects this mismatch and prints an actionable warning before launching gpt. The fix is to re-run the full preprocessing pipeline (split + coregistration + interferogram) from the original .SAFE.zip files using the same SNAP version that will run StampsExport.
StampsExport has SRTM 3Sec hardcoded for the lat/lon geocoding output, regardless of the DEM chosen for coregistration. When the auto-download fails (offline, mirror down, or — on SNAP 13 — silently for some inputs), the geo files are partially corrupted and StaMPS hangs mid-PSI. PHASE pre-caches the required SRTM tiles into %USERPROFILE%/.snap/auxdata/dem/SRTM 3Sec/ automatically before each StampsExport run, eliminating that failure mode.
This requires the project AOI to be present in project.conf as LATMIN, LATMAX, LONMIN, LONMAX. If the keys are absent the pre-cache is skipped (with a warning) and StampsExport falls back to the standard SNAP auto-download path.
After the TRAIN Windows port, verify your install with these three checks.
- Open MATLAB. Run
which('aps_linear'). Expected: empty string. - Launch
PHASE_StaMPS.mlapp. Tick "TRAIN atmospheric correction". Press Save, then Start. - Expected:
- Warning id
StaMPS:phase:trainNotAvailablein diary /smoketest.log. - The TRAIN checkbox STAYS TICKED (intentional — preserves intent for re-run).
- Processing continues through STEP 1 → STEP 2 → export.
- Output contains no
Atmosphere_*columns. - Exit code 0.
- Warning id
- Install TRAIN (Windows-patched fork):
git clone https://github.com/Tiopio01/TRAIN.git C:/TRAIN. - In MATLAB:
addpath(genpath('C:/TRAIN/matlab')); savepath. - Verify:
which('aps_linear')returnsC:\TRAIN\matlab\aps_linear.m. - Launch
PHASE_StaMPS.mlapp. Tick TRAIN. Settropo_method='a_linear'. Save, Start. - Expected:
- No degradation warning.
aps_linearruns (console output contains "loading the data").- Output contains
Atmosphere_a_linear_AOI_PS.matandAtmosphere_a_linear_*.csv. - Velocity values differ from a run with TRAIN unchecked.
Note on the Windows fork.
Tiopio01/TRAIN(default branchmain) is forked fromdbekaert/TRAINat the audited commit6c93febplus two Windows-specific fixes:
get_gmt_version.m: actionable error on Windows when GMT is not on PATH (the upstream loop manipulates Linux-only library env vars).aps_gacos_files.m: replaces Unix&background launch with synchronoussystem()call on Windows (cmd.exe parses&differently).Unix/Mac behavior is unchanged. Use upstream
dbekaert/TRAINdirectly on Linux/macOS if preferred.
- Same TRAIN install as above. Additionally install GMT for Windows and ensure
C:\Program Files\GMT\bin(or your install dir) is on PATH; verify withgmt --versionin a fresh terminal. - Launch
PHASE_StaMPS.mlapp. Tick TRAIN. Settropo_method='a_gacos'. Save, Start. - Expected:
- MATLAB pauses at
keyboardafter creatingGACOS/andGACOS_download_info.txt. - Download
.tar.gzfiles from gacos.net per the printed instructions, place inGACOS/, press Continue in MATLAB editor. - MATLAB extracts/distributes
.ztdfiles. - Output contains
Atmosphere_a_gacos_AOI_PS.matandAtmosphere_a_gacos_*.csv.
- MATLAB pauses at
- April 2026: Added interactive geographic map GUI for automatic AOI sub-setting. Introduced meteorologically-aware master image selection using Open-Meteo API. Automated parameter metadata detection for StaMPS. Dropped legacy Python 2.7 support.
- March 2026: Introduced Module 2 for geospatial PSI data analysis with deterministic and stochastic modeling.
- September 2024: Added macOS compatibility to the preprocessing application and improved master error handling.
- Improve border constraints based on user selection.
- Introduce the handling of jumps in the displacement models.
- Introduce the possibility for a NRT processing.
- Native integration of Alaska Vertex API for direct Sentinel-1 image downloads.
Special thanks to Jose Manuel Delgado Blasco and Dr. Michael Foumelis for the snap2stamps1 tool, and Prof. Andy Hooper for the StaMPS2 development.
When using this software, please refer to:
Monti, R., & Rossi, L. (2025). PHASE: a Matlab-based software for the DInSAR PS processing. Geodesy and Cartography, 51(2), 88–99. https://doi.org/10.3846/gac.2025.21995
Footnotes
-
Foumelis, M., Delgado Blasco, J. M., Desnos, Y. L., Engdahl, M., Fernández, D., Veci, L. Lu, J. and Wong, C. “SNAP - StaMPS Integrated processing for Sentinel-1 Persistent Scatterer Interferometry”. In Geoscience and Remote Sensing Symposium (IGARSS), 2018 IEEE International, IEEE.
↩ -
Hooper, A., A multi-temporal InSAR method incorporating both persistent scatterer and small baseline approaches, Geophys. Res. Lett., 35, L16,302, doi:10.1029/2008GL03465, 2008. ↩
