# aatyaa/grwu architecture

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

- Interactive diagram: https://gitdiagram.com/aatyaa/grwu
- Repository: https://github.com/aatyaa/grwu

## Overview

GRWU is an interactive educational site for gravitational-wave data analysis, paired with a Python pipeline that prepares real and synthetic detector datasets. The main reader journey is through workshop-aligned articles and browser-based analysis; the README describes three learning depths, while the sampled runtime shows DSP and Python execution in workers. Pipeline call relationships come from the source index and excerpts. Some page-to-component wiring and data-loading details were not sampled, so those links are omitted.

Main entry points: [`pipeline/grwu_pipeline/synthetic.py`](https://github.com/aatyaa/grwu/blob/main/pipeline/grwu_pipeline/synthetic.py) (Synthetic dataset), [`src/lib/dsp/welch.ts`](https://github.com/aatyaa/grwu/blob/main/src/lib/dsp/welch.ts) (Welch PSD), [`pipeline/grwu_pipeline/gwosc_data.py`](https://github.com/aatyaa/grwu/blob/main/pipeline/grwu_pipeline/gwosc_data.py) (GWOSC event fetch), [`src/lib/data/dataset.ts`](https://github.com/aatyaa/grwu/blob/main/src/lib/data/dataset.ts) (Dataset loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning site"]
  node_articles["Workshop articles<br/>[index.mdx]"]
  node_curriculum["Curriculum metadata<br/>[content.config.ts]"]
  node_site["Site pages and layouts"]
end

subgraph group_browser["Browser analysis"]
  node_dataset_loader["Dataset loader<br/>[dataset.ts]"]
  node_dsp_worker["DSP worker<br/>[dsp.worker.ts]"]
  node_welch["Welch PSD<br/>[welch.ts]"]
  node_fft["Real FFT<br/>[fft.ts]"]
  node_window["Hann window<br/>[window.ts]"]
  node_python_worker["Python worker<br/>[python.worker.ts]"]
  node_python_run["Python execution<br/>[run.ts]"]
  node_python_config["Pyodide config<br/>[config.ts]"]
end

subgraph group_data["Dataset pipeline"]
  node_cli["Pipeline CLI<br/>[cli.py]"]
  node_gwosc["GWOSC event fetch<br/>[gwosc_data.py]"]
  node_synthetic["Synthetic dataset<br/>[synthetic.py]"]
  node_chirp["Toy chirp model<br/>[chirp.py]"]
  node_noise["Noise generation<br/>[noise.py]"]
  node_dataset_writer["Dataset writer<br/>[dataset.py]"]
end

subgraph group_storage["Published data"]
  node_real_data[("GW event files")]
  node_toy_data[("Toy chirp files")]
end

node_reader(("Reader"))

node_reader -->|"reads"| node_articles
node_reader -->|"uses"| node_site
node_articles -->|"follows tracks"| node_curriculum
node_cli -->|"dispatches"| node_gwosc
node_cli -->|"dispatches"| node_synthetic
node_gwosc -->|"writes datasets"| node_dataset_writer
node_synthetic -->|"generates signal"| node_chirp
node_synthetic -->|"generates noise"| node_noise
node_synthetic -->|"writes datasets"| node_dataset_writer
node_chirp -->|"uses PSD type"| node_noise
node_gwosc -.->|"exports files"| node_real_data
node_synthetic -.->|"exports files"| node_toy_data
node_dsp_worker -->|"calls"| node_welch
node_welch -->|"calls"| node_fft
node_welch -->|"uses"| node_window
node_python_worker -->|"loads runtime"| node_python_config
node_python_worker -->|"runs code"| node_python_run
node_dataset_loader -.->|"reads data"| node_real_data
node_dataset_loader -.->|"reads data"| node_toy_data

click node_articles "https://github.com/aatyaa/grwu/blob/main/src/content/articles/hidden-in-the-noise/index.mdx"
click node_curriculum "https://github.com/aatyaa/grwu/blob/main/src/content.config.ts"
click node_site "https://github.com/aatyaa/grwu/tree/main/src/pages"
click node_dataset_loader "https://github.com/aatyaa/grwu/blob/main/src/lib/data/dataset.ts"
click node_dsp_worker "https://github.com/aatyaa/grwu/blob/main/src/lib/workers/dsp.worker.ts"
click node_welch "https://github.com/aatyaa/grwu/blob/main/src/lib/dsp/welch.ts"
click node_fft "https://github.com/aatyaa/grwu/blob/main/src/lib/dsp/fft.ts"
click node_window "https://github.com/aatyaa/grwu/blob/main/src/lib/dsp/window.ts"
click node_python_worker "https://github.com/aatyaa/grwu/blob/main/src/lib/workers/python.worker.ts"
click node_python_run "https://github.com/aatyaa/grwu/blob/main/src/lib/python/run.ts"
click node_python_config "https://github.com/aatyaa/grwu/blob/main/src/lib/python/config.ts"
click node_cli "https://github.com/aatyaa/grwu/blob/main/pipeline/grwu_pipeline/cli.py"
click node_gwosc "https://github.com/aatyaa/grwu/blob/main/pipeline/grwu_pipeline/gwosc_data.py"
click node_synthetic "https://github.com/aatyaa/grwu/blob/main/pipeline/grwu_pipeline/synthetic.py"
click node_chirp "https://github.com/aatyaa/grwu/blob/main/pipeline/grwu_pipeline/chirp.py"
click node_noise "https://github.com/aatyaa/grwu/blob/main/pipeline/grwu_pipeline/noise.py"
click node_dataset_writer "https://github.com/aatyaa/grwu/blob/main/pipeline/grwu_pipeline/dataset.py"
click node_real_data "https://github.com/aatyaa/grwu/tree/main/public/data/events/GW150914"
click node_toy_data "https://github.com/aatyaa/grwu/tree/main/public/data/synthetic/toy-chirp"

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_articles,node_curriculum,node_site toneBlue
class node_dataset_loader,node_dsp_worker,node_welch,node_fft,node_window,node_python_worker,node_python_run,node_python_config toneAmber
class node_cli,node_gwosc,node_synthetic,node_chirp,node_noise,node_dataset_writer toneMint
class node_real_data,node_toy_data toneRose
class node_reader toneIndigo
```

## Components

### Learning site

- [Workshop articles](https://github.com/aatyaa/grwu/blob/main/src/content/articles/hidden-in-the-noise/index.mdx): `src/content/articles/hidden-in-the-noise/index.mdx`
- [Curriculum metadata](https://github.com/aatyaa/grwu/blob/main/src/content.config.ts): `src/content.config.ts`
- [Site pages and layouts](https://github.com/aatyaa/grwu/tree/main/src/pages): `src/pages`

### Browser analysis

- [Dataset loader](https://github.com/aatyaa/grwu/blob/main/src/lib/data/dataset.ts): `src/lib/data/dataset.ts`
- [DSP worker](https://github.com/aatyaa/grwu/blob/main/src/lib/workers/dsp.worker.ts): `src/lib/workers/dsp.worker.ts`
- [Welch PSD](https://github.com/aatyaa/grwu/blob/main/src/lib/dsp/welch.ts): `src/lib/dsp/welch.ts`
- [Real FFT](https://github.com/aatyaa/grwu/blob/main/src/lib/dsp/fft.ts): `src/lib/dsp/fft.ts`
- [Hann window](https://github.com/aatyaa/grwu/blob/main/src/lib/dsp/window.ts): `src/lib/dsp/window.ts`
- [Python worker](https://github.com/aatyaa/grwu/blob/main/src/lib/workers/python.worker.ts): `src/lib/workers/python.worker.ts`
- [Python execution](https://github.com/aatyaa/grwu/blob/main/src/lib/python/run.ts): `src/lib/python/run.ts`
- [Pyodide config](https://github.com/aatyaa/grwu/blob/main/src/lib/python/config.ts): `src/lib/python/config.ts`

### Dataset pipeline

- [Pipeline CLI](https://github.com/aatyaa/grwu/blob/main/pipeline/grwu_pipeline/cli.py): `pipeline/grwu_pipeline/cli.py`
- [GWOSC event fetch](https://github.com/aatyaa/grwu/blob/main/pipeline/grwu_pipeline/gwosc_data.py): `pipeline/grwu_pipeline/gwosc_data.py`
- [Synthetic dataset](https://github.com/aatyaa/grwu/blob/main/pipeline/grwu_pipeline/synthetic.py): `pipeline/grwu_pipeline/synthetic.py`
- [Toy chirp model](https://github.com/aatyaa/grwu/blob/main/pipeline/grwu_pipeline/chirp.py): `pipeline/grwu_pipeline/chirp.py`
- [Noise generation](https://github.com/aatyaa/grwu/blob/main/pipeline/grwu_pipeline/noise.py): `pipeline/grwu_pipeline/noise.py`
- [Dataset writer](https://github.com/aatyaa/grwu/blob/main/pipeline/grwu_pipeline/dataset.py): `pipeline/grwu_pipeline/dataset.py`

### Published data

- [GW event files](https://github.com/aatyaa/grwu/tree/main/public/data/events/GW150914): `public/data/events/GW150914`
- [Toy chirp files](https://github.com/aatyaa/grwu/tree/main/public/data/synthetic/toy-chirp): `public/data/synthetic/toy-chirp`

### Other components

- **Reader**

## Connections

- Reader → Workshop articles: reads (evidence: `README.md`)
- Reader → Site pages and layouts: uses (evidence: `README.md`)
- Workshop articles → Curriculum metadata: follows tracks (evidence: `src/content.config.ts`)
- Pipeline CLI → GWOSC event fetch: dispatches (evidence: `pipeline/grwu_pipeline/cli.py`)
- Pipeline CLI → Synthetic dataset: dispatches (evidence: `pipeline/grwu_pipeline/cli.py`)
- GWOSC event fetch → Dataset writer: writes datasets (evidence: `pipeline/grwu_pipeline/gwosc_data.py`)
- Synthetic dataset → Toy chirp model: generates signal (evidence: `pipeline/grwu_pipeline/synthetic.py`)
- Synthetic dataset → Noise generation: generates noise (evidence: `pipeline/grwu_pipeline/synthetic.py`)
- Synthetic dataset → Dataset writer: writes datasets (evidence: `pipeline/grwu_pipeline/synthetic.py`)
- Toy chirp model → Noise generation: uses PSD type (evidence: `pipeline/grwu_pipeline/chirp.py`)
- GWOSC event fetch → GW event files: exports files
- Synthetic dataset → Toy chirp files: exports files
- DSP worker → Welch PSD: calls (evidence: `src/lib/workers/dsp.worker.ts`)
- Welch PSD → Real FFT: calls (evidence: `src/lib/dsp/welch.ts`)
- Welch PSD → Hann window: uses (evidence: `src/lib/dsp/welch.ts`)
- Python worker → Pyodide config: loads runtime (evidence: `src/lib/workers/python.worker.ts`)
- Python worker → Python execution: runs code (evidence: `src/lib/workers/python.worker.ts`)
- Dataset loader → GW event files: reads data
- Dataset loader → Toy chirp files: reads data
