RABET User Guide¶
Audience. This guide is written for behavioural-research scientists who want to use RABET to score animal-behaviour video recordings, run downstream analyses, and assess inter-rater agreement. It assumes only basic familiarity with a desktop application and CSV files.
Scope. Every feature of RABET 1.3.2 is covered. A separate file
USER_GUIDE.ja.mdprovides the same content in Japanese.
Table of contents¶
- Getting started
- Annotating a video
- Analysing multiple recordings
- Visualising data
- Assessing inter-rater / intra-rater reliability
- Project mode
- Keyboard shortcuts reference
- Configuration files and persistent settings
- CSV file formats
- Troubleshooting
- Getting help and citing RABET
1. Getting started¶
1.1 Downloading RABET¶
RABET is officially distributed via Zenodo, which assigns each release a permanent DOI that you can cite:
Zenodo (official): https://doi.org/10.5281/zenodo.15313025 (concept DOI — always resolves to the latest version)
Open the Zenodo record, locate the assets for your platform, and download the corresponding archive:
| Platform | Asset |
|---|---|
| Windows | RABET-Windows-1.3.2.zip |
| macOS (Apple Silicon) | RABET-macOS-arm64-1.3.2.zip |
| macOS (Intel) | RABET-macOS-x86_64-1.3.2.zip |
| Linux | RABET-Linux-x86_64-1.3.2.tar.gz |
A mirror of the same binaries is published on the GitHub Releases page for convenience. Either source contains the same files.
1.2 Launching RABET¶
Windows¶
- Unzip the archive (
RABET-Windows-1.3.2.zip) anywhere — Desktop or a dedicatedTools\folder both work. - Open the extracted
RABETfolder and double-clickRABET.exe, or use the bundledLaunch RABET.batif you prefer a shortcut. - Windows SmartScreen may show "Windows protected your PC" on the first launch because the binary is not code-signed. Click More info → Run anyway.
macOS¶
- Unzip the archive matching your CPU architecture (Apple Silicon ≈ M1/M2/M3/M4; Intel ≈ pre-2020 Macs).
- Move the resulting
RABET.appinto yourApplicationsfolder. - The first launch must be done with right-click → Open because the bundle is unsigned. Subsequent launches behave normally.
Linux¶
- Extract the tarball:
- From the extracted directory, run:
- Optionally install a desktop entry so RABET appears in your application menu:
1.3 First launch — what RABET creates on disk¶
On its first launch, RABET creates three folders in the user application-data directory of your operating system:
configs/— JSON files for the action map, custom metrics, and colour palettelogs/— runtime log file (rabet_<date>.log); useful for troubleshootingprojects/— default location where new projects are saved
The exact path depends on the platform:
| OS | Location |
|---|---|
| Windows | %APPDATA%\RABET\ |
| macOS | ~/Library/Application Support/RABET/ |
| Linux | ~/.config/RABET/ |
RABET also remembers the last directories used in each file dialog so that subsequent picks open in the right place automatically.
1.4 The main window at a glance¶
The application window is organised as follows:
┌──────────────────────────────────────────────────────────────────┐
│ File Edit View Log Help │ ← menu bar
├──────────────────────────────────────────────────────────────────┤
│ [Annotation] [Analysis] [Visualization] [Reliability] [Project] │ ← mode tabs
├──────────────────────────────────────────────────────────────────┤
│ │
│ (active mode's main panel) │
│ │
├──────────────────────────────────────────────────────────────────┤
│ Status bar: short messages, current file, recording state │
└──────────────────────────────────────────────────────────────────┘
The mode tabs correspond to the five major workflows of RABET. You can switch between them at any time from the View menu or by clicking the tab; the active mode is highlighted.
2. Annotating a video¶
The Annotation view is RABET's primary workspace. It combines a video player, a timeline, a recording-control panel, and an action-map panel into a single screen.
┌───────────────────────────────────────────────────────────────────┐
│ │ Action Map │
│ Video player (frame-accurate) │ ┌────┬───────┐ │
│ │ │Key │Behav. │ │
│ │ ├────┼───────┤ │
│ │ │ o │Attack │ │
│ │ │ j │Side. │ │
│ │ │... │ ... │ │
├──────────────────────────────────────────────────│ └────┴───────┘ │
│ Recording controls — duration, Start/Pause/Stop │ [Add][Edit] │
├───────────────────────────────────────────────────────────────────┤
│ Timeline — colour-coded events, playhead │
└───────────────────────────────────────────────────────────────────┘
2.1 Opening a video¶
Three equivalent ways:
- Menu:
File → Open Video - Recent:
File → Open Recent Video— lists the 10 most recently opened video files - Drag-and-drop: drag a video file onto any part of the RABET window; RABET switches to Annotation mode automatically
Standard containers (.mp4, .mov, .avi, .mkv, .webm, .m4v,
.wmv, .flv, .ts) are accepted by extension. If a file's extension
is unusual (some recording software writes custom suffixes such as
.video around a standard MP4 container), RABET falls back to a magic-
number sniff and finally to a PyAV trial-open, so the file should still
load if its bytes are valid.
After opening, RABET shows the first frame in the video display area and resets the playhead to 0.
2.2 The Action Map panel¶
The Action Map maps single keyboard keys to behaviour labels. While you are recording, pressing a mapped key starts a behaviour event; releasing the same key ends it.
Default mappings (loaded from configs/default_action_map.json):
| Key | Behaviour |
|---|---|
o |
Attack bites |
j |
Sideways threats |
p |
Tail rattles |
q |
Chasing |
a |
Social contact |
e |
Self-grooming |
t |
Locomotion |
r |
Rearing |
The Action Map panel (right side of the Annotation view) shows the active map as an editable table. Use the buttons below the table to:
- Add — add a new key → behaviour mapping. The key field accepts one alphanumeric character; existing mappings prompt for confirmation before they are overwritten.
- Edit — change the behaviour label for a selected row.
- Remove — delete a mapping. Removing a behaviour does not delete already-recorded annotations using that label.
Saving and loading maps:
File → Save Action Mapwrites the current map to a.jsonfile you choose.File → Load Action Mapreplaces the current map with a saved one.File → Reset Action Map to Defaultrestores the built-in map shown above.
2.3 Video controls¶
| Action | Shortcut |
|---|---|
| Toggle play / pause | Space |
| Step forward by one configured step | → (Right Arrow) |
| Step backward by one configured step | ← (Left Arrow) |
The step size and playback rate live in the video player's control strip below the video frame. Step size defaults to one frame; you can change it to 5 or 10 frames if you want coarser navigation while paused.
The current playhead position is displayed as a time stamp
(hh:mm:ss.ms) directly below the video. While a recording session is
active, the same area also shows the session-relative clock.
2.4 Configuring a timed recording session¶
Above the timeline is the Recording controls panel. Set the test
duration with the hh:mm:ss input field (e.g. 00:05:00 for a
5-minute test).
If the Preserve on rewind checkbox is on, rewinding the video past an active (still-pressed) behaviour will keep that event in the record. If it is off (default), the active event is discarded as the playhead crosses backward through its onset — useful when you realise you started an event a few seconds too early.
2.5 Recording — state diagram¶
Start Recording Pause
IDLE ─────────────────► WAITING ─► RECORDING ─► PAUSED
▲ ▲ │ │
│ │ │ Resume│
│ └───┴───────┘
│ │
│ Stop / duration elapsed │
└───────────────────────────────────┘
Visual cues in the Recording controls panel:
| State | Button label | Status colour |
|---|---|---|
| Idle | Start Recording (green) | (blank) |
| Waiting | Cancel (grey) | blue |
| Recording | Pause (orange) | red |
| Paused | Resume (green) / Stop (red) | orange |
To make a recording:
- Open a video and set the test duration.
- Click Start Recording. The state advances to Waiting.
- Play the video (
Space). The session begins (state → Recording) when the playhead first moves; all event time stamps are measured from that moment. - Press behaviour keys to tag events; release keys to end them.
- Click Pause if you need to step away or review a moment — the playhead pauses too. Click Resume to continue.
- The session ends automatically when the duration elapses, or you can click Stop at any time.
When the session ends, the video also pauses automatically. If the recording was started from inside a project, RABET returns to the Project tab after auto-saving.
2.6 The Timeline view¶
The timeline at the bottom of the Annotation view shows all recorded events as colour-coded bars. The playhead (vertical line) tracks the video.
Common timeline operations:
- Zoom in / out — use the zoom controls or the mouse wheel over the timeline.
- Select an event — click it. The selection highlights and the event's onset and offset appear in the status bar.
- Delete the selected event — press
DeleteorBackspace. - Undo the most recent recording —
Edit → Undo Last AnnotationorCtrl + Z. (The syntheticRecordingStartmarker is never the target of Undo.)
The timeline auto-scrolls horizontally so the playhead stays in view during playback.
2.7 Saving annotations¶
File → Export Annotations writes a CSV file with three sections in
the schema-v1 layout:
- Metadata — RABET version, schema version, test duration
- Event log —
Event, Onset, Offset(seconds with 4-decimal precision) - Per-behaviour summary —
Behavior, Duration, Frequency
For the full specification see CSV_FORMAT.md.
If the file you choose already exists, RABET asks before overwriting. If you decline, the dialog reopens so you can pick a different name — RABET never silently drops your data.
2.8 Re-loading annotations¶
File → Import Annotations reads a previously exported CSV and
populates the timeline. RABET accepts both schema v0 (pre-1.2.0
exports) and v1.
File → Recent Annotations lists the 10 most recently opened
annotation files.
Importing into a session that already has events prompts you to confirm; the existing in-memory annotations are cleared on confirmation.
3. Analysing multiple recordings¶
The Analysis view aggregates several annotation CSV files into one table so you can compare animals, conditions, or repeated sessions without writing a script.
┌─────────────────────────────────────────────────────────────────┐
│ [Load Files] [Configure Metrics] ✓ Enable interval (60 sec) │
├─────────────────────────────────────────────────────────────────┤
│ ┌────────────────┬─────────────────────────────────────────┐ │
│ │ Summary │ Intervals │ │
│ ├────────────────┴─────────────────────────────────────────┤ │
│ │ animal_id │ Attack Latency │ Total Aggression │ ... │ │
│ │ rat-01 │ 18.43 │ 92.11 │ ... │ │
│ │ rat-02 │ 25.92 │ 71.30 │ ... │ │
│ │ ... │ │
│ └──────────────────────────────────────────────────────────┘ │
│ [Copy to Clipboard] [Export CSV] [Visualize Files] │
└─────────────────────────────────────────────────────────────────┘
3.1 Loading CSV files¶
Two ways:
- Click Load Files and select one or more annotation CSV files.
- Drag annotation CSVs onto the window.
RABET parses each file, extracts the animal_id from the file name
(by default, the file name stem), and applies the current metrics
configuration. Files that fail to parse are skipped with a warning in
the log.
3.2 The Summary tab¶
The Summary tab shows one row per file with the following columns:
animal_id- One pair of columns per behaviour:
<behaviour> Duration,<behaviour> Frequency - Custom metric columns (see §3.4)
Duration is the total time (seconds) spent in the behaviour during
the whole session. Frequency is the number of distinct events.
Click Copy to Clipboard to copy the entire table in a format suitable for direct paste into Excel, JASP, R, or SPSS.
3.3 The Intervals tab — time-binned analysis¶
Tick Enable interval analysis to split each session into fixed-
length windows (default 60 seconds). The Intervals tab then shows one
row per (animal, interval) pair.
Important interpretation note:
Durationis the number of seconds of the behaviour that overlap the interval — a behaviour that straddles two intervals is apportioned to both.Frequencycounts behaviours whose onset falls inside the interval — a single behaviour is counted once even if it spans multiple intervals.
This makes per-interval Duration suitable for cumulative rate plots and Frequency suitable for event-count statistics.
3.4 Configuring custom metrics¶
Click Configure Metrics to open the metrics editor. Two kinds of metrics are supported:
Latency metrics¶
Time, in seconds, from the start of the session to the first occurrence of a chosen behaviour. The default configuration ships with:
- Attack Latency — first
Attack bitesevent
You can add as many latency metrics as you need (e.g. Sideways threats Latency) and toggle each on or off independently.
Total-time metrics¶
Sum of Duration over a chosen set of behaviours. The default
configuration ships with:
- Total Aggression — Attack bites + Sideways threats + Tail rattles
- Chasing
- Total Aggression (without tail-rattles) — Attack bites + Sideways threats + Chasing
The set of behaviours per total-time metric is editable, so you can define category sums tailored to your study (e.g. Exploration = Locomotion + Rearing).
3.5 Exporting results¶
- Copy to Clipboard copies the active tab as TSV (tab-separated values) ready for spreadsheet import.
- Export CSV writes the Summary table as
summary_table.csv. If interval analysis is enabled, the interval table is also exported assummary_intervals.csvalongside it. - Visualize Files switches to the Visualization tab with the currently loaded files already selected.
4. Visualising data¶
The Visualization view renders a raster plot — one row per animal/file, one tick per event, colour-coded by behaviour.
4.1 Raster plot basics¶
After loading annotation CSVs (or jumping in from Analysis via Visualize Files), each file becomes a horizontal track. Events appear as coloured tick marks at their onset time.
On a first load with multiple files, RABET defaults to showing only the first file to keep the view legible; the remaining files appear unchecked in the file list on the right.
4.2 Filtering¶
Two panels of checkboxes control what is shown:
- Files / individuals — toggle each animal track on or off.
- Behaviours — toggle each behaviour colour on or off. A colour swatch is shown next to each behaviour label.
Use these to focus on a subset (e.g. only aggressive behaviours, only the test animals from one condition) without re-loading data.
4.3 Customising colours¶
Click a colour swatch next to a behaviour name to open a colour
picker. The selected colour is applied immediately and saved to
configs/custom_color_map.json, so it persists across application
restarts.
To reset to the default palette, delete custom_color_map.json while
RABET is closed.
4.4 Grid lines and axis range¶
- Vertical grid / Horizontal grid — toggle separately.
- Grid colour — click the grid colour swatch to change.
- Max range — set the visible x-axis maximum (seconds). Useful for comparing a 5-minute and a 10-minute session side by side without the longer one stretching the shorter one.
4.5 Exporting the plot¶
Click Export to save the current view as PNG, SVG, or PDF. The file format is taken from the file extension you choose; if you omit the extension, the format selected in the dialog filter is used (no surprises).
5. Assessing inter-rater / intra-rater reliability¶
The Reliability view computes agreement metrics directly from RABET's own outputs. Two modes are provided, both reachable from the mode bar at the top of the view.
5.1 What the Reliability tab does¶
- Inter-rater reliability — two scorers code the same videos, and you want to know how closely their numbers agree.
- Intra-rater reliability — one scorer codes the same video twice (separated in time), to test their own consistency.
The same RABET tab handles both: it does not care whether the two CSV files came from the same scorer or different ones.
5.2 Summary mode¶
Required inputs. Two summary_table.csv files exported from the
Analysis view, one per scorer (or one per scoring round). Each row in
each file represents one animal identified by animal_id.
Procedure.
- Switch to the Reliability view (
View → Reliability). - Choose Summary mode.
- Click Load Summary CSV A and pick the first file.
- Click Load Summary CSV B and pick the second file.
- RABET matches animals on
animal_idacross the two files and computes, per metric: - ICC(2,1) — two-way random, single-measurement intraclass correlation
- Pearson r — linear correlation of paired metrics
- Mean absolute difference — average
|A − B|across matched animals A scatter plot per metric is rendered automatically.
Output. The results table colour-codes ICC values using Cicchetti (1994) bands:
| ICC | Interpretation | Colour |
|---|---|---|
| ≥ 0.75 | excellent | green |
| 0.50 – 0.75 | fair / good | amber |
| < 0.50 | poor | red |
Click Export Results to save the table as a CSV.
Animals that appear in only one file are listed under Unmatched animals below the table, so you can verify that any missing IDs are intentional.
5.3 Detailed mode¶
Required inputs. Two annotation CSVs (one per scorer / round) scored on the same video, so onset / offset times are directly comparable.
Procedure.
- Choose Detailed mode in the Reliability view.
- Load Annotation CSV A and Annotation CSV B.
- Set the bin width (seconds). A bin width of 1 s is a common default for moment-to-moment behavioural coding.
- RABET converts each annotation track into a per-bin behaviour vector and computes, for every behaviour found in either file:
- Cohen's κ — chance-corrected agreement
- Krippendorff's α — alpha with nominal data treatment
- Raw % agreement — fraction of bins where both raters agree
- A pairwise event-raster overlay shows both raters' events stacked vertically per behaviour, with disagreement segments visible at a glance.
The κ values are colour-coded using Landis & Koch (1977) bands:
| κ | Interpretation | Colour |
|---|---|---|
| ≥ 0.70 | substantial | green |
| 0.40 – 0.70 | moderate | amber |
| < 0.40 | poor | red |
Krippendorff's α uses the same bands as κ.
5.4 Interpretation guide¶
The colour banding is meant as a screening tool, not a substitute for context-specific judgment:
- Cicchetti's ICC bands (poor / fair / good / excellent at 0.4 / 0.59 / 0.74) come from clinical-measurement contexts; behavioural-science conventions are similar but vary by field.
- Landis & Koch's κ bands are widely cited but were proposed as a guideline, not a hard rule. In dense, fast-changing behaviour, even good raters often land in the 0.4 – 0.6 range.
If you see agreement that is lower than you expect, the Detailed mode raster overlay is the fastest way to spot the source — typically a constant offset (one rater starts each event 1–2 s late) or a class-confusion (one rater splits a behaviour into two sub-classes the other rater does not use).
5.5 Cross-language reproducibility¶
docs/reliability/compute_agreement.R is a stand-alone R script that
reproduces every Summary-mode statistic (ICC(2,1) via psych::ICC,
Pearson r via cor, mean absolute difference). Run it as a sanity
check or to embed RABET-derived agreement numbers into an R analysis
pipeline:
source("docs/reliability/compute_agreement.R")
compute_agreement("rater_a_summary.csv", "rater_b_summary.csv")
6. Project mode¶
A project in RABET is a directory plus a small manifest file that groups related assets:
- Videos to score
- Annotation CSVs scored from those videos
- Action maps used during scoring
- Analyses (saved summary tables, interval tables, etc.)
Projects help when you are scoring an experiment with many videos and want a single place to track which ones have been done and how.
6.1 Creating a new project¶
View → Projectto switch to the Project mode.- Click New Project.
- Choose a parent directory, enter a project name and an optional description.
RABET creates a project subdirectory and an empty manifest file. The project view now shows the (still empty) tree.
6.2 Adding files¶
Use the Add Video, Add Annotation, Add Action Map, and Add Analysis buttons. Each opens a file picker.
- A confirmation dialog asks whether to copy the file into the project directory (recommended for reproducibility, makes the project self-contained) or link by reference (leaves the file where it is).
- Adding many files is allowed; the manifest is auto-saved after each change.
6.3 Annotating from inside a project¶
Select a video in the tree and click Annotate. RABET:
- switches to the Annotation view,
- loads the selected video,
- records annotations into a file inside the project directory.
When the recording session ends, RABET returns to the Project view automatically and the new annotation appears in the tree.
The annotation file name follows a human-readable pattern (e.g.
rat-01_2026-05-21_001.csv) — the older versions used an opaque
internal video hash in the file name, which 1.2.2 removed.
6.4 Saving and re-opening projects¶
- Save Project is implicit: the manifest is rewritten after each Add / Remove / Annotate operation.
- Open Project asks for a project directory.
- Close Project clears the in-memory project state and returns the Project view to the empty start screen.
If you have one project open and try to load a video whose annotation would collide with the project's, RABET warns rather than silently reusing the project's annotation path.
7. Keyboard shortcuts reference¶
Open the Help → Show Shortcuts dialog (or press F1) to see the
current set, including your behaviour-key map. For reference, the
built-in shortcuts are:
| Shortcut | Action |
|---|---|
Space |
Toggle video play / pause |
→ |
Step forward by the configured step size |
← |
Step backward by the configured step size |
Ctrl + Z |
Undo the most recently recorded annotation |
Delete or Backspace |
Delete the selected timeline annotation |
F1 |
Open the Shortcuts dialog |
| (any mapped key) | Tag the corresponding behaviour while recording |
Behaviour keys come from the active action map and are editable from the Action Map panel — see §2.2.
8. Configuration files and persistent settings¶
8.1 Where RABET stores user data¶
| OS | Path |
|---|---|
| Windows | %APPDATA%\RABET\ |
| macOS | ~/Library/Application Support/RABET/ |
| Linux | ~/.config/RABET/ |
Below that root, RABET maintains:
configs/default_action_map.json— built-in defaults (never modified after first launch)configs/user_action_map.json— the action map you've edited; this is what RABET loads on startupconfigs/default_metrics.json— the latency / total-time metrics configurationconfigs/custom_color_map.json— per-behaviour raster-plot colourslogs/rabet_<date>.log— runtime log
8.2 Persistent UI settings¶
The window geometry, last-opened view, recording duration, step size, playback rate, "preserve on rewind" flag, interval-analysis settings, recent-files lists and last-used file-dialog directories are stored between runs.
8.3 Resetting to defaults¶
The fastest reset:
- Action map:
File → Reset Action Map to Default - Custom colours: delete
configs/custom_color_map.json - Everything: close RABET and delete the entire RABET application data folder
9. CSV file formats¶
RABET exports three CSV layouts:
- Annotation CSV — produced by
File → Export Annotationsfrom the Annotation view. Three sections (metadata, event log, summary). - Summary CSV (
summary_table.csv) — produced by the Analysis view. One row per animal with custom-metric columns. - Interval summary CSV (
summary_intervals.csv) — produced by the Analysis view when interval analysis is enabled. One row per(animal, interval)pair.
All three carry RABET Version and Format Schema metadata so
downstream tools can detect the producing application. Times are
seconds with 4-decimal precision; the encoding is UTF-8.
The complete schema, the v0 → v1 compatibility matrix, and a minimal
pandas parser live in CSV_FORMAT.md.
10. Troubleshooting¶
"Video won't open even though VLC can play it"¶
RABET 1.3.2 accepts any file whose extension is in its whitelist, or
whose first bytes match a known video container (via the filetype
library), or which PyAV can open as a trial. If a file fails all three
tests, RABET shows an error. Convert the file with FFmpeg as a
last resort:
"Reliability tab metrics show as blank / None"¶
The Reliability tab depends on pingouin, scipy, statsmodels,
and krippendorff. In the pre-built binary these are bundled. If you
run from source, install with:
If you see ImportError in logs/rabet_<date>.log mentioning these
packages, the bundle is missing them — please open an issue with the
log attached.
"I rewound past an event and lost it"¶
By default, RABET discards an active (still-pressed) event when the playhead rewinds past its onset. Toggle the Preserve on rewind checkbox in the Recording controls panel to keep such events instead.
"RABET shows the wrong fonts on first launch"¶
On macOS, the first-launch font scan may flag a handful of system fonts as unloadable. This is benign; the rest of the matplotlib font database loads fine and RABET uses Qt's default font for its widgets.
Where to find the log file¶
Log → View Logs opens the log directory in your OS file manager. The
most recent file is rabet_<today>.log. You can also use
Log → Clean Up Logs to delete log files older than 30 days.
11. Getting help and citing RABET¶
Help and bug reports¶
- Issues: https://github.com/mi2e-K/RABET/issues
- Please include the application version (
Help → About) and the relevant log file when reporting a problem.
Citing RABET¶
Machine-readable citation metadata lives in
CITATION.cff. A human-readable form is:
Mitsui, K. (2026). RABET — Real-time Animal Behavior Event Tagger (Version 1.3.2). https://github.com/mi2e-K/RABET doi:10.5281/zenodo.15313025
The DOI above is the concept DOI and always resolves to the latest RABET release on Zenodo. Each individual release also receives its own version-specific DOI.
A tool paper describing RABET is in preparation. Once published, please cite the paper in addition to (or instead of) the Zenodo deposit.