# mrl-creator/seismic-signal-analyzer architecture

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

- Interactive diagram: https://gitdiagram.com/mrl-creator/seismic-signal-analyzer
- Repository: https://github.com/mrl-creator/seismic-signal-analyzer

## Overview

Seismic Signal Analyzer is a local Streamlit workstation for loading and exploring uniformly sampled waveform CSVs. The main workflow is user or bundled-trace input, time/sample validation, optional signal conditioning, then waveform, spectral, event-screening, and user-window SNR views; candidate peaks can be downloaded. The graph preserves the documented capabilities and the CLI launcher. Edges follow the shown app calls and loader behavior; unsampled UI details are represented only where the README documents them.

Main entry points: [`app.py`](https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/app.py) (Streamlit workstation), [`src/seismic_analyzer/data/io.py`](https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/data/io.py) (CSV or sample input), [`src/seismic_analyzer/cli.py`](https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/cli.py) (CLI launcher), [`sample_data/synthetic_local_event.csv`](https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/sample_data/synthetic_local_event.csv) (Synthetic example record)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Workstation interface"]
  node_cli["CLI launcher<br/>[cli.py]"]
  node_workstation["Streamlit workstation<br/>[app.py]"]
  node_views["Interactive views<br/>[app.py]"]
  node_peak_export["Peak table export<br/>[app.py]"]
end

subgraph group_ingestion["Waveform ingestion"]
  node_csv_input["CSV or sample input<br/>[io.py]"]
  node_waveform["Validated waveform<br/>[io.py]"]
  node_sample_record["Synthetic example record"]
end

subgraph group_processing["Signal processing"]
  node_conditioning["Signal conditioning<br/>[filters.py]"]
end

subgraph group_analysis["Waveform analysis"]
  node_fft["FFT spectrum<br/>[spectrum.py]"]
  node_spectrogram["PSD spectrogram<br/>[spectrum.py]"]
  node_event_screen["Peak screening<br/>[events.py]"]
  node_snr["Windowed RMS SNR<br/>[events.py]"]
end

node_user(("User"))

node_user -->|"opens"| node_workstation
node_cli -->|"launches"| node_workstation
node_workstation -->|"loads CSV or sample"| node_csv_input
node_csv_input -->|"reads example"| node_sample_record
node_csv_input -->|"validates and creates"| node_waveform
node_workstation -->|"conditions trace"| node_conditioning
node_workstation -->|"computes spectrum"| node_fft
node_workstation -->|"computes PSD"| node_spectrogram
node_workstation -->|"screens peaks"| node_event_screen
node_workstation -->|"calculates SNR"| node_snr
node_workstation -->|"renders results"| node_views
node_workstation -->|"offers download"| node_peak_export

click node_cli "https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/cli.py"
click node_workstation "https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/app.py"
click node_views "https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/app.py"
click node_peak_export "https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/app.py"
click node_csv_input "https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/data/io.py"
click node_waveform "https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/data/io.py"
click node_sample_record "https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/sample_data/synthetic_local_event.csv"
click node_conditioning "https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/processing/filters.py"
click node_fft "https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/analysis/spectrum.py"
click node_spectrogram "https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/analysis/spectrum.py"
click node_event_screen "https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/analysis/events.py"
click node_snr "https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/analysis/events.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_cli,node_workstation,node_views,node_peak_export,node_user toneBlue
class node_csv_input,node_waveform,node_sample_record toneAmber
class node_conditioning toneMint
class node_fft,node_spectrogram,node_event_screen,node_snr toneRose
```

## Components

### Workstation interface

- [CLI launcher](https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/cli.py): `src/seismic_analyzer/cli.py`
- [Streamlit workstation](https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/app.py): `app.py`
- [Interactive views](https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/app.py): `app.py`
- [Peak table export](https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/app.py): `app.py`

### Waveform ingestion

- [CSV or sample input](https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/data/io.py): `src/seismic_analyzer/data/io.py`
- [Validated waveform](https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/data/io.py): `src/seismic_analyzer/data/io.py`
- [Synthetic example record](https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/sample_data/synthetic_local_event.csv): `sample_data/synthetic_local_event.csv`

### Signal processing

- [Signal conditioning](https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/processing/filters.py): `src/seismic_analyzer/processing/filters.py`

### Waveform analysis

- [FFT spectrum](https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/analysis/spectrum.py): `src/seismic_analyzer/analysis/spectrum.py`
- [PSD spectrogram](https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/analysis/spectrum.py): `src/seismic_analyzer/analysis/spectrum.py`
- [Peak screening](https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/analysis/events.py): `src/seismic_analyzer/analysis/events.py`
- [Windowed RMS SNR](https://github.com/mrl-creator/seismic-signal-analyzer/blob/main/src/seismic_analyzer/analysis/events.py): `src/seismic_analyzer/analysis/events.py`

### Other components

- **User**

## Connections

- User → Streamlit workstation: opens (evidence: `README.md`)
- CLI launcher → Streamlit workstation: launches (evidence: `src/seismic_analyzer/cli.py`)
- Streamlit workstation → CSV or sample input: loads CSV or sample (evidence: `app.py`)
- CSV or sample input → Synthetic example record: reads example (evidence: `src/seismic_analyzer/data/io.py`)
- CSV or sample input → Validated waveform: validates and creates (evidence: `src/seismic_analyzer/data/io.py`)
- Streamlit workstation → Signal conditioning: conditions trace (evidence: `app.py`)
- Streamlit workstation → FFT spectrum: computes spectrum (evidence: `app.py`)
- Streamlit workstation → PSD spectrogram: computes PSD (evidence: `app.py`)
- Streamlit workstation → Peak screening: screens peaks (evidence: `app.py`)
- Streamlit workstation → Windowed RMS SNR: calculates SNR (evidence: `app.py`)
- Streamlit workstation → Interactive views: renders results (evidence: `app.py`)
- Streamlit workstation → Peak table export: offers download (evidence: `app.py`)
