# forrestfwilliams/uavsar_insar architecture

> Architecture diagram of the GitHub repository forrestfwilliams/uavsar_insar, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/forrestfwilliams/uavsar_insar
- Repository: https://github.com/forrestfwilliams/uavsar_insar

## Overview

##### Main Components

a. Data Input Layer:
- UAVSAR raw data input
- Configuration files (*.cfg files) as input parameters
- 'inputs' directory as the entry point

b. Processing Pipeline Stages:
- Network Selection Stage (represented by network_selection_*.ipynb)
- Interferogram Processing Stage (interferogram_processing.ipynb)
- SNAPHU Processing Stage (2-stage unwrapping process)
- MintPy Processing Stage (mintpy_processing_*.ipynb)
- Time Series Analysis Stage (timeseries_trends.ipynb)

c. Utility Components:
- Email Notification System (emailme.py)
- Timing Utilities (timing.py)
- Recovery Mechanisms (recovery.ipynb)

##### Flow and Relationships

- Parallel processing paths where applicable
- Feedback loops for reoptimization processes
- Data persistence points

##### Specific Design Elements

a. Input Section:
**[UAVSAR Raw Data] → [Configuration Files]**
- ↓
**[Data Validation & Setup]**

b. Processing Pipeline:
**[Network Selection]**
- ↓
**[Interferogram Processing]**
- ↓
**[SNAPHU Unwrapping]**
- ↙   ↓    ↘
**[Stage 1] [Stage 2] [Reoptimization]**
- ↓
**[MintPy Processing]**
- ↓
**[Time Series Analysis]**

##### Technical Details

- Python-based processing environment
- Jupyter notebook integration points
- Configuration file dependencies
- Data format transformations
- Processing parameters

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Input
        RawData[UAVSAR Raw Data]
        Config["Configuration Files"]:::config
        PrimaryConfig["Primary Config"]:::config
        ProcessConfig["Processing Config"]:::config
    end

    subgraph "Processing Pipeline"
        NetworkSelect["Network Selection"]:::process
        InterferoPro["Interferogram Processing"]:::process
        SNAPHU["SNAPHU Processing"]:::process
        MintPy["MintPy Processing"]:::process
        TimeSeries["Time Series Analysis"]:::process
        
        subgraph "SNAPHU Stages"
            Stage1["Stage 1"]:::process
            Stage2["Stage 2"]:::process
            Reopt["Reoptimization"]:::process
        end
    end

    subgraph "Utility Layer"
        Email["Email Notifications"]:::utility
        Timing["Timing System"]:::utility
        Recovery["Recovery System"]:::utility
        UsefulCode["Utility Code"]:::utility
        Merge["Merge Operations"]:::utility
    end

    %% Connections
    RawData --> Config
    Config --> NetworkSelect
    PrimaryConfig --> NetworkSelect
    ProcessConfig --> NetworkSelect

    NetworkSelect --> InterferoPro
    InterferoPro --> SNAPHU
    SNAPHU --> Stage1
    SNAPHU --> Stage2
    SNAPHU --> Reopt
    Stage1 --> MintPy
    Stage2 --> MintPy
    Reopt -.-> Stage1
    MintPy --> TimeSeries

    %% Utility Connections
    Email -.-> NetworkSelect
    Email -.-> InterferoPro
    Email -.-> SNAPHU
    Email -.-> MintPy
    Timing -.-> NetworkSelect
    Timing -.-> InterferoPro
    Timing -.-> SNAPHU
    Timing -.-> MintPy
    Recovery -.-> NetworkSelect
    Recovery -.-> InterferoPro
    Recovery -.-> SNAPHU
    Recovery -.-> MintPy
    Merge -.-> MintPy

    %% Styling
    classDef config fill:#gray
    classDef process fill:#90EE90
    classDef utility fill:#FFE5B4
    
    %% Click Events
    click Config "https://github.com/forrestfwilliams/UAVSAR_InSAR/tree/main/inputs/"
    click PrimaryConfig "https://github.com/forrestfwilliams/UAVSAR_InSAR/blob/main/inputs/smallbaselineApp.cfg"
    click ProcessConfig "https://github.com/forrestfwilliams/UAVSAR_InSAR/blob/main/inputs/Haywrd_05502_01-S1.cfg"
    click NetworkSelect "https://github.com/forrestfwilliams/UAVSAR_InSAR/blob/main/network_selection_0550201_01.ipynb"
    click InterferoPro "https://github.com/forrestfwilliams/UAVSAR_InSAR/blob/main/interferogram_processing.ipynb"
    click SNAPHU "https://github.com/forrestfwilliams/UAVSAR_InSAR/blob/main/SNAPHU_2_stage_process.ipynb"
    click MintPy "https://github.com/forrestfwilliams/UAVSAR_InSAR/blob/main/mintpy_processing_0550201_01.ipynb"
    click TimeSeries "https://github.com/forrestfwilliams/UAVSAR_InSAR/blob/main/timeseries_trends.ipynb"
    click Email "https://github.com/forrestfwilliams/UAVSAR_InSAR/blob/main/emailme.py"
    click Timing "https://github.com/forrestfwilliams/UAVSAR_InSAR/blob/main/timing.py"
    click Recovery "https://github.com/forrestfwilliams/UAVSAR_InSAR/blob/main/recovery.ipynb"
    click UsefulCode "https://github.com/forrestfwilliams/UAVSAR_InSAR/blob/main/useful_code.ipynb"
    click Merge "https://github.com/forrestfwilliams/UAVSAR_InSAR/blob/main/merge.ipynb"
```
