# ktt920/easygait architecture

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

- Interactive diagram: https://gitdiagram.com/ktt920/easygait
- Repository: https://github.com/ktt920/easygait

## Overview

EasyGait is a single-file desktop tool for manually measuring mouse gait from video. The analyst selects a recording, calibrates pixel scale, marks right and left hind-paw positions while navigating video frames, and receives calculated gait metrics saved as tabular output. The same source also provides coordinate and trajectory snapshot saving. The sampled excerpts show the workflow and calculations, but omit some intervening code, so uncertain UI wiring and output details are not expanded.

Main entry points: [`EasyGait.py`](https://github.com/ktt920/easygait/blob/main/EasyGait.py) (EasyGait main)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Analysis workflow"]
  node_easygait["EasyGait main<br/>[EasyGait.py]"]
  node_video["Video recording"]
  node_video_navigation["Video navigation<br/>[EasyGait.py]"]
end

subgraph group_measurement["Gait measurement"]
  node_calibration["Scale calibration<br/>[EasyGait.py]"]
  node_paw_marking["Paw marking<br/>[EasyGait.py]"]
  node_gait_metrics["Gait metrics<br/>[EasyGait.py]"]
end

subgraph group_results["Results and export"]
  node_metrics_csv["Metrics CSV"]
  node_coordinate_export["Coordinate export<br/>[EasyGait.py]"]
  node_snapshot_export["Trajectory snapshot<br/>[EasyGait.py]"]
  node_output_files["Output files"]
end

node_analyst(("Analyst"))

node_analyst -->|"runs"| node_easygait
node_easygait -->|"selects"| node_video
node_easygait -->|"plays frames"| node_video_navigation
node_easygait -->|"calibrates"| node_calibration
node_easygait -->|"records points"| node_paw_marking
node_paw_marking -->|"provides coordinates"| node_gait_metrics
node_gait_metrics -->|"writes metrics"| node_metrics_csv
node_easygait -->|"saves coordinates"| node_coordinate_export
node_easygait -->|"saves snapshot"| node_snapshot_export
node_coordinate_export -->|"writes"| node_output_files
node_snapshot_export -->|"writes"| node_output_files

click node_easygait "https://github.com/ktt920/easygait/blob/main/EasyGait.py"
click node_video_navigation "https://github.com/ktt920/easygait/blob/main/EasyGait.py"
click node_calibration "https://github.com/ktt920/easygait/blob/main/EasyGait.py"
click node_paw_marking "https://github.com/ktt920/easygait/blob/main/EasyGait.py"
click node_gait_metrics "https://github.com/ktt920/easygait/blob/main/EasyGait.py"
click node_coordinate_export "https://github.com/ktt920/easygait/blob/main/EasyGait.py"
click node_snapshot_export "https://github.com/ktt920/easygait/blob/main/EasyGait.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_easygait,node_video,node_video_navigation toneBlue
class node_calibration,node_paw_marking,node_gait_metrics toneAmber
class node_metrics_csv,node_coordinate_export,node_snapshot_export,node_output_files toneMint
class node_analyst toneIndigo
```

## Components

### Analysis workflow

- [EasyGait main](https://github.com/ktt920/easygait/blob/main/EasyGait.py): `EasyGait.py`
- **Video recording**
- [Video navigation](https://github.com/ktt920/easygait/blob/main/EasyGait.py): `EasyGait.py`

### Gait measurement

- [Scale calibration](https://github.com/ktt920/easygait/blob/main/EasyGait.py): `EasyGait.py`
- [Paw marking](https://github.com/ktt920/easygait/blob/main/EasyGait.py): `EasyGait.py`
- [Gait metrics](https://github.com/ktt920/easygait/blob/main/EasyGait.py): `EasyGait.py`

### Results and export

- **Metrics CSV**
- [Coordinate export](https://github.com/ktt920/easygait/blob/main/EasyGait.py): `EasyGait.py`
- [Trajectory snapshot](https://github.com/ktt920/easygait/blob/main/EasyGait.py): `EasyGait.py`
- **Output files**

### Other components

- **Analyst**

## Connections

- Analyst → EasyGait main: runs
- EasyGait main → Video recording: selects
- EasyGait main → Video navigation: plays frames
- EasyGait main → Scale calibration: calibrates
- EasyGait main → Paw marking: records points
- Paw marking → Gait metrics: provides coordinates
- Gait metrics → Metrics CSV: writes metrics
- EasyGait main → Coordinate export: saves coordinates
- EasyGait main → Trajectory snapshot: saves snapshot
- Coordinate export → Output files: writes
- Trajectory snapshot → Output files: writes
