-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfile_settings.py
157 lines (141 loc) · 4.75 KB
/
file_settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
import re
from utils.snippet_settings import CONDITION
from utils.textconstants import PARTICIPANT, SNIPPET
SEPARATOR = ';'
###################
# Columns for dataframes
###################
# from snippet file
SNIPPET_COLUMN_SNIPPET = 'filename'
SNIPPET_COLUMN_RIGHT_ANSWER = 'right_answer'
SNIPPET_COLUMN_POSSIBLE_WRONG_ANSWERS = 'possible_wrong_answers'
SNIPPET_COLUMN_NUMBER = 'number'
SNIPPET_COLUMN_VARIANT = 'variant'
SNIPPET_COLUMN_VERSION = 'version'
SNIPPET_COLUMN_LANGHOUT_AOC_CATEGORY = 'Langhout AoC_category'
SNIPPET_COLUMN_AOC_CATEGORY = 'AoC_category'
SNIPPET_COLUMNS = [
SNIPPET_COLUMN_SNIPPET,
SNIPPET_COLUMN_RIGHT_ANSWER,
SNIPPET_COLUMN_POSSIBLE_WRONG_ANSWERS,
SNIPPET_COLUMN_NUMBER,
SNIPPET_COLUMN_VARIANT,
SNIPPET_COLUMN_VERSION,
SNIPPET_COLUMN_LANGHOUT_AOC_CATEGORY,
SNIPPET_COLUMN_AOC_CATEGORY
]
CONDITION_FILE_PATTERN = re.compile(
f'conditions_(?P<round>\d)_(?P<{PARTICIPANT}>\d\d\d)\.xlsx')
SEQUENCE_ORDER_COLUMN_BLOCK = 'Block'
SEQUENCE_ORDER_COLUMN_BLOCK_INDEX = 'Block_Index'
SEQUENCE_ORDER_COLUMN_START_EVENT = 'start_event'
SEQUENCE_ORDER_COLUMNS = [
SNIPPET,
SEQUENCE_ORDER_COLUMN_BLOCK,
SEQUENCE_ORDER_COLUMN_BLOCK_INDEX,
SEQUENCE_ORDER_COLUMN_START_EVENT
]
# Column Time in HDF5 file
COLUMN_TIME = 'time'
ROUNDING_TIME = 8
# Message Events from HDF5 file
MESSAGE_COLUMN_CATEGORY = 'category'
MESSAGE_COLUMN_TEXT = 'text'
MESSAGE_COLUMNS = [COLUMN_TIME, MESSAGE_COLUMN_CATEGORY, MESSAGE_COLUMN_TEXT]
# Values of Column MESSAGE_COLUMN_CATEGORY of Message Events
MESSAGE_CATEGORY_VALIDATION = 'VALIDATION'
MESSAGE_CATEGORY_SNIPPETVIEW = 'SNIPPETVIEW'
MESSAGE_CATEGORY_FIXATION = 'FIXATION'
MESSAGE_CATEGORY_ANSWER = 'ANSWER'
MESSAGE_CATEGORY_PERCEPTION = 'PERCEPTION'
MESSAGE_CATEGORIES = [MESSAGE_CATEGORY_SNIPPETVIEW, MESSAGE_CATEGORY_FIXATION,
MESSAGE_CATEGORY_ANSWER, MESSAGE_CATEGORY_PERCEPTION]
# Visual Events from HDF5 file
EYE_COLUMN_LEFT_GAZE_X = 'left_gaze_x'
EYE_COLUMN_LEFT_GAZE_Y = 'left_gaze_y'
EYE_COLUMN_RIGHT_GAZE_X = 'right_gaze_x'
EYE_COLUMN_RIGHT_GAZE_Y = 'right_gaze_y'
EYE_COLUMN_GAZE_X = 'gaze_x'
EYE_COLUMN_GAZE_Y = 'gaze_y'
EYE_COLUMN_RADIUS_X = 'radius_x'
EYE_COLUMN_RADIUS_Y = 'radius_y'
EYE_COLUMNS = [COLUMN_TIME, EYE_COLUMN_LEFT_GAZE_X,
EYE_COLUMN_LEFT_GAZE_Y,
EYE_COLUMN_RIGHT_GAZE_X,
EYE_COLUMN_RIGHT_GAZE_Y,
EYE_COLUMN_GAZE_X,
EYE_COLUMN_GAZE_Y,
EYE_COLUMN_RADIUS_X,
EYE_COLUMN_RADIUS_Y]
ROUNDING_COORDINATES = 5
# To store behavioral data
BEHAVIORAL_COLUMN_FIXATION_START = 'Fixation_Start'
BEHAVIORAL_COLUMN_START = 'Start'
BEHAVIORAL_COLUMN_END = 'End'
BEHAVIORAL_COLUMN_DURATION = 'Duration'
BEHAVIORAL_COLUMN_ANSWER = 'Answer'
BEHAVIORAL_COLUMN_CORRECTNESS = 'Correctness'
BEHAVIORAL_COLUMN_RATING = 'Rating'
HDF_INDEX = 'HDF_index'
BEHAVIORAL_COLUMNS = [
SNIPPET,
PARTICIPANT,
CONDITION,
BEHAVIORAL_COLUMN_FIXATION_START,
BEHAVIORAL_COLUMN_START,
BEHAVIORAL_COLUMN_END,
BEHAVIORAL_COLUMN_DURATION,
BEHAVIORAL_COLUMN_ANSWER,
BEHAVIORAL_COLUMN_CORRECTNESS,
BEHAVIORAL_COLUMN_RATING,
SNIPPET_COLUMN_SNIPPET,
SNIPPET_COLUMN_RIGHT_ANSWER,
SNIPPET_COLUMN_POSSIBLE_WRONG_ANSWERS,
SNIPPET_COLUMN_NUMBER,
SNIPPET_COLUMN_VARIANT,
SNIPPET_COLUMN_VERSION,
SNIPPET_COLUMN_LANGHOUT_AOC_CATEGORY,
SNIPPET_COLUMN_AOC_CATEGORY,
SEQUENCE_ORDER_COLUMN_BLOCK,
SEQUENCE_ORDER_COLUMN_BLOCK_INDEX,
SEQUENCE_ORDER_COLUMN_START_EVENT,
HDF_INDEX
]
BEHAVIORAL_COLUMN_DURATION_LOG = f'{BEHAVIORAL_COLUMN_DURATION}_log'
# To store fixations
FIXATION_COLUMN_START = 'Fixation_start'
FIXATION_COLUMN_END = 'Fixation_end'
FIXATION_COLUMN_X = 'Fixation_x'
FIXATION_COLUMN_Y = 'Fixation_y'
FIXATION_COLUMN_RADIUS_X = 'Fixation_radius_x'
FIXATION_COLUMN_RADIUS_Y = 'Fixation_radius_y'
FIXATION_COLUMN_DURATION = 'Fixation_duration'
FIXATION_COLUMN_REFIXATION = 'Fixation_refixation'
FIXATION_COLUMNS = [
FIXATION_COLUMN_START,
FIXATION_COLUMN_END,
FIXATION_COLUMN_X,
FIXATION_COLUMN_Y,
FIXATION_COLUMN_RADIUS_X,
FIXATION_COLUMN_RADIUS_Y,
FIXATION_COLUMN_DURATION,
PARTICIPANT,
SNIPPET,
CONDITION,
]
# To store eeg events
EEG_COLUMN_START = 'Stimulus_start'
EEG_COLUMN_END = 'Stimulus_end'
EEG_COLUMN_STIMULUS = 'Stimulus_id'
EEG_COLUMN_FIXATION_START = 'Stimulus_by_'+FIXATION_COLUMN_START
SELECTED_FIXATION_COLUMN_START = 'Selected_'+FIXATION_COLUMN_START
SELECTED_FIXATION_COLUMN_STRATEGY = 'Selected_Fixation_strategy'
ANNOTATION_COLUMN_DESCRIPTION = 'description'
ANNOTATION_COLUMN_DURATION = 'duration'
ANNOTATION_COLUMN_ONSET = 'onset'
ANNOTATION_COLUMN_ONSET_FLOAT = 'onset_float'
ANNOTATION_COLUMNS = [
ANNOTATION_COLUMN_DESCRIPTION,
ANNOTATION_COLUMN_DURATION,
ANNOTATION_COLUMN_ONSET
]