Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
N-back task with visual stimuli
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Andrew Vu
N-back task with visual stimuli
Commits
a3ef6e61
Commit
a3ef6e61
authored
May 13, 2020
by
Ryan Cortez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
_
parent
5e9a90f4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
N-back-1.xlsx
N-back-1.xlsx
+0
-0
N-back.py
N-back.py
+10
-10
N-back-1.xlsx
html/resources/N-back-1.xlsx
+0
-0
No files found.
N-back-1.xlsx
View file @
a3ef6e61
No preview for this file type
N-back.py
View file @
a3ef6e61
#!/usr/bin/env python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v2020.1.3),
on May 13, 2020, at 1
3:38
on May 13, 2020, at 1
4:12
If you publish work using this script the most relevant publication is:
Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, Lindeløv JK. (2019)
...
...
@@ -96,7 +96,7 @@ FixationClock = core.Clock()
fixation_1
=
visual
.
TextStim
(
win
=
win
,
name
=
'fixation_1'
,
text
=
'+'
,
font
=
'Arial'
,
pos
=
(
0
,
0
),
height
=
0.05
,
wrapWidth
=
None
,
ori
=
0
.0
,
pos
=
(
0
,
0
),
height
=
0.05
,
wrapWidth
=
None
,
ori
=
0
,
color
=
'white'
,
colorSpace
=
'rgb'
,
opacity
=
1
,
languageStyle
=
'LTR'
,
depth
=
0.0
);
...
...
@@ -108,20 +108,20 @@ grid_lines = visual.ImageStim(
name
=
'grid_lines'
,
image
=
'grid.png'
,
mask
=
None
,
ori
=
0.0
,
pos
=
[
0
,
0
],
size
=
[
0.6
,
0.6
],
color
=
[
1
,
1
,
1
],
colorSpace
=
'rgb'
,
opacity
=
1
.0
,
color
=
[
1
,
1
,
1
],
colorSpace
=
'rgb'
,
opacity
=
1
,
flipHoriz
=
False
,
flipVert
=
False
,
texRes
=
128
,
interpolate
=
True
,
depth
=
0.0
)
target_square
=
visual
.
Rect
(
win
=
win
,
name
=
'target_square'
,
width
=
[
0.15
,
0.15
][
0
],
height
=
[
0.15
,
0.15
][
1
],
ori
=
0.0
,
pos
=
[
0
,
0
],
lineWidth
=
1
.0
,
lineColor
=
None
,
lineColorSpace
=
'rgb'
,
lineWidth
=
1
,
lineColor
=
None
,
lineColorSpace
=
'rgb'
,
fillColor
=
[
1.000
,
1.000
,
1.000
],
fillColorSpace
=
'rgb'
,
opacity
=
1
.0
,
depth
=-
1.0
,
interpolate
=
True
)
opacity
=
1
,
depth
=-
1.0
,
interpolate
=
True
)
fixation_2
=
visual
.
TextStim
(
win
=
win
,
name
=
'fixation_2'
,
text
=
'+'
,
font
=
'Arial'
,
pos
=
[
0
,
0
],
height
=
0.05
,
wrapWidth
=
None
,
ori
=
0
.0
,
pos
=
[
0
,
0
],
height
=
0.05
,
wrapWidth
=
None
,
ori
=
0
,
color
=
'white'
,
colorSpace
=
'rgb'
,
opacity
=
1
,
languageStyle
=
'LTR'
,
depth
=-
2.0
);
...
...
@@ -414,7 +414,7 @@ for thisTrial in trials:
grid_lines
.
setAutoDraw
(
True
)
if
grid_lines
.
status
==
STARTED
:
# is it time to stop? (based on global clock, using actual start)
if
tThisFlipGlobal
>
grid_lines
.
tStartRefresh
+
2
.0
-
frameTolerance
:
if
tThisFlipGlobal
>
grid_lines
.
tStartRefresh
+
2
-
frameTolerance
:
# keep track of stop time/frame for later
grid_lines
.
tStop
=
t
# not accounting for scr refresh
grid_lines
.
frameNStop
=
frameN
# exact frame index
...
...
@@ -431,7 +431,7 @@ for thisTrial in trials:
target_square
.
setAutoDraw
(
True
)
if
target_square
.
status
==
STARTED
:
# is it time to stop? (based on global clock, using actual start)
if
tThisFlipGlobal
>
target_square
.
tStartRefresh
+
1
.0
-
frameTolerance
:
if
tThisFlipGlobal
>
target_square
.
tStartRefresh
+
1
-
frameTolerance
:
# keep track of stop time/frame for later
target_square
.
tStop
=
t
# not accounting for scr refresh
target_square
.
frameNStop
=
frameN
# exact frame index
...
...
@@ -439,7 +439,7 @@ for thisTrial in trials:
target_square
.
setAutoDraw
(
False
)
# *fixation_2* updates
if
fixation_2
.
status
==
NOT_STARTED
and
tThisFlip
>=
1
.0
-
frameTolerance
:
if
fixation_2
.
status
==
NOT_STARTED
and
tThisFlip
>=
1
-
frameTolerance
:
# keep track of start time/frame for later
fixation_2
.
frameNStart
=
frameN
# exact frame index
fixation_2
.
tStart
=
t
# local t and not account for scr refresh
...
...
html/resources/N-back-1.xlsx
View file @
a3ef6e61
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment