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
03a5bbb6
Commit
03a5bbb6
authored
May 13, 2020
by
Ryan Cortez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
_
parent
6f725068
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
N-back-legacy-browsers.js
html/N-back-legacy-browsers.js
+8
-8
N-back.js
html/N-back.js
+8
-8
No files found.
html/N-back-legacy-browsers.js
View file @
03a5bbb6
...
...
@@ -143,7 +143,7 @@ function experimentInit() {
grid_lines
=
new
visual
.
ImageStim
({
win
:
psychoJS
.
window
,
name
:
'grid_lines'
,
units
:
undefined
,
image
:
'grid'
,
mask
:
undefined
,
image
:
'grid
.png
'
,
mask
:
undefined
,
ori
:
0
,
pos
:
[
0
,
0
],
size
:
[
0.6
,
0.6
],
color
:
new
util
.
Color
([
1
,
1
,
1
]),
opacity
:
1
,
flipHoriz
:
false
,
flipVert
:
false
,
...
...
@@ -204,7 +204,7 @@ function experimentInit() {
grid_lines_2
=
new
visual
.
ImageStim
({
win
:
psychoJS
.
window
,
name
:
'grid_lines_2'
,
units
:
undefined
,
image
:
'grid'
,
mask
:
undefined
,
image
:
'grid
.png
'
,
mask
:
undefined
,
ori
:
0
,
pos
:
[
0
,
0
],
size
:
[
0.6
,
0.6
],
color
:
new
util
.
Color
([
1
,
1
,
1
]),
opacity
:
1
,
flipHoriz
:
false
,
flipVert
:
false
,
...
...
@@ -573,7 +573,7 @@ function N_back_1_TrialRoutineEachFrame(trials) {
// update/draw components on each frame
// *grid_lines* updates
if
(
t
>=
0
&&
grid_lines
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
if
(
t
>=
0
.0
&&
grid_lines
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
// keep track of start time/frame for later
grid_lines
.
tStart
=
t
;
// (not accounting for frame time here)
grid_lines
.
frameNStart
=
frameN
;
// exact frame index
...
...
@@ -581,13 +581,13 @@ function N_back_1_TrialRoutineEachFrame(trials) {
grid_lines
.
setAutoDraw
(
true
);
}
frameRemains
=
0
+
2
-
psychoJS
.
window
.
monitorFramePeriod
*
0.75
;
// most of one frame period left
frameRemains
=
0
.0
+
2
-
psychoJS
.
window
.
monitorFramePeriod
*
0.75
;
// most of one frame period left
if
(
grid_lines
.
status
===
PsychoJS
.
Status
.
STARTED
&&
t
>=
frameRemains
)
{
grid_lines
.
setAutoDraw
(
false
);
}
// *target_square* updates
if
(
t
>=
0
&&
target_square
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
if
(
t
>=
0
.0
&&
target_square
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
// keep track of start time/frame for later
target_square
.
tStart
=
t
;
// (not accounting for frame time here)
target_square
.
frameNStart
=
frameN
;
// exact frame index
...
...
@@ -595,7 +595,7 @@ function N_back_1_TrialRoutineEachFrame(trials) {
target_square
.
setAutoDraw
(
true
);
}
frameRemains
=
0
+
1
-
psychoJS
.
window
.
monitorFramePeriod
*
0.75
;
// most of one frame period left
frameRemains
=
0
.0
+
1
-
psychoJS
.
window
.
monitorFramePeriod
*
0.75
;
// most of one frame period left
if
(
target_square
.
status
===
PsychoJS
.
Status
.
STARTED
&&
t
>=
frameRemains
)
{
target_square
.
setAutoDraw
(
false
);
}
...
...
@@ -876,7 +876,7 @@ function N_back_2_trialsRoutineEachFrame(trials) {
}
// *target_square_2* updates
if
(
t
>=
0
&&
target_square_2
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
if
(
t
>=
0
.0
&&
target_square_2
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
// keep track of start time/frame for later
target_square_2
.
tStart
=
t
;
// (not accounting for frame time here)
target_square_2
.
frameNStart
=
frameN
;
// exact frame index
...
...
@@ -884,7 +884,7 @@ function N_back_2_trialsRoutineEachFrame(trials) {
target_square_2
.
setAutoDraw
(
true
);
}
frameRemains
=
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
(
target_square_2
.
status
===
PsychoJS
.
Status
.
STARTED
&&
t
>=
frameRemains
)
{
target_square_2
.
setAutoDraw
(
false
);
}
...
...
html/N-back.js
View file @
03a5bbb6
...
...
@@ -151,7 +151,7 @@ function experimentInit() {
grid_lines
=
new
visual
.
ImageStim
({
win
:
psychoJS
.
window
,
name
:
'grid_lines'
,
units
:
undefined
,
image
:
'grid'
,
mask
:
undefined
,
image
:
'grid
.png
'
,
mask
:
undefined
,
ori
:
0
,
pos
:
[
0
,
0
],
size
:
[
0.6
,
0.6
],
color
:
new
util
.
Color
([
1
,
1
,
1
]),
opacity
:
1
,
flipHoriz
:
false
,
flipVert
:
false
,
...
...
@@ -212,7 +212,7 @@ function experimentInit() {
grid_lines_2
=
new
visual
.
ImageStim
({
win
:
psychoJS
.
window
,
name
:
'grid_lines_2'
,
units
:
undefined
,
image
:
'grid'
,
mask
:
undefined
,
image
:
'grid
.png
'
,
mask
:
undefined
,
ori
:
0
,
pos
:
[
0
,
0
],
size
:
[
0.6
,
0.6
],
color
:
new
util
.
Color
([
1
,
1
,
1
]),
opacity
:
1
,
flipHoriz
:
false
,
flipVert
:
false
,
...
...
@@ -576,7 +576,7 @@ function N_back_1_TrialRoutineEachFrame(trials) {
// update/draw components on each frame
// *grid_lines* updates
if
(
t
>=
0
&&
grid_lines
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
if
(
t
>=
0
.0
&&
grid_lines
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
// keep track of start time/frame for later
grid_lines
.
tStart
=
t
;
// (not accounting for frame time here)
grid_lines
.
frameNStart
=
frameN
;
// exact frame index
...
...
@@ -584,13 +584,13 @@ function N_back_1_TrialRoutineEachFrame(trials) {
grid_lines
.
setAutoDraw
(
true
);
}
frameRemains
=
0
+
2
-
psychoJS
.
window
.
monitorFramePeriod
*
0.75
;
// most of one frame period left
frameRemains
=
0
.0
+
2
-
psychoJS
.
window
.
monitorFramePeriod
*
0.75
;
// most of one frame period left
if
(
grid_lines
.
status
===
PsychoJS
.
Status
.
STARTED
&&
t
>=
frameRemains
)
{
grid_lines
.
setAutoDraw
(
false
);
}
// *target_square* updates
if
(
t
>=
0
&&
target_square
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
if
(
t
>=
0
.0
&&
target_square
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
// keep track of start time/frame for later
target_square
.
tStart
=
t
;
// (not accounting for frame time here)
target_square
.
frameNStart
=
frameN
;
// exact frame index
...
...
@@ -598,7 +598,7 @@ function N_back_1_TrialRoutineEachFrame(trials) {
target_square
.
setAutoDraw
(
true
);
}
frameRemains
=
0
+
1
-
psychoJS
.
window
.
monitorFramePeriod
*
0.75
;
// most of one frame period left
frameRemains
=
0
.0
+
1
-
psychoJS
.
window
.
monitorFramePeriod
*
0.75
;
// most of one frame period left
if
(
target_square
.
status
===
PsychoJS
.
Status
.
STARTED
&&
t
>=
frameRemains
)
{
target_square
.
setAutoDraw
(
false
);
}
...
...
@@ -877,7 +877,7 @@ function N_back_2_trialsRoutineEachFrame(trials) {
}
// *target_square_2* updates
if
(
t
>=
0
&&
target_square_2
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
if
(
t
>=
0
.0
&&
target_square_2
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
// keep track of start time/frame for later
target_square_2
.
tStart
=
t
;
// (not accounting for frame time here)
target_square_2
.
frameNStart
=
frameN
;
// exact frame index
...
...
@@ -885,7 +885,7 @@ function N_back_2_trialsRoutineEachFrame(trials) {
target_square_2
.
setAutoDraw
(
true
);
}
frameRemains
=
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
(
target_square_2
.
status
===
PsychoJS
.
Status
.
STARTED
&&
t
>=
frameRemains
)
{
target_square_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