Data Outputs Reference¶
Everything a session writes to disk, and every column of the Master CSV and the Trials CSV. Metric definitions live in the Metrics Reference; this page documents the files and column names as they appear in your output directory.
The output directory¶
All files are written to the study’s configured output directory
(TaskConfig.output_dir, set in Study Setup). If the path cannot be created
or a relative path cannot be resolved, the app falls back to the OS-native
application data directory.
The directory is permanently OSF-ready: everything a methods section or an OSF upload needs is written there automatically (see the provenance files below). There is no export step — to publish or archive a study, compress the output directory as-is and upload it.
Study-level provenance files¶
The first session of a study writes three study-level files next to the session data, namespaced by study title like everything else. They are maintained automatically on every subsequent session; no one has to remember to create or update them.
[StudyTitle]_study.json
[StudyTitle]_provenance.json
[StudyTitle]_data_dictionary.md
File |
Contents |
|---|---|
|
A frozen copy of the exact study configuration the study started
under. It is written once and never replaced. If a changed config runs
sessions into the same directory (a mid-study design change), the changed
config is recorded alongside as a timestamped
|
|
The provenance record a methods section needs: |
|
A data dictionary generated from the scoring models themselves: every column of this study’s Master CSV and Trials CSV — including the study-specific per-color and conditional columns — plus every field of the four per-session files. Because it is generated, a column added in a future version appears in the dictionary automatically; it is regenerated whenever the schema (or the running config’s column set) changes. Do not edit it by hand. |
Like the CSV writers, provenance upkeep never blocks a session: if one of
these files cannot be written (locked, read-only), the session’s own data is
saved exactly as always and the problem is reported in the write response’s
warnings.
Session files¶
Each completed session writes four files, namespaced by study title, candidate ID, and a UTC timestamp so nothing is ever overwritten:
[StudyTitle]_[CandidateID]_[Timestamp]_events.jsonl
[StudyTitle]_[CandidateID]_[Timestamp]_metrics.json
[StudyTitle]_[CandidateID]_[Timestamp]_config.json
[StudyTitle]_[CandidateID]_[Timestamp]_session.json
File |
Contents |
|---|---|
|
Raw pump-level telemetry: one JSON object per |
|
The full scored output — the complete |
|
A snapshot of the exact |
|
The session envelope: |
Test Run (practice) sessions¶
Use the Test run button in the Researcher View to click through a study — new preset, new lab machine, RA training — without touching the dataset. A Test Run is the real pipeline end-to-end (gameplay, scoring, file writing), so a passing test run is evidence the real thing works. It differs from an official run in exactly three ways:
Destination. Its four session files land in a
practice/subfolder of the output directory — inspectable, but never mingled with official data. The Master CSV, the trials CSV, and the provenance files are never created, appended to, or refreshed by a practice session.Stamps. The participant ID is pre-filled with
TEST(practice is exempt from the ID guardrails), and the session envelope carries"practice": true, so a stray file is identifiable by content, not just by location.Banner. Every screen of the session — consent, ID, gameplay, debrief — wears a high-contrast “TEST RUN — data not recorded” banner, so a real participant can never be run in practice mode unnoticed.
When publishing or archiving an output directory, the practice/ subfolder
can simply be deleted (or left in — it is clearly separated and stamped).
The Master CSV¶
Alongside the per-session files, the sidecar appends one flat row per session to a single shared spreadsheet in the output directory:
[StudyTitle]_results.csv
The file is created with a header row on the first write.
Per-color metrics are flattened to
{color}_{field}columns so they load as plain variables in SPSS or R.Non-scalar fields are deliberately excluded so every cell is scalar and loads cleanly in SPSS/R: the nested
behavioral_profilenarrative, thesession_warningslist, and theev_optimal_stopsmapping. Read them from*_metrics.json. (The per-color EV-optimal stops are also available as the scalar{color}_ev_optimal_stopcolumns.)
Upgrading mid-study: migration and backups¶
Software updates can add columns to the Master CSV. The writer compares the file’s header to the current column schema on every append, so one file per study stays the rule even across app versions — columns are never silently misaligned:
Header matches — the row is appended, exactly as before.
Older header (the file predates newly added columns) — the file is first copied to a timestamped backup (
[StudyTitle]_results_backup_[Timestamp].csv), then rewritten under the current header: pre-upgrade rows keep their values by column name and get honest blanks in the new columns. The new session row is appended and the migration is reported in the write response’swarnings.Unknown columns (the file was written by a newer app version) — the file is left untouched; the session row is written to a timestamped sibling file (
[StudyTitle]_results_unmerged_[Timestamp].csv) with a warning, for you to merge by hand.Locked, unwritable, or damaged file (e.g. open in Excel, or re-saved in a non-UTF-8 encoding) — same sibling-file fallback: the session is never lost and never aborts the run.
Identity columns¶
Column |
Meaning |
|---|---|
|
Session write time (UTC, filename-safe format) |
|
The client-generated session identifier |
|
The participant ID entered at the start of the run |
|
The condition assigned at the ID screen — present only for studies whose preset declares |
Session-integrity columns¶
Column |
Meaning |
|---|---|
|
Overall validation verdict for the session (the |
|
Balloons played |
|
Total pumps across the session |
|
Balloons lost to bursts |
|
Balloons banked |
Risk-taking and calibration columns¶
Column |
Meaning |
|---|---|
|
Mean pumps on collected balloons (RNG-truncation safe) |
|
Mean pumps across all balloons |
|
Mean pumps as a ratio of the EV-optimal stop |
|
EV(participant)/EV(optimal) × 100, EV-weighted across colors |
|
Calibration score (explosion penalty reported separately) |
|
Excess explosion rate vs expected at optimal play |
|
Observed explosion rate |
|
1 − CV of per-color EV efficiencies (empty when fewer than two risk contexts) |
|
Alignment with the per-color optimal stops |
|
Pump differentiation across hazard levels |
|
Safest-vs-riskiest color pump differentiation |
|
Distance above/below optimal stopping |
|
Normalized patience index |
|
Latency-based impulsivity (fast pumping) |
|
Mean inter-pump latency (ms) |
Learning and adaptation columns¶
Column |
Meaning |
|---|---|
|
Session-long learning estimator |
|
First-half vs second-half improvement |
|
First-third vs last-third improvement |
|
Change in color differentiation across the session |
|
Pump change after a same-color explosion |
Consistency and composite columns¶
Column |
Meaning |
|---|---|
|
Overall response consistency |
|
Pump-timing consistency within balloons |
|
Pump-count consistency between balloons |
|
Undifferentiated pumping across colors (boolean) |
|
Composite: calibration, learning, uniformity, earnings |
|
Session earnings in the study’s currency |
|
Earnings relative to simulated optimal play |
Payout columns¶
For studies whose preset declares a payout block (issue 41) — a conversion
rate and a freeform currency label (”₺”, “$”, “credits”) — the amount
actually owed is recorded next to the task-internal earnings. Like
condition, these columns are present only for studies that configure a
payout; other studies’ column sets are unchanged.
The rounding rule, applied once in the scoring engine (so the debrief screen
and the CSV can never disagree): payout_amount = money_collected × payout.rate, rounded half-up to 2 decimals (0.725 → 0.73 — not banker’s
rounding).
Column |
Meaning |
|---|---|
|
The converted amount owed to the participant |
|
The preset’s freeform currency label, verbatim |
Data-quality (QC) columns¶
Automatic data-quality flags (also in *_metrics.json). Flags annotate,
never exclude: no session is ever dropped, reordered, or withheld because a
rule tripped — exclusion is the analyst’s preregistered decision. Thresholds
are configurable in the Study Preset’s optional qc block and travel in
study.json; when the block is absent, the literature-informed defaults
below apply. The thresholds each session was actually judged against are
recorded in its own row, so a flag’s criteria can be stated post hoc.
Column |
Rule |
Default |
|---|---|---|
|
Number of trials containing at least one inter-pump gap faster than the fast-response threshold |
threshold: 100 ms ( |
|
Longest run of consecutive trials with zero pumps |
threshold: 5 trials ( |
|
|
— |
|
The fast-response threshold (ms) this session was judged against |
100 |
|
The streak length this session was judged against |
5 |
Per-color columns — {color}_{field}¶
One set per configured color, in the study’s color order (for the default
study: purple_…, teal_…, orange_…):
Field (as |
Meaning |
|---|---|
|
Mean pumps on this color (all balloons) |
|
Mean pumps on collected balloons of this color |
|
Balloons of this color played |
|
Balloons of this color banked |
|
Explosion rate on this color |
|
Explosion surplus vs optimal play on this color |
|
EV efficiency on this color |
|
The color’s numeric EV-optimal stop |
|
The color’s risk tier label |
|
Whether all-balloon data substituted for collected-only |
In addition, orange_avg_pumps is a single top-level column: the mean collected
pumps on the study’s highest-risk color (the color with the lowest EV-optimal
stop). It keeps its historical name from the default study — for a renamed study
it still holds the riskiest color’s average, not a color literally named orange.
Per-color averages for every color are the {color}_average_pumps and
{color}_behavioral_avg_pumps columns above; there is no separate low- or
mid-risk top-level average column.
What is not in the CSV¶
behavioral_profile — the narrative risk-style classification with its
description and dominant traits — is only in *_metrics.json. Join the CSV
to the JSON files on candidate_id + timestamp_utc if you need it in a
dataframe.
The Trials CSV¶
Alongside the session-level Master CSV, the sidecar appends one row per trial (balloon) to a second study-wide spreadsheet — the long-format table mixed-model analyses in R or SPSS consume directly, with no manual concatenation of per-session files:
[StudyTitle]_trials.csv
Rows are appended in session order at each session’s completion, and the file
follows the same migration and backup rules
as the Master CSV (header on create, timestamped backup + auto-migrate on a
schema change, timestamped *_unmerged_* sibling when the file is locked).
The trial rows are computed by the scoring engine (scoring.bart.trial_table),
so CLI users of the scoring package get exactly the same table.
Column |
Meaning |
|---|---|
|
Session write time (UTC) — same value as the session’s Master CSV row |
|
The client-generated session identifier |
|
The participant ID entered at the start of the run |
|
The session’s assigned condition — present only for studies whose preset declares |
|
1-based trial index within the session |
|
The balloon’s color name |
|
The hazard family this balloon’s color ran under (from the study config) |
|
Pumps on this balloon |
|
|
|
Pumps × reward when collected; 0 when popped |
|
Mean gap between this trial’s successive pumps (ms); empty when the trial has fewer than two pumps |