forked from n-murray-psych/gaze_ilm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
experiment.py
1457 lines (1254 loc) · 83 KB
/
experiment.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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# -*- coding: utf-8 -*-
__author__ = "Nicholas Murray"
import klibs
from klibs import P
from klibs.KLGraphics import KLDraw as kld # To draw shapes
from klibs.KLUserInterface import any_key, mouse_pos, smart_sleep # So participants can press any key to continue; convert mouse presses to mouse position coordinates
from klibs.KLGraphics import fill, blit, flip # To actually make drawn shapes appear on the screen
from klibs.KLUtilities import deg_to_px # Convert stimulus sizes according to degrees of visual angle
from klibs.KLResponseCollectors import KeyPressResponse # To take in key presses as a response to a trial
from klibs.KLResponseListeners import KeypressListener, BaseResponseListener # To record key press responses at the end of a trial
from klibs.KLConstants import TK_MS, RECT_BOUNDARY # to specify milliseconds as the unit of time to measure response times in, and the rectangle boundary for the line motion rating scale
from klibs.KLEventInterface import TrialEventTicket as ET # to define the events of a trial according to stimulus timings
from klibs.KLKeyMap import KeyMap # To map keys to responses and have them recorded in the database
import sdl2 # To generate keyboard button names upon pressing them as a response
from klibs.KLCommunication import message # To write messages on the screen to participants
from klibs.KLBoundary import RectangleBoundary, BoundaryInspector # To create a boundary within which participants can rate line motion
from klibs.KLEventQueue import pump, flush # Everything below recommended by Austin for drawing rating scale
from klibs.KLBoundary import RectangleBoundary
# Defining some useful constants
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
GREY = (45, 45, 45)
class gaze_ilm(klibs.Experiment):
def setup(self):
if P.run_practice_blocks:
self.insert_practice_block(1, trial_counts = P.trials_per_practice_block)
# Block and trial start messages
self.practice_block_message = message("Press space to begin the practice trials", "default", blit_txt = False)
self.block_start_message = message("Press space to begin the experiment", "default", blit_txt = False)
block_start_message_vertical_offset = deg_to_px(3)
self.block_start_message_position = (P.screen_c[0], P.screen_c[1]-block_start_message_vertical_offset)
self.next_block_message = message("You have completed a block of trials! Press space to start the next block", "default", blit_txt = False)
self.next_trial_message = message("Press space to continue", "default", blit_txt = False)
next_trial_message_vertical_offset = deg_to_px(3)
self.next_trial_message_posiition = (P.screen_c[0], P.screen_c[1]-next_trial_message_vertical_offset)
# Fixation Cross
crosslinesize = deg_to_px(.57)
self.horizontal_cross = kld.Line(length = crosslinesize, color = WHITE, thickness = 3)
self.vertical_cross = kld.Line(length = crosslinesize, color = WHITE, thickness = 3, rotation = 90)
# X which replaces the fixation cross on exogenous cuing trials
self.x_cross1 = kld.Line(length = crosslinesize, color = WHITE, thickness = 3, rotation = 45)
self.x_cross2 = kld.Line(length = crosslinesize, color = WHITE, thickness = 3, rotation = -45)
# Probe stimuli
probecirclesize = deg_to_px(.57)
innercirclesize = deg_to_px(.4)
probestroke = [1, (0,0,0)]
probe_horizontal_offset = deg_to_px(2.5)
probe_vertical_offset = deg_to_px(1.1)
self.probecircle = kld.Circle(diameter = probecirclesize, stroke = probestroke, fill = WHITE)
self.innercircle = kld.Circle(diameter = innercirclesize, stroke = probestroke, fill = GREY)
self.left_probe_position = (P.screen_c[0]-probe_horizontal_offset, P.screen_c[1]-probe_vertical_offset)
self.right_probe_position = (P.screen_c[0]+probe_horizontal_offset, P.screen_c[1]-probe_vertical_offset)
# Exogenous cue stimuli
cue_stroke_thickness = 2
self.cue = kld.Circle(diameter = probecirclesize, stroke = [cue_stroke_thickness, WHITE], fill = WHITE)
# Gaze cue stimuli
facecirclesize = deg_to_px(1.14) # Double the size of the fixation cross
eyecirclesize = deg_to_px(.29)
pupilcirclesize = deg_to_px(.07)
noselength = deg_to_px(.09)
mouthwidth = deg_to_px(.18)
self.facecircle = kld.Circle(diameter = facecirclesize, stroke = [1, (0,0,0)], fill = WHITE)
self.eyecircle = kld.Circle(diameter = eyecirclesize, stroke = [1, (0,0,0)], fill = WHITE)
self.pupilcircle = kld.Circle(diameter = pupilcirclesize, stroke = [1, (0,0,0)], fill = BLACK)
self.nose = kld.Line(length = noselength, color = BLACK, thickness = 3)
self.mouth = kld.Line(length = mouthwidth, color = BLACK, thickness = 3, rotation = 90)
eye_offset = deg_to_px(.23)
self.left_eye_position = (P.screen_c[0]-eye_offset, P.screen_c[1]-eye_offset)
self.right_eye_position = (P.screen_c[0]+eye_offset, P.screen_c[1]-eye_offset)
mouth_offset = deg_to_px(.26)
self.mouth_position = (P.screen_c[0], P.screen_c[1]+mouth_offset)
pupilcue_offset = deg_to_px(.14)
self.lefteye_left_pupilcue_position = (self.left_eye_position[0]-pupilcue_offset, self.left_eye_position[1])
self.lefteye_right_pupilcue_position = (self.left_eye_position[0]+pupilcue_offset, self.left_eye_position[1])
self.righteye_left_pupilcue_position = (self.right_eye_position[0]-pupilcue_offset, self.right_eye_position[1])
self.righteye_right_pupilcue_position = (self.right_eye_position[0]+pupilcue_offset, self.right_eye_position[1])
# Detection target stimuli
targetsize = deg_to_px(.23)
targetstroke = [1, (0,0,0)]
self.target = kld.Circle(diameter = targetsize, stroke = targetstroke, fill = WHITE)
# Static line stimuli
linelength = deg_to_px(4.43)
linewidth = deg_to_px(.57)
self.static_line = kld.Line(length = linelength, color = WHITE, thickness = 3, rotation = 90)
self.static_line_position = (P.screen_c[0], P.screen_c[1]-probe_vertical_offset)
# Real line motion stimuli
linelength_shorterline = deg_to_px(.56)
linelength_longerline = deg_to_px(.59)
lineoffset_shorterlines = deg_to_px(2.485)
self.shorter_moving_line = kld.Line(length = linelength_shorterline, color = WHITE, thickness = 3, rotation = 90)
self.longer_moving_line = kld.Line(length = linelength_longerline, color = WHITE, thickness = 3, rotation = 90)
self.real_line_1_position = (P.screen_c[0]-deg_to_px(1.94), P.screen_c[1]-probe_vertical_offset)
self.real_line_2_position = (P.screen_c[0]-deg_to_px(1.39), P.screen_c[1]-probe_vertical_offset)
self.real_line_3_position = (P.screen_c[0]-deg_to_px(.84), P.screen_c[1]-probe_vertical_offset)
self.real_line_4_position = (P.screen_c[0]-deg_to_px(.29), P.screen_c[1]-probe_vertical_offset)
self.real_line_5_position = (P.screen_c[0]+deg_to_px(.26), P.screen_c[1]-probe_vertical_offset)
self.real_line_6_position = (P.screen_c[0]+deg_to_px(.81), P.screen_c[1]-probe_vertical_offset)
self.real_line_7_position = (P.screen_c[0]+deg_to_px(1.36), P.screen_c[1]-probe_vertical_offset)
self.real_line_8_position = (P.screen_c[0]+deg_to_px(1.91), P.screen_c[1]-probe_vertical_offset)
# Line motion rating scale stimuli
scale_vertical_offset = deg_to_px(1.1)
scale_w = deg_to_px(4.30)
scale_h = deg_to_px(1)
scale_stroke = [int(scale_h * 0.1), WHITE, klibs.STROKE_INNER]
self.scale_loc = (P.screen_c[0], P.screen_c[1] + scale_vertical_offset)
self.scale = kld.Rectangle(scale_w, scale_h, stroke=scale_stroke)
self.scale_mark = kld.Rectangle(int(scale_h * 0.1), scale_h, fill=BLACK)
self.scale_bounds = bounds_from_blit(self.scale, self.scale_loc)
left_right_motion_rating_message_horizontal_offset = deg_to_px(3)
left_right_motion_rating_message_vertical_offset = deg_to_px(1.1)
no_motion_rating_message_vertical_offset = deg_to_px(2.2)
self.motion_rating_message = message("Rate the how much and what direction the line may have moved:")
self.motion_rating_message_position = (P.screen_c[0], P.screen_c[1])
self.left_motion_rating_message = message("Left")
self.left_motion_rating_message_position = (P.screen_c[0]-left_right_motion_rating_message_horizontal_offset, P.screen_c[1]+left_right_motion_rating_message_vertical_offset)
self.right_motion_rating_message = message("Right")
self.right_motion_rating_message_position = (P.screen_c[0]+left_right_motion_rating_message_horizontal_offset, P.screen_c[1]+left_right_motion_rating_message_vertical_offset)
self.no_motion_rating_message = message("No motion")
self.no_motion_rating_message_position = (P.screen_c[0], P.screen_c[1]+no_motion_rating_message_vertical_offset)
no_motion_line_length = deg_to_px(1)
self.no_motion_rating_line = kld.Line(length = no_motion_line_length, color = WHITE, thickness = 3)
self.scale_listener = ScaleListener(
self.scale_bounds, loop_callback=self.scale_callback
)
self.task_demo()
def task_demo(self):
#def show_demo_text(msg, stim_set = []):
# msg_x = int(P.screen_x / 2)
# msg_y = int(P.screen_y * .5)
# text = message(msg, "default", blit_txt = False)
# fill()
#blit(text, registration = 5, location = (msg_x, msg_y))
#stim_set
#flip()
def show_demo_text(msg):
message_vertical_offset = deg_to_px(6)
self.message_position = (P.screen_c[0], P.screen_c[1]-message_vertical_offset)
text = message(msg, "default", blit_txt = False, align = "center")
#fill()
blit(text, registration = 5, location = self.message_position)
#stim_set
#flip()
def generate_stimuli(stimuli_type):
# Valid exo trial
# Start by fixating
if stimuli_type == "fixation":
# Fixation cross
blit(self.horizontal_cross, registration = 5, location = P.screen_c)
blit(self.vertical_cross, registration = 5, location = P.screen_c)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
# Go to an x-cross
if stimuli_type == "x-cross":
# Fixation cross
blit(self.x_cross1, registration = 5, location = P.screen_c)
blit(self.x_cross2, registration = 5, location = P.screen_c)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
# Go to a no-pupil gaze face
if stimuli_type == "no_pupil_gaze_face":
blit(self.facecircle, registration = 5, location = P.screen_c)
blit(self.eyecircle, registration = 5, location = self.left_eye_position)
blit(self.eyecircle, registration = 5, location = self.right_eye_position)
blit(self.nose, registration = 5, location = P.screen_c)
blit(self.mouth, registration = 5, location = self.mouth_position)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
# Go to a leftwards exogenous cue
if stimuli_type == "left_exogenous_cue":
blit(self.x_cross1, registration = 5, location = P.screen_c)
blit(self.x_cross2, registration = 5, location = P.screen_c)
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
blit(self.cue, registration = 5, location = self.left_probe_position)
# Go to a right detection target
if stimuli_type == "right_detection_target":
blit(self.x_cross1, registration = 5, location = P.screen_c)
blit(self.x_cross2, registration = 5, location = P.screen_c)
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
blit(self.target, registration = 5, location = self.right_probe_position)
# Go to a right looking gaze face
if stimuli_type == "right_gaze_face":
blit(self.facecircle, registration = 5, location = P.screen_c)
blit(self.eyecircle, registration = 5, location = self.left_eye_position)
blit(self.eyecircle, registration = 5, location = self.right_eye_position)
blit(self.pupilcircle, registration = 5, location = self.lefteye_right_pupilcue_position)
blit(self.pupilcircle, registration = 5, location = self.righteye_right_pupilcue_position)
blit(self.nose, registration = 5, location = P.screen_c)
blit(self.mouth, registration = 5, location = self.mouth_position)
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
# Go to left invalid gaze target
if stimuli_type == "left_gaze_target":
blit(self.facecircle, registration = 5, location = P.screen_c)
blit(self.eyecircle, registration = 5, location = self.left_eye_position)
blit(self.eyecircle, registration = 5, location = self.right_eye_position)
blit(self.pupilcircle, registration = 5, location = self.lefteye_right_pupilcue_position)
blit(self.pupilcircle, registration = 5, location = self.righteye_right_pupilcue_position)
blit(self.nose, registration = 5, location = P.screen_c)
blit(self.mouth, registration = 5, location = self.mouth_position)
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
blit(self.target, registration = 5, location = self.left_probe_position)
# Go to a right valid gaze target
if stimuli_type == "right_gaze_target":
blit(self.facecircle, registration = 5, location = P.screen_c)
blit(self.eyecircle, registration = 5, location = self.left_eye_position)
blit(self.eyecircle, registration = 5, location = self.right_eye_position)
blit(self.pupilcircle, registration = 5, location = self.lefteye_right_pupilcue_position)
blit(self.pupilcircle, registration = 5, location = self.righteye_right_pupilcue_position)
blit(self.nose, registration = 5, location = P.screen_c)
blit(self.mouth, registration = 5, location = self.mouth_position)
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
blit(self.target, registration = 5, location = self.right_probe_position)
# Go to a neutral looking gaze face
if stimuli_type == "neutral_gaze_face":
blit(self.facecircle, registration = 5, location = P.screen_c)
blit(self.eyecircle, registration = 5, location = self.left_eye_position)
blit(self.eyecircle, registration = 5, location = self.right_eye_position)
blit(self.pupilcircle, registration = 5, location = self.left_eye_position)
blit(self.pupilcircle, registration = 5, location = self.right_eye_position)
blit(self.nose, registration = 5, location = P.screen_c)
blit(self.mouth, registration = 5, location = self.mouth_position)
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
# Draw a line for an exo trial
if stimuli_type == "exo_line_draw":
blit(self.x_cross1, registration = 5, location = P.screen_c)
blit(self.x_cross2, registration = 5, location = P.screen_c)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_2_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_3_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_4_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_5_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_6_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_7_position)
blit(self.longer_moving_line, registration = 5, location = self.real_line_8_position)
# Draw a line for a gaze trial
if stimuli_type == "right_gaze_line_draw":
blit(self.facecircle, registration = 5, location = P.screen_c)
blit(self.eyecircle, registration = 5, location = self.left_eye_position)
blit(self.eyecircle, registration = 5, location = self.right_eye_position)
blit(self.pupilcircle, registration = 5, location = self.lefteye_right_pupilcue_position)
blit(self.pupilcircle, registration = 5, location = self.righteye_right_pupilcue_position)
blit(self.nose, registration = 5, location = P.screen_c)
blit(self.mouth, registration = 5, location = self.mouth_position)
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_2_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_3_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_4_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_5_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_6_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_7_position)
blit(self.longer_moving_line, registration = 5, location = self.real_line_8_position)
# Draw line rating scale
if stimuli_type == "line_rating_scale":
blit(self.motion_rating_message, registration = 5, location = self.motion_rating_message_position)
blit(self.left_motion_rating_message, registration = 5, location = self.left_motion_rating_message_position)
blit(self.right_motion_rating_message, registration = 5, location = self.right_motion_rating_message_position)
blit(self.no_motion_rating_message, registration = 5, location = self.no_motion_rating_message_position)
blit(self.no_motion_rating_line, registration = 5, location = self.scale_loc)
blit(self.scale, 5, self.scale_loc)
# Draw the cue
# if x_cross == "x-cross" and cue_type == "exogenous" and cue_loc == "left":
# # X-cross
# fill()
# blit(self.x_cross1, registration = 5, location = P.screen_c)
# blit(self.x_cross2, registration = 5, location = P.screen_c)
# # Probes
# blit(self.probecircle, registration = 5, location = self.left_probe_position)
# blit(self.probecircle, registration = 5, location = self.right_probe_position)
# blit(self.innercircle, registration = 5, location = self.left_probe_position)
# blit(self.innercircle, registration = 5, location = self.right_probe_position)
# # Left exogenous cues
# blit(self.cue, registration = 5, location = self.left_probe_position)
# flip()
# # Draw the valid target
# if x_cross == "x-cross" and cue_type == "exogenous" and cue_loc == None and target_loc == "left":
# # X-cross
# fill()
# blit(self.x_cross1, registration = 5, location = P.screen_c)
# blit(self.x_cross2, registration = 5, location = P.screen_c)
# # Probes
# blit(self.probecircle, registration = 5, location = self.left_probe_position)
# blit(self.probecircle, registration = 5, location = self.right_probe_position)
# blit(self.innercircle, registration = 5, location = self.left_probe_position)
# blit(self.innercircle, registration = 5, location = self.right_probe_position)
# # Right detection target
# blit(self.target, registration = 5, location = self.left_probe_position)
# flip()
# # Subtract the valid target for response
# if x_cross == "x-cross" and cue_type == "exogenous" and cue_loc == None and target_loc == None:
# # X-cross
# fill()
# blit(self.x_cross1, registration = 5, location = P.screen_c)
# blit(self.x_cross2, registration = 5, location = P.screen_c)
# # Probes
# blit(self.probecircle, registration = 5, location = self.left_probe_position)
# blit(self.probecircle, registration = 5, location = self.right_probe_position)
# blit(self.innercircle, registration = 5, location = self.left_probe_position)
# blit(self.innercircle, registration = 5, location = self.right_probe_position)
# flip()
def demo_message_stimuli(message = "", stimuli_condition = []):
fill()
show_demo_text(message)
generate_stimuli(stimuli_condition)
flip()
any_key()
# Creating the actual demo
demo_message_stimuli("Welcome to the experiment! This tutorial will help explain the task. \n (Press space to continue)",
"fixation"
)
demo_message_stimuli("Every trial begins with what you see below: \n a fixation cross, and two circles. \n (Press space to continue)",
"fixation"
)
demo_message_stimuli("To begin trials, \n we ask that you fixate your eyes on that central cross, \n and keep fixated there during the entire trial. \n (Press space to continue)",
"fixation"
)
demo_message_stimuli("With your eyes fixated at centre, \n you will be prompted to press space to start the trial. \n That means you can take a quick break \n between trials if you would like! \n (Press space to continue)",
"fixation"
)
demo_message_stimuli("Once you press space to start a trial, \n one of two things will happen: \n (Press space to continue)",
"fixation"
)
demo_message_stimuli("You'll either see an x-appear at the centre, like this: \n (Press space to continue)",
"x-cross"
)
demo_message_stimuli("Or a face without pupils, like this: \n (Press space to continue)",
"no_pupil_gaze_face"
)
demo_message_stimuli("For now, we'll focus on trials where an x appears: \n (Press space to continue)",
"x-cross"
)
demo_message_stimuli("After the x, a flash will appear in one or both of the circles: \n (Press space to continue)",
"left_exogenous_cue"
)
demo_message_stimuli("Then, the flash will disappear, \n and a dot will appear in one of the two circles: \n (Press space to continue)",
"right_detection_target"
)
demo_message_stimuli("This is where your task comes in: \n If the dot appears on the left, press the 'z' key with your left index finger. \n If the dot appears on the right, press the '/' key with your right index finger. \n (Press space to continue)",
"right_detection_target"
)
demo_message_stimuli("During the experiment respond by pressing 'z' or '/' \n as fast as you can after seeing the dot. \n Don't worry, you'll get to practice after this demo! \n (Press space to continue)",
"right_detection_target"
)
demo_message_stimuli("After each trial, you'll be brought back to this screen, \n and you'll be asked to press space to start new trial. \n (Press space to continue)",
"fixation"
)
demo_message_stimuli("Now let's try this with the face. \n Remember, you'll see a face with no pupils appear: \n (Press space to continue)",
"no_pupil_gaze_face"
)
demo_message_stimuli("Then pupils will appear, \n looking either left, right, or straight ahead: \n (Press space to continue)",
"right_gaze_face"
)
demo_message_stimuli("Then, the dot will appear on one side. \n As usual, you have to respond as fast as you can \n by pressing 'z' for left, or '/' for right. \n (Press space to continue)",
"left_gaze_target"
)
demo_message_stimuli("You will have noticed that sometimes the eyes (or the flash) \n can appear on the side opposite the target dot. \n That means the direction of the eyes and \n the location of the flash are not useful for guessing where the target dot will appear. \n (Press space to continue)",
"right_gaze_target"
)
demo_message_stimuli("So, you just have to respond to wherever the dot appears, \n while keeping your eyes fixated on the centre \n (whether that be the x or the face). \n (Press space to continue)",
"neutral_gaze_face"
)
demo_message_stimuli("Now, sometimes instead of a dot appearing in one of the circles, \n a line will appear connecting the two dots: \n (Press space to continue)",
"exo_line_draw"
)
demo_message_stimuli("In these cases, you won't be responding to a dot that appears \n after the flash or the pupils moving. \n (Press space to continue)",
"right_gaze_line_draw"
)
demo_message_stimuli("Instead, you'll be asked to rate the quality of the line motion: \n (Press space to continue)",
"line_rating_scale"
)
demo_message_stimuli("If the line seemed like it was moving when it appeared, \n then you'd click in the rectangle which direction it moved in: left or right? \n (Press space to continue)",
"line_rating_scale"
)
demo_message_stimuli("We ask if the line seemed to move, please respond not just with the direction: \n Depending on how intensely the line seemed to move, \n you can click further left (for stronger leftward motion) \n or further right (for stronger rightward motion) within the rectangle. \n (Press space to continue)",
"line_rating_scale"
)
demo_message_stimuli("Of course, if the line seemed to appear all at once (instead of moving), \n you can click the middle of the rectangle to specify 'No motion'. \n (Press space to continue)",
"line_rating_scale"
)
demo_message_stimuli("This line rating task will happen less often than the dot target task. \n So, you can assume each trial is probably a dot target task. \n (Press space to continue)",
"line_rating_scale"
)
demo_message_stimuli("That's it! \n Remember: for the dot-target task, \n press 'z' if the dot appears on the left, and '/' if it appears on the right. \n For the line rating task, report whether the line moved, \n and if it moved, what direction and how strongly it seemed to move. \n So, you can assume each trial is probably a dot target task. \n (Press space to continue)",
)
demo_message_stimuli("Next, you will get to practice a bit before doing the experiment. \n If you have any questions, please ask them now. \n And if you have any more questions later, you can stop and ask them at any time. \n (Press space to continue to practice trials)",
) #######################################################################################
# FUNCTIONS DEFINING THE EXOGENOUS CUING TASK STIMULI
#######################################################################################
def trial_start_stimuli(self):
# Fixation cross
fill()
blit(self.horizontal_cross, registration = 5, location = P.screen_c)
blit(self.vertical_cross, registration = 5, location = P.screen_c)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
flip()
def exo_trial_pre_cue_stimuli(self):
if self.task_requirement == "detection":
# X-cross
fill()
blit(self.x_cross1, registration = 5, location = P.screen_c)
blit(self.x_cross2, registration = 5, location = P.screen_c)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
flip()
else:
# X-cross
fill()
blit(self.x_cross1, registration = 5, location = P.screen_c)
blit(self.x_cross2, registration = 5, location = P.screen_c)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
flip()
def exo_trial_left_cue_stimuli(self):
# X-cross
fill()
blit(self.x_cross1, registration = 5, location = P.screen_c)
blit(self.x_cross2, registration = 5, location = P.screen_c)
# Probes
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
# Left exogenous cues
blit(self.cue, registration = 5, location = self.left_probe_position)
flip()
def exo_trial_right_cue_stimuli(self):
# X-cross
fill()
blit(self.x_cross1, registration = 5, location = P.screen_c)
blit(self.x_cross2, registration = 5, location = P.screen_c)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
# Right exogenous cues
blit(self.cue, registration = 5, location = self.right_probe_position)
flip()
def exo_trial_neutral_cue_stimuli(self):
# X-cross
fill()
blit(self.x_cross1, registration = 5, location = P.screen_c)
blit(self.x_cross2, registration = 5, location = P.screen_c)
# Probes
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
# Left and right exogenous cue simultaneously (i.e., neutral exogenous cue)
blit(self.cue, registration = 5, location = self.left_probe_position)
blit(self.cue, registration = 5, location = self.right_probe_position)
flip()
def exo_trial_left_target_stimuli(self):
# X-cross
fill()
blit(self.x_cross1, registration = 5, location = P.screen_c)
blit(self.x_cross2, registration = 5, location = P.screen_c)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
# Left detection target
blit(self.target, registration = 5, location = self.left_probe_position)
flip()
def exo_trial_right_target_stimuli(self):
# X-cross
fill()
blit(self.x_cross1, registration = 5, location = P.screen_c)
blit(self.x_cross2, registration = 5, location = P.screen_c)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
# Right detection target
blit(self.target, registration = 5, location = self.right_probe_position)
flip()
def exo_cuing_task(self):
while self.evm.before("x_cross_on"):
self.trial_start_stimuli()
while self.evm.between("x_cross_on", "cue_onset"):
self.exo_trial_pre_cue_stimuli()
while self.evm.between("cue_onset", "cue_offset"):
if self.cue_location == "left":
self.exo_trial_left_cue_stimuli()
else:
if self.cue_location == "right":
self.exo_trial_right_cue_stimuli()
else:
self.exo_trial_neutral_cue_stimuli()
while self.evm.between("cue_offset", "target_onset"):
self.exo_trial_pre_cue_stimuli()
while self.evm.between("target_onset", "target_offset"):
if self.target_location == "left" and self.task_requirement == "detection":
self.exo_trial_left_target_stimuli()
else:
if self.target_location == "right" and self.task_requirement == "detection":
self.exo_trial_right_target_stimuli()
else:
if self.task_requirement == "illusory line motion rating":
self.draw_static_line()
else:
if self.task_requirement == "rightward real line motion rating":
self.draw_right_line()
else:
if self.task_requirement == "leftward real line motion rating":
self.draw_left_line()
#######################################################################################
# FUNCTIONS DEFINING GAZE-CUING STIMULI
#######################################################################################
def gaze_trial_pre_cue_stimuli(self):
# Face without pupils
fill()
blit(self.facecircle, registration = 5, location = P.screen_c)
blit(self.eyecircle, registration = 5, location = self.left_eye_position)
blit(self.eyecircle, registration = 5, location = self.right_eye_position)
blit(self.nose, registration = 5, location = P.screen_c)
blit(self.mouth, registration = 5, location = self.mouth_position)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
flip()
def gaze_trial_left_cue_stimuli(self):
fill()
blit(self.facecircle, registration = 5, location = P.screen_c)
blit(self.eyecircle, registration = 5, location = self.left_eye_position)
blit(self.eyecircle, registration = 5, location = self.right_eye_position)
blit(self.pupilcircle, registration = 5, location = self.lefteye_left_pupilcue_position)
blit(self.pupilcircle, registration = 5, location = self.righteye_left_pupilcue_position)
blit(self.nose, registration = 5, location = P.screen_c)
blit(self.mouth, registration = 5, location = self.mouth_position)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
flip()
def gaze_trial_right_cue_stimuli(self):
fill()
blit(self.facecircle, registration = 5, location = P.screen_c)
blit(self.eyecircle, registration = 5, location = self.left_eye_position)
blit(self.eyecircle, registration = 5, location = self.right_eye_position)
blit(self.pupilcircle, registration = 5, location = self.lefteye_right_pupilcue_position)
blit(self.pupilcircle, registration = 5, location = self.righteye_right_pupilcue_position)
blit(self.nose, registration = 5, location = P.screen_c)
blit(self.mouth, registration = 5, location = self.mouth_position)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
flip()
def gaze_trial_neutral_cue_stimuli(self):
fill()
blit(self.facecircle, registration = 5, location = P.screen_c)
blit(self.eyecircle, registration = 5, location = self.left_eye_position)
blit(self.eyecircle, registration = 5, location = self.right_eye_position)
blit(self.pupilcircle, registration = 5, location = self.left_eye_position)
blit(self.pupilcircle, registration = 5, location = self.right_eye_position)
blit(self.nose, registration = 5, location = P.screen_c)
blit(self.mouth, registration = 5, location = self.mouth_position)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
flip()
def gaze_cuing_task(self):
while self.evm.before("x_cross_on"):
self.trial_start_stimuli()
while self.evm.between("x_cross_on", "cue_onset"):
self.gaze_trial_pre_cue_stimuli()
while self.evm.between("cue_onset", "cue_offset"):
if self.cue_location == "left":
self.gaze_trial_left_cue_stimuli()
else:
if self.cue_location == "right":
self.gaze_trial_right_cue_stimuli()
else:
self.gaze_trial_neutral_cue_stimuli()
while self.evm.between("cue_offset", "target_onset"):
self.gaze_trial_pre_cue_stimuli()
while self.evm.between("target_onset", "target_offset"):
if self.target_location == "left" and self.task_requirement == "detection":
self.exo_trial_left_target_stimuli()
else:
if self.target_location == "right" and self.task_requirement == "detection":
self.exo_trial_right_target_stimuli()
else:
if self.task_requirement == "illusory line motion rating":
self.draw_static_line()
else:
if self.task_requirement == "rightward real line motion rating":
self.draw_right_line()
else:
if self.task_requirement == "leftward real line motion rating":
self.draw_left_line()
#######################################################################################
# DRAWING THE LINES: NO MOTION, REAL LEFTWARD MOTION, AND REAL RIGHTWARD MOTION
#######################################################################################
def draw_static_line(self):
def static_line():
# Static line composed of small lines
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_2_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_3_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_4_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_5_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_6_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_7_position)
blit(self.longer_moving_line, registration = 5, location = self.real_line_8_position)
if self.cuing_task_type == "gaze":
# Face without pupils
fill()
blit(self.facecircle, registration = 5, location = P.screen_c)
blit(self.eyecircle, registration = 5, location = self.left_eye_position)
blit(self.eyecircle, registration = 5, location = self.right_eye_position)
blit(self.nose, registration = 5, location = P.screen_c)
blit(self.mouth, registration = 5, location = self.mouth_position)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
# Static line
#blit(self.static_line, registration = 5, location = self.static_line_position)
static_line()
flip()
else:
if self.cuing_task_type == "exogenous":
# X-cross
fill()
blit(self.x_cross1, registration = 5, location = P.screen_c)
blit(self.x_cross2, registration = 5, location = P.screen_c)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
# Static line
#blit(self.static_line, registration = 5, location = self.static_line_position)
# Static line composed of small lines
static_line()
flip()
def draw_right_line(self):
def gaze_line_stimuli():
# Face without pupils
blit(self.facecircle, registration = 5, location = P.screen_c)
blit(self.eyecircle, registration = 5, location = self.left_eye_position)
blit(self.eyecircle, registration = 5, location = self.right_eye_position)
blit(self.nose, registration = 5, location = P.screen_c)
blit(self.mouth, registration = 5, location = self.mouth_position)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
def exo_line_stimuli():
# X-cross
blit(self.x_cross1, registration = 5, location = P.screen_c)
blit(self.x_cross2, registration = 5, location = P.screen_c)
# Probes
blit(self.probecircle, registration = 5, location = self.left_probe_position)
blit(self.probecircle, registration = 5, location = self.right_probe_position)
blit(self.innercircle, registration = 5, location = self.left_probe_position)
blit(self.innercircle, registration = 5, location = self.right_probe_position)
if self.task_requirement == "rightward real line motion rating":
while self.evm.between("target_onset", "line1"):
if self.cuing_task_type == "gaze":
fill()
gaze_line_stimuli()
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
flip()
else:
if self.cuing_task_type == "exogenous":
fill()
exo_line_stimuli()
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
flip()
while self.evm.between("line1", "line2"):
if self.cuing_task_type == "gaze":
fill()
gaze_line_stimuli()
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_2_position)
flip()
else:
if self.cuing_task_type == "exogenous":
fill()
exo_line_stimuli()
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_2_position)
flip()
while self.evm.between("line2", "line3"):
if self.cuing_task_type == "gaze":
fill()
gaze_line_stimuli()
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_2_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_3_position)
flip()
else:
if self.cuing_task_type == "exogenous":
fill()
exo_line_stimuli()
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_2_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_3_position)
flip()
while self.evm.between("line3", "line4"):
if self.cuing_task_type == "gaze":
fill()
gaze_line_stimuli()
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_2_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_3_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_4_position)
flip()
else:
if self.cuing_task_type == "exogenous":
fill()
exo_line_stimuli()
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_2_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_3_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_4_position)
flip()
while self.evm.between("line4", "line5"):
if self.cuing_task_type == "gaze":
fill()
gaze_line_stimuli()
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_2_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_3_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_4_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_5_position)
flip()
else:
if self.cuing_task_type == "exogenous":
fill()
exo_line_stimuli()
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_2_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_3_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_4_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_5_position)
flip()
while self.evm.between("line5", "line6"):
if self.cuing_task_type == "gaze":
fill()
gaze_line_stimuli()
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_2_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_3_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_4_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_5_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_6_position)
flip()
else:
if self.cuing_task_type == "exogenous":
fill()
exo_line_stimuli()
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_2_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_3_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_4_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_5_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_6_position)
flip()
while self.evm.between("line6", "line7"):
if self.cuing_task_type == "gaze":
fill()
gaze_line_stimuli()
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_2_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_3_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_4_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_5_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_6_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_7_position)
flip()
else:
if self.cuing_task_type == "exogenous":
fill()
exo_line_stimuli()
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_2_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_3_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_4_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_5_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_6_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_7_position)
flip()
while self.evm.between("line7", "target_offset"):
if self.cuing_task_type == "gaze":
fill()
gaze_line_stimuli()
blit(self.shorter_moving_line, registration = 5, location = self.real_line_1_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_2_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_3_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_4_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_5_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_6_position)
blit(self.shorter_moving_line, registration = 5, location = self.real_line_7_position)
blit(self.longer_moving_line, registration = 5, location = self.real_line_8_position)
flip()
else:
if self.cuing_task_type == "exogenous":
fill()
exo_line_stimuli()