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
05b5c08b
Commit
05b5c08b
authored
May 13, 2020
by
Ryan Cortez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
_
parent
b32b6744
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
N-back.py
N-back.py
+3
-3
N-back-legacy-browsers.js
html/N-back-legacy-browsers.js
+2
-2
N-back.js
html/N-back.js
+2
-2
No files found.
N-back.py
View file @
05b5c08b
#!/usr/bin/env python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v2020.1.3),
...
...
@@ -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
,
pos
=
(
0
,
0
),
height
=
0.05
,
wrapWidth
=
None
,
ori
=
0
.0
,
color
=
'white'
,
colorSpace
=
'rgb'
,
opacity
=
1
,
languageStyle
=
'LTR'
,
depth
=
0.0
);
...
...
@@ -121,7 +121,7 @@ target_square = visual.Rect(
fixation_2
=
visual
.
TextStim
(
win
=
win
,
name
=
'fixation_2'
,
text
=
'+'
,
font
=
'Arial'
,
pos
=
[
0
,
0
],
height
=
0.05
,
wrapWidth
=
None
,
ori
=
0
,
pos
=
[
0
,
0
],
height
=
0.05
,
wrapWidth
=
None
,
ori
=
0
.0
,
color
=
'white'
,
colorSpace
=
'rgb'
,
opacity
=
1
,
languageStyle
=
'LTR'
,
depth
=-
2.0
);
...
...
html/N-back-legacy-browsers.js
View file @
05b5c08b
...
...
@@ -601,7 +601,7 @@ function N_back_1_TrialRoutineEachFrame(trials) {
}
// *fixation_2* updates
if
(
t
>=
1
.0
&&
fixation_2
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
if
(
t
>=
0
.0
&&
fixation_2
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
// keep track of start time/frame for later
fixation_2
.
tStart
=
t
;
// (not accounting for frame time here)
fixation_2
.
frameNStart
=
frameN
;
// exact frame index
...
...
@@ -609,7 +609,7 @@ function N_back_1_TrialRoutineEachFrame(trials) {
fixation_2
.
setAutoDraw
(
true
);
}
frameRemains
=
1
.0
+
1.0
-
psychoJS
.
window
.
monitorFramePeriod
*
0.75
;
// most of one frame period left
frameRemains
=
0
.0
+
1.0
-
psychoJS
.
window
.
monitorFramePeriod
*
0.75
;
// most of one frame period left
if
(
fixation_2
.
status
===
PsychoJS
.
Status
.
STARTED
&&
t
>=
frameRemains
)
{
fixation_2
.
setAutoDraw
(
false
);
}
...
...
html/N-back.js
View file @
05b5c08b
...
...
@@ -604,7 +604,7 @@ function N_back_1_TrialRoutineEachFrame(trials) {
}
// *fixation_2* updates
if
(
t
>=
1
.0
&&
fixation_2
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
if
(
t
>=
0
.0
&&
fixation_2
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
// keep track of start time/frame for later
fixation_2
.
tStart
=
t
;
// (not accounting for frame time here)
fixation_2
.
frameNStart
=
frameN
;
// exact frame index
...
...
@@ -612,7 +612,7 @@ function N_back_1_TrialRoutineEachFrame(trials) {
fixation_2
.
setAutoDraw
(
true
);
}
frameRemains
=
1
.0
+
1.0
-
psychoJS
.
window
.
monitorFramePeriod
*
0.75
;
// most of one frame period left
frameRemains
=
0
.0
+
1.0
-
psychoJS
.
window
.
monitorFramePeriod
*
0.75
;
// most of one frame period left
if
(
fixation_2
.
status
===
PsychoJS
.
Status
.
STARTED
&&
t
>=
frameRemains
)
{
fixation_2
.
setAutoDraw
(
false
);
}
...
...
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