# zzb-nice/doa_est_master architecture

> Architecture diagram of the GitHub repository zzb-nice/doa_est_master, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zzb-nice/doa_est_master
- Repository: https://github.com/zzb-nice/doa_est_master

## Overview

This repository is a research framework for direction-of-arrival (DOA) estimation. Its principal workflow generates array-signal examples and labels, trains a model, evaluates DOA predictions against classical and learned baselines, and saves metrics and plots. It also supports UCA/2D data and Vision Transformer transfer learning for array imperfections. The graph combines excerpted calls and imports with README-documented capabilities; unsampled method directories are represented at their exact tree paths, and their internal wiring is not inferred.

Main entry points: [`train/train_snr_sp.py`](https://github.com/zzb-nice/doa_est_master/blob/master/train/train_snr_sp.py) (Model training), [`vit_tranfer_learning/transfer_learning.py`](https://github.com/zzb-nice/doa_est_master/blob/master/vit_tranfer_learning/transfer_learning.py) (Transfer workflows), [`data_creater/Create_k_source_dataset.py`](https://github.com/zzb-nice/doa_est_master/blob/master/data_creater/Create_k_source_dataset.py) (DOA angle sets), [`data_creater/signal_datasets.py`](https://github.com/zzb-nice/doa_est_master/blob/master/data_creater/signal_datasets.py) (ULA datasets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Simulation data"]
  node_theta["DOA angle sets"]
  node_ula["ULA datasets<br/>[signal_datasets.py]"]
  node_uca["UCA datasets<br/>[UCA_datasets.py]"]
  node_loader["Dataset loading<br/>[file_dataloader.py]"]
  node_matrix["Batch matrix ops"]
end

subgraph group_learning["Learning models"]
  node_trainer["Model training<br/>[train_snr_sp.py]"]
  node_vit["Vision Transformer<br/>[vit_model.py]"]
  node_cnn["SPE-CNN<br/>[literature_CNN.py]"]
  node_asl["ASL-2"]
  node_learning_spice["Learning-SPICE"]
  node_subspacenet["SubspaceNet"]
end

subgraph group_baselines["DOA baselines"]
  node_music["MUSIC family<br/>[music.py]"]
  node_esprit["ESPRIT family<br/>[esprit.py]"]
  node_unity_esprit["Unity ESPRIT<br/>[unity_esprit.py]"]
  node_l1svd["ℓ1-SVD<br/>[l1_svd.py]"]
end

subgraph group_transfer["Transfer learning"]
  node_transfer_workflow["Transfer workflows"]
  node_theta_transfer["Transfer angle creation<br/>[theta_creater.py]"]
end

subgraph group_results["Evaluation and results"]
  node_metrics[("Result metrics<br/>[loss_save.py]")]
  node_plots["Evaluation plots<br/>[plot_CDF.py]"]
  node_prediction_plots["Prediction plots<br/>[plot_pre_result.py]"]
  node_loss_plots["Loss plots<br/>[plot_loss.py]"]
end

node_researcher(("Researcher"))
node_matlab["MATLAB engine"]

node_researcher -->|"runs experiments"| node_trainer
node_researcher -->|"configures angles"| node_theta
node_theta -->|"sets DOAs"| node_ula
node_ula -->|"uses batch ops"| node_matrix
node_uca -->|"uses batch ops"| node_matrix
node_trainer -->|"creates angle sets"| node_theta
node_trainer -->|"generates samples"| node_ula
node_trainer -->|"trains model"| node_vit
node_trainer -.->|"saves loss"| node_metrics
node_trainer -.->|"plots loss"| node_loss_plots
node_researcher -->|"runs transfer"| node_transfer_workflow
node_transfer_workflow -->|"adapts model"| node_vit
node_transfer_workflow -->|"creates angles"| node_theta_transfer
node_researcher -->|"configures 2D data"| node_uca
node_researcher -->|"compares methods"| node_cnn
node_researcher -->|"compares methods"| node_asl
node_researcher -->|"compares methods"| node_learning_spice
node_researcher -->|"compares methods"| node_subspacenet
node_researcher -->|"compares methods"| node_music
node_researcher -->|"compares methods"| node_esprit
node_researcher -->|"compares methods"| node_unity_esprit
node_researcher -->|"compares methods"| node_l1svd
node_l1svd -->|"invokes engine"| node_matlab
node_researcher -->|"reviews metrics"| node_metrics
node_researcher -->|"reviews results"| node_plots
node_researcher -->|"reviews predictions"| node_prediction_plots
node_researcher -.->|"loads datasets"| node_loader

click node_theta "https://github.com/zzb-nice/doa_est_master/blob/master/data_creater/Create_k_source_dataset.py"
click node_ula "https://github.com/zzb-nice/doa_est_master/blob/master/data_creater/signal_datasets.py"
click node_uca "https://github.com/zzb-nice/doa_est_master/blob/master/data_creater/UCA_datasets/UCA_datasets.py"
click node_loader "https://github.com/zzb-nice/doa_est_master/blob/master/data_creater/file_dataloader.py"
click node_matrix "https://github.com/zzb-nice/doa_est_master/blob/master/utils/batch_matrix_operator.py"
click node_trainer "https://github.com/zzb-nice/doa_est_master/blob/master/train/train_snr_sp.py"
click node_vit "https://github.com/zzb-nice/doa_est_master/blob/master/models/dl_model/vision_transformer/vit_model.py"
click node_cnn "https://github.com/zzb-nice/doa_est_master/blob/master/models/dl_model/CNN/literature_CNN.py"
click node_asl "https://github.com/zzb-nice/doa_est_master/tree/master/article_implement/ASL"
click node_learning_spice "https://github.com/zzb-nice/doa_est_master/tree/master/article_implement/Learning_SPICE"
click node_subspacenet "https://github.com/zzb-nice/doa_est_master/tree/master/article_implement/SubspaceNet"
click node_transfer_workflow "https://github.com/zzb-nice/doa_est_master/blob/master/vit_tranfer_learning/transfer_learning.py"
click node_theta_transfer "https://github.com/zzb-nice/doa_est_master/blob/master/vit_tranfer_learning/theta_creater/theta_creater.py"
click node_music "https://github.com/zzb-nice/doa_est_master/blob/master/models/subspace_model/music.py"
click node_esprit "https://github.com/zzb-nice/doa_est_master/blob/master/models/subspace_model/esprit.py"
click node_unity_esprit "https://github.com/zzb-nice/doa_est_master/blob/master/models/subspace_model/unity_esprit.py"
click node_l1svd "https://github.com/zzb-nice/doa_est_master/blob/master/models/compress_sensing/invoke_matlab/l1_svd.py"
click node_metrics "https://github.com/zzb-nice/doa_est_master/blob/master/data_save/save_csv/loss_save.py"
click node_plots "https://github.com/zzb-nice/doa_est_master/blob/master/data_save/plot/plot_CDF.py"
click node_prediction_plots "https://github.com/zzb-nice/doa_est_master/blob/master/data_save/plot/plot_pre_result.py"
click node_loss_plots "https://github.com/zzb-nice/doa_est_master/blob/master/data_save/plot/plot_loss.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_theta,node_ula,node_uca,node_loader,node_matrix toneBlue
class node_trainer,node_vit,node_cnn,node_asl,node_learning_spice,node_subspacenet toneAmber
class node_music,node_esprit,node_unity_esprit,node_l1svd toneMint
class node_transfer_workflow,node_theta_transfer toneRose
class node_metrics,node_plots,node_prediction_plots,node_loss_plots,node_researcher,node_matlab toneIndigo
```

## Components

### Simulation data

- [DOA angle sets](https://github.com/zzb-nice/doa_est_master/blob/master/data_creater/Create_k_source_dataset.py): `data_creater/Create_k_source_dataset.py`
- [ULA datasets](https://github.com/zzb-nice/doa_est_master/blob/master/data_creater/signal_datasets.py): `data_creater/signal_datasets.py`
- [UCA datasets](https://github.com/zzb-nice/doa_est_master/blob/master/data_creater/UCA_datasets/UCA_datasets.py): `data_creater/UCA_datasets/UCA_datasets.py`
- [Dataset loading](https://github.com/zzb-nice/doa_est_master/blob/master/data_creater/file_dataloader.py): `data_creater/file_dataloader.py`
- [Batch matrix ops](https://github.com/zzb-nice/doa_est_master/blob/master/utils/batch_matrix_operator.py): `utils/batch_matrix_operator.py`

### Learning models

- [Model training](https://github.com/zzb-nice/doa_est_master/blob/master/train/train_snr_sp.py): `train/train_snr_sp.py`
- [Vision Transformer](https://github.com/zzb-nice/doa_est_master/blob/master/models/dl_model/vision_transformer/vit_model.py): `models/dl_model/vision_transformer/vit_model.py`
- [SPE-CNN](https://github.com/zzb-nice/doa_est_master/blob/master/models/dl_model/CNN/literature_CNN.py): `models/dl_model/CNN/literature_CNN.py`
- [ASL-2](https://github.com/zzb-nice/doa_est_master/tree/master/article_implement/ASL): `article_implement/ASL`
- [Learning-SPICE](https://github.com/zzb-nice/doa_est_master/tree/master/article_implement/Learning_SPICE): `article_implement/Learning_SPICE`
- [SubspaceNet](https://github.com/zzb-nice/doa_est_master/tree/master/article_implement/SubspaceNet): `article_implement/SubspaceNet`

### DOA baselines

- [MUSIC family](https://github.com/zzb-nice/doa_est_master/blob/master/models/subspace_model/music.py): `models/subspace_model/music.py`
- [ESPRIT family](https://github.com/zzb-nice/doa_est_master/blob/master/models/subspace_model/esprit.py): `models/subspace_model/esprit.py`
- [Unity ESPRIT](https://github.com/zzb-nice/doa_est_master/blob/master/models/subspace_model/unity_esprit.py): `models/subspace_model/unity_esprit.py`
- [ℓ1-SVD](https://github.com/zzb-nice/doa_est_master/blob/master/models/compress_sensing/invoke_matlab/l1_svd.py): `models/compress_sensing/invoke_matlab/l1_svd.py`

### Transfer learning

- [Transfer workflows](https://github.com/zzb-nice/doa_est_master/blob/master/vit_tranfer_learning/transfer_learning.py): `vit_tranfer_learning/transfer_learning.py`
- [Transfer angle creation](https://github.com/zzb-nice/doa_est_master/blob/master/vit_tranfer_learning/theta_creater/theta_creater.py): `vit_tranfer_learning/theta_creater/theta_creater.py`

### Evaluation and results

- [Result metrics](https://github.com/zzb-nice/doa_est_master/blob/master/data_save/save_csv/loss_save.py): `data_save/save_csv/loss_save.py`
- [Evaluation plots](https://github.com/zzb-nice/doa_est_master/blob/master/data_save/plot/plot_CDF.py): `data_save/plot/plot_CDF.py`
- [Prediction plots](https://github.com/zzb-nice/doa_est_master/blob/master/data_save/plot/plot_pre_result.py): `data_save/plot/plot_pre_result.py`
- [Loss plots](https://github.com/zzb-nice/doa_est_master/blob/master/data_save/plot/plot_loss.py): `data_save/plot/plot_loss.py`

### Other components

- **Researcher**
- **MATLAB engine**

## Connections

- Researcher → Model training: runs experiments
- Researcher → DOA angle sets: configures angles
- DOA angle sets → ULA datasets: sets DOAs (evidence: `data_creater/Create_k_source_dataset.py`)
- ULA datasets → Batch matrix ops: uses batch ops (evidence: `data_creater/signal_datasets.py`)
- UCA datasets → Batch matrix ops: uses batch ops (evidence: `data_creater/UCA_datasets/UCA_datasets.py`)
- Model training → DOA angle sets: creates angle sets (evidence: `train/train_snr_sp.py`)
- Model training → ULA datasets: generates samples (evidence: `train/train_snr_sp.py`)
- Model training → Vision Transformer: trains model (evidence: `train/train_snr_sp.py`)
- Model training → Result metrics: saves loss (evidence: `train/train_snr_sp.py`)
- Model training → Loss plots: plots loss (evidence: `train/train_snr_sp.py`)
- Researcher → Transfer workflows: runs transfer
- Transfer workflows → Vision Transformer: adapts model
- Transfer workflows → Transfer angle creation: creates angles
- Researcher → UCA datasets: configures 2D data
- Researcher → SPE-CNN: compares methods
- Researcher → ASL-2: compares methods
- Researcher → Learning-SPICE: compares methods
- Researcher → SubspaceNet: compares methods
- Researcher → MUSIC family: compares methods
- Researcher → ESPRIT family: compares methods
- Researcher → Unity ESPRIT: compares methods
- Researcher → ℓ1-SVD: compares methods
- ℓ1-SVD → MATLAB engine: invokes engine (evidence: `models/compress_sensing/invoke_matlab/l1_svd.py`)
- Researcher → Result metrics: reviews metrics
- Researcher → Evaluation plots: reviews results
- Researcher → Prediction plots: reviews predictions
- Researcher → Dataset loading: loads datasets
