Spaces:
Running
Running
Commit History
-
Carry the answer and whether it was right into the timing rows
PsychoPy writes <component>.keys and <component>.corr beside the onsets, so a quiz question's row says what was pressed and whether it scored. The timing file had the onsets and the rt and neither of those. Both tasks now write keys and corr. corr is 1 or 0 on a question with a right answer and blank everywhere else, which is what PsychoPy does. keys is the response where there is one and falls back to whatever closed the screen. In the hunt that is each of the seven quiz questions. In harvest it is each comprehension question, in both the main round and the night watch round, which share one _comp_round; a wrong answer re-asks the question in a later round, so the round number is in the component name or the retries would overwrite each other. screens.py no longer touches app.storage.user directly. It raises outside a page builder, which is where the unit tests call from, and a recorder that can take a session down is worse than no recorder, so every access falls back to a process-…ecc987b -
Name the timing columns the way PsychoPy names them
Checked against this task's own PsychoPy export, example_sub-TEST3_task-sociallearning-hp_2025-02-05_*.csv. Its convention is <component>.started and <component>.stopped in seconds from the experiment clock, <component>.keys / .rt / .duration where the component took a response, loop counters, and a metadata block repeated on every row: date, expName, psychopyVersion, OS, frameRate. The timing file now carries all of those, long: one row per component, the component named in a column instead of in the column name. Both tasks write the identical 26 columns, asserted by a test that reads the other repo's list, so the two can be stacked. One clock. started, stopped, duration and rt are seconds from the earliest stamp in the session, computed in the exporter from the ISO stamps so every row shares a zero, including the houses and ratings that are reconstructed from env timesteps. A rating screen's enter is not logged, so its exit is back-dated by its own rt to give it the same shape. scr…ff0c87a -
Time every screen, not just the clicks inside a harvest
This task timed almost nothing. A harvest screen recorded the first and last click on its boxes, and that was all. The instruction pages, the calibration, the practice, the quiz, the comprehension rounds, the night blocks and every questionnaire battery produced their answers with no clock on them, so a session's length could not be split into where it went. Every stage in effort_stages and questionnaires is built by the same _fb factory, so wrapping that one function covers the whole task. The intro pages are wrapped where they are shown, and a page revisited with Back is its own record, or the revisit would read as one very long page. Each record carries enter, exit, dwell, how many clicks it took and how long until the first one, which is the response time for a screen whose answer is a click. Clicks are logged for the first time here, ported from task_sl-cu-nicewebrl, each tagged with the screen it happened on. export_timing writes <base>_timing.csv, one row per screen in the or…4db8278