How yumorishita/licsbas2 works
Project type and purpose
• LiCSBAS2 is a research‐oriented, open-source command-line package (Python + bash) for InSAR time-series analysis, ingesting unwrapped interferograms and coherence maps from the COMET-LiCS portal and producing displacement time series, velocities, and visualizations.
File structure
• bin/ : top-level CLI entrypoints – one script per processing step (01_get_geotiff.py → 16_filt_ts.py, plus utility scripts).
• LiCSBAS_lib/ : core Python libraries organized by functionality:
• LiCSBAS_io_lib.py – data I/O (reading GeoTIFFs, metadata).
• LiCSBAS_loop_lib.py – loop closure routines.
• LiCSBAS_inv_lib.py – inversion algorithms (SB, least‐squares).
• LiCSBAS_plot_lib.py – plotting (time series, velocity maps).
• LiCSBAS_tools_lib.py – utility routines (masking, reprojection).
• colormap subfolders (GMT/, SCM/, cmocean/, colorcet/) – static colormap definitions.
• shell scripts to extract colormaps.
• Configuration: LiCSBAS_requirements.txt (dependencies), bashrc_LiCSBAS.sh & batch scripts.
README for additional insights
• Confirms pipeline‐style workflow: download (01), prep (02), apply corrections (03-05), QC (11), inversion (12-13), postprocessing (14-16), plotting.
• Mentions use of external tools/standards: GMT colormaps, ScientificColourMaps, Python imaging libs.
a. Main components
1. User CLI layer (bin/*.py & bash wrappers)
2. Core Python libraries (LiCSBAS_lib)
3. Static resources (colormap packages under LiCSBAS_lib)
4. External data source (COMET-LiCS Portal / Sentinel‐1 products)
5. External dependencies (Python runtime & packages, GMT, bash)
6. Output artifacts (GeoTIFFs, time series plots, velocity fields)
b. Relationships & interactions
• Subsequent pipeline scripts invoke LiCSBAS_io_lib, LiCSBAS_tools_lib, LiCSBAS_loop_lib, LiCSBAS_inv_lib in sequence.
• Plotting scripts call LiCSBAS_plot_lib + colormap modules to render outputs.
• All scripts run under the bashrc_LiCSBAS environment.
c. Architectural patterns / principles
• Modular pipeline pattern: each step is a thin wrapper around core libs.
• Layered separation: CLI layer, library layer, resource layer.
• Reuse of external static resources (colormaps).
d. Key technologies & libraries
• Python 3.x, NumPy, SciPy, matplotlib, rasterio (implied by GeoTIFF I/O).
• GMT colormaps, ScientificColourMaps (SCM), cmocean, colorcet.
• Bash environment and shell scripting.
Final advice
• Be highly detailed: break out each major library module, each pipeline stage.
• Essential flows: data ingestion, processing loops, inversion, visualization.
• Use annotations to note configuration points (requirements file, bashrc).