Draft
Conversation
Signed-off-by: Carlson Büth <commit@cbueth.de>
8b9234b to
03b7b5e
Compare
Member
|
I have added a few comments to the issue #7 based on our discussion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add helpers to get the per-trial question order and building a table for answers.
In- and Output
Input per session:
/eye-tracking-sessions/006_SQ_CH_1_ET1/logfiles/question_order_versions.csvOutput per session:
Status: Question order and question_id construction are implemented and tested. Parsing of preliminary/final answers from logfiles are not. Logfile format? Or are these this format namely?
https://github.com/theDebbister/multipleye-preprocessing/blob/4da1819ccf6ab8ff396dac878d966d258dc738c1/tests/MultiplEYE_toy_X_x_1_1/eye-tracking-sessions/001_TOY_X_1_ET1/logfiles/question_order_versions.csv#L1-L5
Implementation
New module:
preprocessing/answers/parser.py:parse_question_order(csv_path)reads the session CSV and adds atrialcolumn (fair choice?).construct_question_id(stimulus_name, order_code)builds IDs as<stimulus_numeric><middle><order_code>, where<middle>is2when the stimulus name containsPISA, else1.collect.py:collect_session_answers(question_order_csv, stimuli_trial_map, out_path=None)creates 6 rows per trial with columns:trial, stimulus, slot, order_code, question_id, preliminary_dir, preliminary_ts, final_dir, final_ts.out_path=None:<session_dir>/results/answers.csv(session_dir is parent oflogfiles). To be changed.io.py: CSV read/write helpers.Tests
pytest -q tests/unit/preprocessing/answersMissing
preliminary_dir: The first directional key a participant presses on a question screen (one ofup,down,left,right), indicating their initial choice among the four positioned answer options.preliminary_ts: The timestamp of that first (preliminary) keypress.final_dir: The directional key that is ultimately submitted as the answer (after any changes of mind), again one ofup/down/left/right.final_ts: The timestamp when the final answer is committed.Compute per-question reaction times and detect revisions:
rt_initial = preliminary_ts - question_onset_tsrt_final = final_ts - question_onset_tschanged = (preliminary_dir != final_dir)