Merged
Conversation
added 4 commits
October 15, 2025 05:06
…egration This commit adds full LiCSAR product support to MintPy, including: 1. Enhanced baseline handling (prep_licsar.py): - Read LiCSAR baselines file with format: frame_master_date acquisition_date perp_baseline temporal_baseline - Calculate perpendicular baseline as difference between acquisition dates relative to frame master - Fixed DATE12 extraction to get both master and slave dates from YYYYMMDD_YYYYMMDD filename pattern - Fixed interferogram detection to recognize .unw. and .cc. file patterns - Add temporal baseline (T_BASELINE) calculation 2. E,N,U geometry components support (load_data.py): - Add basisEast, basisNorth, basisUp to GEOM_DSET_NAME2TEMPLATE_KEY mapping - Create enhance_licsar_geometry_file() function to calculate derived geometry datasets - Calculate incidenceAngle from E,N,U using utils0.incidence_angle_from_enu() - Calculate azimuthAngle from E,N,U using utils0.azimuth_angle_from_enu() - Calculate slantRangeDistance from incidenceAngle using utils0.incidence_angle2slant_range_distance() - Add satellite HEIGHT attribute (693 km for Sentinel-1) for slant range calculation 3. Geometry dataset names (stack.py): - Add basisEast, basisNorth, basisUp to GEOMETRY_DSET_NAMES list - Enable recognition of E,N,U components in geometry processing 4. XML parsing fix (readfile.py): - Handle PAMDataset XML files without ENVI metadata domain - Add None check before accessing metadata to prevent AttributeError Result: Complete LiCSAR workflow with 2000 interferograms, proper baselines, and full geometry including pixel-wise incidence/azimuth angles calculated from E,N,U basis vectors.
…oint This commit adds: 1. New utility functions in utils0.py: - incidence_angle_from_enu(): Calculate incidence angle from E,N,U unit vectors using θ = arccos(|U|) - azimuth_angle_from_enu(): Calculate azimuth angle from E,N,U using α = atan2(E, N) Both functions follow MintPy coordinate conventions and include quality masking 2. CLI entry point in pyproject.toml: - Add create_licsar_geometry.py command for standalone geometry file creation 3. Standalone geometry creation tool (create_licsar_geometry.py): - Command-line tool to create enhanced LiCSAR geometry files - Reads E,N,U components and calculates all required geometry datasets - Can be used independently or called from load_data.py
- Update enhance_licsar_geometry_file() to generate 2D lat/lon grids - Use X_FIRST, X_STEP, Y_FIRST, Y_STEP from metadata - Grids match gdalinfo corner coordinates - Float32 format with lzf compression - Tested and verified with test_latlon_simple.py
- RLOOKS = (X_STEP in meters) / (range pixel spacing in ground range) - ALOOKS = (Y_STEP in meters) / (azimuth pixel spacing) - Convert slant range spacing to ground range: slant / sin(incidence) - Use native Sentinel-1 pixel spacing: range=2.3m, azimuth=13.9m - Fixes KeyError: 'ALOOKS' during ifgram_inversion step - Correctly accounts for multilooking in geocoded LiCSAR products
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68ed631ed92c832098d858654646f970