PVT-BA
An adaptive Psychomotor Vigilance Test that measures sustained attention and reaction time. A millisecond counter appears after a random delay; the participant taps the screen as quickly as possible. A Bayesian sequential algorithm classifies vigilance into HIGH, MEDIUM, or LOW, often terminating early once the posterior probability exceeds a decision threshold.
- Duration: ≤ 180 s (adaptive)
- Source: Basner, 2022 — custom implementation
- Launch URL: https://andreifoldes.github.io/m2c2-assessments/assessments/pvt-ba/
Example URL commands
# Plain launch (debug mode: results shown on-screen)
https://andreifoldes.github.io/m2c2-assessments/assessments/pvt-ba/
# Suppress the completion screen
https://andreifoldes.github.io/m2c2-assessments/assessments/pvt-ba/?show_end_screen=false
# With camera recording
https://andreifoldes.github.io/m2c2-assessments/assessments/pvt-ba/?webcam=1
# With eye tracking
https://andreifoldes.github.io/m2c2-assessments/assessments/pvt-ba/?webgazer=1
# Customized assessment parameters (values shown are the defaults)
https://andreifoldes.github.io/m2c2-assessments/assessments/pvt-ba/?max_duration_seconds=180&min_isi_ms=1000&max_isi_ms=4000
# Production: submit results to your server
https://andreifoldes.github.io/m2c2-assessments/assessments/pvt-ba/?token=<TOKEN>&callback_url=<CALLBACK_URL>
Session parameters
Handled by the launch wrapper (results submission and optional sensors), not by the assessment itself.
| Parameter | Type | Default | Description |
|---|---|---|---|
callback_url | string | — | URL to POST results to when the assessment ends. |
embed | string | — | Set to 1 for embedded mode (e.g. an ESMira PWA iframe): on completion, results are posted to the parent window via postMessage instead of an HTTP callback. |
light | string | — | Set to 1 or true to enable ambient light sensing (where the browser supports the AmbientLightSensor API). Participants see a consent prompt; lux readings are recorded during the task and exported at session end. |
pid | string | — | Optional participant identifier. Echoed verbatim into the results: top-level pid next to token in the callback POST, inside data, and in the embed-mode postMessage. Useful when the callback endpoint does not mint per-participant tokens, or to link multi-session designs (e.g. FNAME-Pairs learning vs. delayed) from the URL alone. |
show_end_screen | string | true | Set to false or 0 to suppress the green "Assessment Complete" screen after results are submitted. A Telegram WebView closes immediately instead of showing the confirmation. |
token | string | — | Authentication token for results submission. When absent (along with callback_url), the assessment runs in debug mode and displays results on-screen instead of submitting them. |
tutorial | string | true | Set to false or 0 to skip the tutorial screens (alias for the show_tutorial assessment parameter). |
webcam | string | — | Set to 1 or true to enable optional camera recording. Participants see a consent prompt; if they accept, the front camera records and the video is saved locally to their device at session end. |
webgazer | string | — | Set to 1 or true to enable browser-based eye tracking via WebGazer.js. Participants see a consent prompt, then a 5-point gaze calibration. Gaze coordinates are recorded throughout the task and exported as a CSV file at session end. Can be combined with webcam=1. |
Assessment parameters
Parameters marked URL can be set as URL query parameters; the rest are fixed deployment defaults.
| Parameter | Type | Default | URL | Description |
|---|---|---|---|---|
max_duration_seconds | number | 180 | ✅ | Maximum test duration in seconds |
min_isi_ms | number | 1000 | ✅ | Minimum inter-stimulus interval in ms |
max_isi_ms | number | 4000 | ✅ | Maximum inter-stimulus interval in ms |
lapse_threshold_ms | number | 355 | ✅ | Reaction time threshold for a lapse in ms |
false_start_threshold_ms | number | 100 | ✅ | Reaction time threshold for a false start in ms |
decision_threshold | number | 0.99619 | ✅ | Posterior probability threshold to stop the test |
feedback_duration_ms | number | 1000 | ✅ | Duration of feedback display in ms |
show_quit_button | boolean | false | — | Whether to show a quit button |
show_tutorial | boolean | true | ✅ | Whether to show the multi-screen tutorial before the test |
show_results | boolean | false | — | Whether to show the detailed results page with High/Medium/Low classification. When false, participants see a simple completion message. |
Generated from assessments/pvt-ba/pvt-ba.js and assessments/pvt-ba/index.js. Do not edit by hand.