RadioTRAV (Time Resolved Autoradiography Visualization) processes, analyzes, and visualizes nuclear radiation data from Timepix3 detectors (e.g. .t3pa or derived .txt / segmented text files).
- Segmentation: cluster ID assignment for individual tracks.
- Classification: Alpha / Beta / Gamma / Other, with per-cluster metrics.
- Sequence analysis: decay-chain style sequences in space and time.
- Dashboard: interactive web viewer for classification and sequences.
- Rendering: export to MP4 or PNG.
RadioTRAV uses uv for environment and dependency management.
macOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | shWindows (PowerShell):
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"Restart your terminal after installing so uv is on your PATH.
Clone this repository and install:
git clone https://github.com/ida-mdc/radiotrav.git
cd radiotrav
uv sync
uv pip install -e .The radiotrav command-line tool is now available as uv run radiotrav ....
To update after pulling new code:
git pull
uv sync
uv pip install -e .Run the complete pipeline (segmentation, classification, and sequence analysis):
uv run radiotrav process input_events.t3pa output_dir --time-window 100 --spatial-radius 2This creates segmented.txt, classification.csv, chains.csv, and hot_pixels.csv in the output directory.
You can adjust the thresholds used for Alpha/Beta/Gamma classification:
uv run radiotrav process input_events.t3pa output_dir --time-window 100 \
--gamma-max-area 10 \
--alpha-min-radius 1.5 \
--alpha-min-roundness 0.85 \
--beta-max-radius 5.0 \
--beta-min-dimension 6Before segmentation, pixels that fire far more often than the rest of the detector are identified as dead or noisy and removed. The threshold is 50 × the 99th percentile of per-pixel event counts across the whole dataset: a pixel must fire at least 50× more than a normally-busy pixel to be masked. The masked pixels and their event counts are written to hot_pixels.csv in the output directory. This step can be disabled with --no-hot-pixel-filter.
Events are grouped into clusters by linking each event to any neighbour that fired within --spatial-radius pixels and --time-window nanoseconds of it. The result is written to segmented.txt.
Each cluster is described by its shape (bounding box, pixel area, maximum inscribed-circle radius, geometric roundness) and classified as one of:
- Gamma — small spot (area ≤
--gamma-max-area) - Alpha — large, round, thick deposit (
max_radius > --alpha-min-radiusandroundness > --alpha-min-roundness) - Beta — elongated thin track (
max_radius < --beta-max-radiusand at least one dimension >--beta-min-dimension) - Other — anything that does not fit the above
Results are written to classification.csv.
Clusters that are spatially and temporally close to each other are linked into chains (decay sequences). Chains are written to chains.csv.
- Usage:
uv run radiotrav process INPUT_FILE OUTPUT_DIR --time-window ... - Options:
--time-window [FLOAT](required): maximum time gap in nanoseconds between pixels in the same cluster.--spatial-radius [INT](default:1): spatial search radius in pixels.--sequence-radius [FLOAT](default:15.0): spatial radius for sequence analysis in pixels.--sequence-time-window [FLOAT](default:1e9): maximum time gap between events in a chain in nanoseconds.--sequence-max-length [INT]: maximum number of events in a chain (longer chains ignored).--sequence-pattern-lookup [PATH]: CSV file with pattern definitions for sequence matching.--start-row [INT](default:0): first input row to load.--n-rows [INT](default: all): number of rows to process.--no-hot-pixel-filter: skip the hot pixel masking step (see above).--skip-existing-segmentation: skip segmentation ifsegmented.txtalready exists in output directory.--skip-existing-classification: skip classification ifclassification.csvalready exists in output directory.- Classification parameters:
--gamma-max-area [FLOAT](default:9.0): maximum mask_area for Gamma classification. Clusters with area ≤ this value are classified as Gamma.--alpha-min-radius [FLOAT](default:3.0): minimum max_radius for Alpha classification. Alpha clusters must have max_radius > this value.--alpha-min-roundness [FLOAT](default:0.85): minimum mask_roundness for Alpha classification. Alpha clusters must have roundness > this value.--beta-max-radius [FLOAT](default:4.0): maximum max_radius for Beta classification. Beta clusters must have max_radius < this value.--beta-min-dimension [FLOAT](default:5.0): minimum width or height for Beta classification. Beta clusters must have width > this OR height > this.
Export results to MP4 or PNG with the same filtering options as the dashboard:
# Basic rendering
uv run radiotrav render output_dir output.mp4
# Filter by radiation type
uv run radiotrav render output_dir alpha_only.mp4 --radiation Alpha
# Filter by sequence pattern
uv run radiotrav render output_dir beta_alpha_chains.mp4 \
--seq-query "Beta - Alpha" --seq-exact
# Custom projection and mode
uv run radiotrav render output_dir energy_sideview.mp4 \
--projection yt --mode energy --speed 100- Usage:
uv run radiotrav render INPUT_PATH OUTPUT_FILE [options] - Input:
INPUT_PATHcan be a project output directory (withsegmented.txt,classification.csv,chains.csv) or a single events file. - Options:
--classification-csv [PATH]: classification CSV (optional if input is project output dir).--chains-csv [PATH]: chains CSV for sequence filter (optional if input is project output dir).--radiation [ALL|Alpha|Beta|Gamma|Other](default:ALL): filter by radiation type.--seq-query [STRING]: filter chains by signature (e.g.,'Alpha - Beta').--seq-exact: match chain signature exactly (otherwise contains).--seq-max-dt [FLOAT]: max time delta in chain (seconds).--seq-max-dist [FLOAT]: max spatial distance in chain (pixels).--view [animated|max](default:animated):animated(MP4) ormax(PNG projection).--projection [xy|yt](default:xy):xy(top-down) oryt(side view, Y vs Time).--mode [classification|energy](default:classification): display mode.--time-window [FLOAT]: fade in/out window in nanoseconds (e.g.,1e9for 1s). Events within this window around each frame center are blended with alpha fade.--speed [FLOAT](default:1.0): playback speed multiplier. Higher = fewer frames, faster render.--fps [INT](default:30): frames per second (for MP4 format).--start-row [INT](default:0): first input row to load.--n-rows [INT](default: all): number of rows to process.
Both process and render support partial loading of very large input files using --start-row and --n-rows:
uv run radiotrav render input.txt test.mp4 --n-rows 10000The dashboard is a single-page web app. You can open it in two ways:
- Hosted version (no install needed): https://ida-mdc.github.io/radiotrav/dashboard/
- Local version: open
docs/dashboard/index.htmlfrom this repository in your browser
All file loading happens client-side — no data is uploaded anywhere.
Use the three file pickers in the top-right header to load the outputs from radiotrav process:
| Field | File | Required for |
|---|---|---|
| segmented.txt (events) | segmented.txt |
Event viewer |
| classification.csv | classification.csv |
Classification tabs, viewer coloring |
| chains.csv | chains.csv |
Sequence tabs |
Files can be loaded in any order and independently.
The filter bar below the header applies to all tabs and the event viewer simultaneously:
- Classification — show only one radiation type (Alpha / Beta / Gamma / Other) or all
- Sequence pattern filter — text filter on chain signatures, e.g.
Beta - Alpha; toggle full match to require an exact match instead of a substring match - Max Δt (s) — exclude chains where any step exceeds this time gap
- Max Δd (px) — exclude chains where any step exceeds this spatial distance
- Reset filters — clears all filters and selections
The status bar on the left of the filter row shows events: N | clusters: N | chains: N, updating as filters change.
Classification Plots — aggregated statistics for the loaded classification data:
- Summary counts (total clusters, counts per radiation type, mean energy)
- Bar chart: number of clusters per class
- Histogram: energy (ToT) distribution, grouped by radiation type
- Histogram: max radius distribution, grouped by radiation type
Classification Gallery — thumbnail grid of individual clusters:
- Sort by any numeric column (energy, radius, etc.), ascending or descending
- Switch between Grid (image + label) and Compact (image-only mosaic) layouts
- Click any cluster to jump the event viewer to that cluster's position in time
Sequence Plots — aggregated statistics for decay chains:
- Bar chart: most frequent chain patterns (e.g.
Alpha - Beta) - Histogram: chain lengths
- Histogram: time gaps between events within chains
Sequence Gallery — when a sequence filter is active, shows individual matching chains; otherwise shows aggregated patterns grouped by signature:
- Click a pattern or chain to select it; the event viewer and classification gallery update to show only those clusters
The event viewer shows the detector as a 256×256 pixel canvas, animated over time.
- View mode:
- Animated (fade) — events fade in and out around the current time center
- Animated (sum) — events accumulate within the time window
- Max projection / Sum projection — static image over the full dataset
- Display mode:
- Classification — pixels colored by cluster type (red = Alpha, cyan = Beta, green = Gamma, grey = Other)
- Energy (ToT) — pixels colored by Time-over-Threshold value
- Density — pixels colored by event count
- Time — pixels colored by arrival time
- Colormap — selectable for Energy, Density, and Time modes (Turbo, Viridis, Plasma, etc.)
- Time center / Window size — scrub through time and control how wide a time slice is shown
- Speed — controls playback rate; drag the slider or press Play
- Fullscreen — the ⛶ button in the top-right corner of the canvas
The Processing Metadata card below the viewer shows the segmentation and classification parameters that were embedded in the CSV files, so you always know how the data was produced.