Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inam_psychopy_experiment_template
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joshua Zosky
inam_psychopy_experiment_template
Commits
4f8b253f
Commit
4f8b253f
authored
2 years ago
by
Joshua Zosky
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://git.unl.edu/joshisthebestta/inam_psychopy_experiment_template
parents
a08cdf93
edcd6748
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+6
-0
6 additions, 0 deletions
README.md
main.py
+30
-23
30 additions, 23 deletions
main.py
with
36 additions
and
23 deletions
README.md
0 → 100644
+
6
−
0
View file @
4f8b253f
Newer!
And more lines!
\ No newline at end of file
This diff is collapsed.
Click to expand it.
main.py
+
30
−
23
View file @
4f8b253f
# coding=utf-8
# coding=utf-8
# Experiment: Change Blindness for EEG
import
random
from
psychopy
import
core
from
experiment_tools
import
trial_runner
from
experiment_tools
import
trial_runner
from
experiment_tools
import
data_save
from
experiment_tools
import
data_save
from
experiment_tools
import
screens
from
experiment_tools
import
screens
...
@@ -72,17 +70,33 @@ trial_order = trial_organizer.trials_by_blocks([IMAGE_ORIENTATION, CHANGE_BLINDN
...
@@ -72,17 +70,33 @@ trial_order = trial_organizer.trials_by_blocks([IMAGE_ORIENTATION, CHANGE_BLINDN
# # Generate all of the visuals for the experiment (instructions, stim, fixation cross, etc.)
# # Generate all of the visuals for the experiment (instructions, stim, fixation cross, etc.)
#
#
fixation_screen
=
screens
.
create_fixation_screen
(
win
)
# break_instructions = """You have completed this block of trials. You have %s blocks remaining.
study_instruction_screen
=
screens
.
CreateInstructionsScreen
(
win
,
study_instructions_text
)
# \n\nWhen you are ready to continue to the next block, press the space bar. """
pause_screen
=
screens
.
CreateInstructionsScreen
(
win
,
pause_text
)
#
exit_screen
=
screens
.
CreateInstructionsScreen
(
win
,
exit_text
)
# test_instructions = """You may or may not have noticed in phase two that there was a specific order in which images
stim_filename_list
=
screens
.
create_stim_screens
(
win
,
120
,
filter_file_extension
=
'
jpg
'
,
shuffle
=
True
,
pre_group
=
4
)
# appeared.\n For this final phase of the experiment, we are interested in determining whether you noticed the sequence
screen_maker
=
screens
.
create_individual_screen
# at all.\n You will be shown two images on screen at the same time.\n\nIf you think the image on the left belongs
# first in a sequence, press 'z'. If you think the image on the right belongs first in a sequence press '/'. \n\nPlease
EEG
.
begin_session
()
# respond as accurately as possible. \nPress the space bar to begin. """
study_instruction_screen
.
show
()
#
# expInfo = experiment_info.get_info("TOJ Study", experiment_info={'Participant': '1234', 'TOJ': 'Yes', 'SL Study': 'Yes',
# # Create data file
# 'SL Test': 'Yes'})
# log = data_save.Log(expInfo)
#
# fixation_screen = screens.create_fixation_screen(win)
# toj_instruction_screen = screens.create_instructions_screen(win, toj_instructions)
# toj_instruction_screen2 = screens.create_instructions_screen(win, toj_instructions2)
# toj_break_screen = screens.create_instructions_screen(win, break_instructions)
# study_instruction_screen = screens.create_instructions_screen(win, study_instructions)
# test_instructions_screen = screens.create_instructions_screen(win, test_instructions)
# stim_screen_list = screens.create_stim_screens(win, total_stim)
#
# sl_study_data_file_name = data_save.create_data_file(experiment_info=expInfo,
# task_name='SL_Study',
# header='Participant number, Cumulative trial number,'
# 'Trial number, Block number, Task, Image, Stim, Jiggle,'
# 'Correct Response, Response, Correct, Accuracy,'
# 'Response Time, Trial time')
#
#
data_file
=
data_save
.
Data_File
(
experiment_info
=
expInfo
,
data_file
=
data_save
.
Data_File
(
experiment_info
=
expInfo
,
header
=
'
Participant_number,Task,Block_number,Cumulative_trial_number,Image_Start,
'
header
=
'
Participant_number,Task,Block_number,Cumulative_trial_number,Image_Start,
'
...
@@ -92,12 +106,5 @@ data_file = data_save.Data_File(experiment_info=expInfo,
...
@@ -92,12 +106,5 @@ data_file = data_save.Data_File(experiment_info=expInfo,
# # Experiment trial runs occur here.
# # Experiment trial runs occur here.
#
#
EEG
.
start_recording
()
# log.close()
trial_runner
.
start
(
win
,
fixation_screen
,
pause_screen
,
stim_filename_list
,
trial_order
,
screen_maker
,
data_file
,
EEG
)
# core.quit()
EEG
.
pause_recording
()
exit_screen
.
show
()
EEG
.
disconnect
()
# Close the log and quit the experiment instance
log
.
close
()
core
.
quit
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment