Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
B
Brookes Template 2020
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Wakefield Morys-Carter
Brookes Template 2020
Commits
232b218c
Commit
232b218c
authored
4 years ago
by
Wakefield Morys-Carter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove dir_1
parent
18b3fd2c
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
917 additions
and
536 deletions
+917
-536
data/_template_2020_Dec_10_1608.csv
data/_template_2020_Dec_10_1608.csv
+1
-0
data/_template_2020_Dec_10_1608.log
data/_template_2020_Dec_10_1608.log
+240
-0
data/_template_2020_Dec_10_1608.psydat
data/_template_2020_Dec_10_1608.psydat
+0
-0
html/template-legacy-browsers.js
html/template-legacy-browsers.js
+1
-176
html/template.js
html/template.js
+1
-175
template.psyexp
template.psyexp
+0
-1
template_lastrun.py
template_lastrun.py
+674
-184
No files found.
data/_template_2020_Dec_10_1608.csv
0 → 100644
View file @
232b218c
participant,group,date,expName,psychopyVersion,frameRate,
This diff is collapsed.
Click to expand it.
data/_template_2020_Dec_10_1608.log
0 → 100644
View file @
232b218c
This diff is collapsed.
Click to expand it.
data/_template_2020_Dec_10_1608.psydat
0 → 100644
View file @
232b218c
File added
This diff is collapsed.
Click to expand it.
html/template-legacy-browsers.js
View file @
232b218c
...
...
@@ -33,9 +33,6 @@ psychoJS.scheduleCondition(function() { return (psychoJS.gui.dialogComponent.but
// flowScheduler gets run if the participants presses OK
flowScheduler
.
add
(
updateInfo
);
// add timeStamp
flowScheduler
.
add
(
experimentInit
);
flowScheduler
.
add
(
dir_1RoutineBegin
());
flowScheduler
.
add
(
dir_1RoutineEachFrame
());
flowScheduler
.
add
(
dir_1RoutineEnd
());
flowScheduler
.
add
(
setupRoutineBegin
());
flowScheduler
.
add
(
setupRoutineEachFrame
());
flowScheduler
.
add
(
setupRoutineEnd
());
...
...
@@ -108,11 +105,6 @@ function updateInfo() {
}
var
dir_1Clock
;
var
mouse
;
var
polygon_border
;
var
polygon_fill
;
var
elapsedProp
;
var
setupClock
;
var
thisExp
;
var
win
;
...
...
@@ -164,32 +156,6 @@ var Debrief;
var
globalClock
;
var
routineTimer
;
function
experimentInit
()
{
// Initialize components for Routine "dir_1"
dir_1Clock
=
new
util
.
Clock
();
mouse
=
new
core
.
Mouse
({
win
:
psychoJS
.
window
,
});
mouse
.
mouseClock
=
new
util
.
Clock
();
polygon_border
=
new
visual
.
Rect
({
win
:
psychoJS
.
window
,
name
:
'
polygon_border
'
,
units
:
'
norm
'
,
width
:
[
0.1
,
0.035
][
0
],
height
:
[
0.1
,
0.035
][
1
],
ori
:
0
,
pos
:
[
0.8
,
0.9
],
lineWidth
:
3
,
lineColor
:
new
util
.
Color
([(
-
1.0
),
(
-
1.0
),
(
-
1.0
)]),
fillColor
:
new
util
.
Color
([
1
,
1
,
1
]),
opacity
:
1
,
depth
:
-
1
,
interpolate
:
true
,
});
polygon_fill
=
new
visual
.
Rect
({
win
:
psychoJS
.
window
,
name
:
'
polygon_fill
'
,
units
:
'
norm
'
,
width
:
[
0.1
,
0.03
][
0
],
height
:
[
0.1
,
0.03
][
1
],
ori
:
0
,
pos
:
[
0.8
,
0.9
],
lineWidth
:
0
,
lineColor
:
new
util
.
Color
([(
-
1.0
),
1.0
,
(
-
1.0
)]),
fillColor
:
new
util
.
Color
([(
-
1.0
),
1.0
,
(
-
1.0
)]),
opacity
:
1
,
depth
:
-
2
,
interpolate
:
true
,
});
elapsedProp
=
2
;
// Initialize components for Routine "setup"
setupClock
=
new
util
.
Clock
();
thisExp
=
psychoJS
.
experiment
;
...
...
@@ -413,148 +379,6 @@ function experimentInit() {
var
t
;
var
frameN
;
var
continueRoutine
;
var
gotValidClick
;
var
elapsedTime
;
var
keyStart
;
var
colour
;
var
dir_1Components
;
function
dir_1RoutineBegin
(
snapshot
)
{
return
function
()
{
//------Prepare to start Routine 'dir_1'-------
t
=
0
;
dir_1Clock
.
reset
();
// clock
frameN
=
-
1
;
continueRoutine
=
true
;
// until we're told otherwise
// update component parameters for each repeat
// setup some python lists for storing info about the mouse
gotValidClick
=
false
;
// until a click is received
elapsedTime
=
0
;
keyStart
=
0
;
colour
=
"
green
"
;
// keep track of which components have finished
dir_1Components
=
[];
dir_1Components
.
push
(
mouse
);
dir_1Components
.
push
(
polygon_border
);
dir_1Components
.
push
(
polygon_fill
);
dir_1Components
.
forEach
(
function
(
thisComponent
)
{
if
(
'
status
'
in
thisComponent
)
thisComponent
.
status
=
PsychoJS
.
Status
.
NOT_STARTED
;
});
return
Scheduler
.
Event
.
NEXT
;
}
}
var
keys
;
function
dir_1RoutineEachFrame
(
snapshot
)
{
return
function
()
{
//------Loop for each frame of Routine 'dir_1'-------
// get current time
t
=
dir_1Clock
.
getTime
();
frameN
=
frameN
+
1
;
// number of completed frames (so 0 is the first frame)
// update/draw components on each frame
// *polygon_border* updates
if
(
t
>=
0.0
&&
polygon_border
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
// keep track of start time/frame for later
polygon_border
.
tStart
=
t
;
// (not accounting for frame time here)
polygon_border
.
frameNStart
=
frameN
;
// exact frame index
polygon_border
.
setAutoDraw
(
true
);
}
// *polygon_fill* updates
if
(
t
>=
0.0
&&
polygon_fill
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
// keep track of start time/frame for later
polygon_fill
.
tStart
=
t
;
// (not accounting for frame time here)
polygon_fill
.
frameNStart
=
frameN
;
// exact frame index
polygon_fill
.
setAutoDraw
(
true
);
}
keys
=
kb
.
getKeys
([
"
y
"
],
{
"
waitRelease
"
:
false
,
"
clear
"
:
true
});
if
((
t
>
30
))
{
continueRoutine
=
false
;
}
else
{
if
((
keys
.
length
||
(
mouse
.
getPressed
()[
0
]
===
1
)))
{
if
((
keyStart
===
0
))
{
keyStart
=
t
;
}
elapsedProp
=
((
2
-
((
elapsedTime
+
t
)
-
keyStart
))
/
2
);
polygon_fill
.
setSize
([(
0.1
*
elapsedProp
),
0.03
]);
polygon_fill
.
setPos
([(
0.75
+
(
0.05
*
elapsedProp
)),
0.9
]);
if
(((
elapsedProp
<
0.5
)
&&
(
colour
===
"
green
"
)))
{
colour
=
"
orange
"
;
polygon_fill
.
setFillColor
(
"
orange
"
);
}
else
{
if
(((
elapsedProp
<
0.25
)
&&
(
colour
===
"
orange
"
)))
{
colour
=
"
red
"
;
polygon_fill
.
setFillColor
(
"
red
"
);
}
else
{
if
((
elapsedProp
<=
0
))
{
continueRoutine
=
false
;
}
}
}
}
else
{
if
((
keyStart
>
0
))
{
elapsedTime
+=
(
t
-
keyStart
);
keyStart
=
0
;
}
}
}
// check for quit (typically the Esc key)
if
(
psychoJS
.
experiment
.
experimentEnded
||
psychoJS
.
eventManager
.
getKeys
({
keyList
:[
'
escape
'
]}).
length
>
0
)
{
return
quitPsychoJS
(
'
The [Escape] key was pressed. Goodbye!
'
,
false
);
}
// check if the Routine should terminate
if
(
!
continueRoutine
)
{
// a component has requested a forced-end of Routine
return
Scheduler
.
Event
.
NEXT
;
}
continueRoutine
=
false
;
// reverts to True if at least one component still running
dir_1Components
.
forEach
(
function
(
thisComponent
)
{
if
(
'
status
'
in
thisComponent
&&
thisComponent
.
status
!==
PsychoJS
.
Status
.
FINISHED
)
{
continueRoutine
=
true
;
}
});
// refresh the screen if continuing
if
(
continueRoutine
)
{
return
Scheduler
.
Event
.
FLIP_REPEAT
;
}
else
{
return
Scheduler
.
Event
.
NEXT
;
}
};
}
function
dir_1RoutineEnd
(
snapshot
)
{
return
function
()
{
//------Ending Routine 'dir_1'-------
dir_1Components
.
forEach
(
function
(
thisComponent
)
{
if
(
typeof
thisComponent
.
setAutoDraw
===
'
function
'
)
{
thisComponent
.
setAutoDraw
(
false
);
}
});
// store data for thisExp (ExperimentHandler)
thisExp
.
addData
(
"
DisplayTime_1
"
,
t
);
elapsedTime
+=
(
t
-
keyStart
);
thisExp
.
addData
(
"
LookawayTime_1
"
,
elapsedTime
);
// the Routine "dir_1" was not non-slip safe, so reset the non-slip timer
routineTimer
.
reset
();
return
Scheduler
.
Event
.
NEXT
;
};
}
var
_key_resp_allKeys
;
var
setupComponents
;
function
setupRoutineBegin
(
snapshot
)
{
...
...
@@ -586,6 +410,7 @@ function setupRoutineBegin(snapshot) {
var
_pj
;
var
keys
;
function
setupRoutineEachFrame
(
snapshot
)
{
return
function
()
{
//------Loop for each frame of Routine 'setup'-------
...
...
This diff is collapsed.
Click to expand it.
html/template.js
View file @
232b218c
...
...
@@ -44,9 +44,6 @@ psychoJS.scheduleCondition(function() { return (psychoJS.gui.dialogComponent.but
// flowScheduler gets run if the participants presses OK
flowScheduler
.
add
(
updateInfo
);
// add timeStamp
flowScheduler
.
add
(
experimentInit
);
flowScheduler
.
add
(
dir_1RoutineBegin
());
flowScheduler
.
add
(
dir_1RoutineEachFrame
());
flowScheduler
.
add
(
dir_1RoutineEnd
());
flowScheduler
.
add
(
setupRoutineBegin
());
flowScheduler
.
add
(
setupRoutineEachFrame
());
flowScheduler
.
add
(
setupRoutineEnd
());
...
...
@@ -119,11 +116,6 @@ function updateInfo() {
}
var
dir_1Clock
;
var
mouse
;
var
polygon_border
;
var
polygon_fill
;
var
elapsedProp
;
var
setupClock
;
var
thisExp
;
var
win
;
...
...
@@ -175,32 +167,6 @@ var Debrief;
var
globalClock
;
var
routineTimer
;
function
experimentInit
()
{
// Initialize components for Routine "dir_1"
dir_1Clock
=
new
util
.
Clock
();
mouse
=
new
core
.
Mouse
({
win
:
psychoJS
.
window
,
});
mouse
.
mouseClock
=
new
util
.
Clock
();
polygon_border
=
new
visual
.
Rect
({
win
:
psychoJS
.
window
,
name
:
'
polygon_border
'
,
units
:
'
norm
'
,
width
:
[
0.1
,
0.035
][
0
],
height
:
[
0.1
,
0.035
][
1
],
ori
:
0
,
pos
:
[
0.8
,
0.9
],
lineWidth
:
3
,
lineColor
:
new
util
.
Color
([(
-
1.0
),
(
-
1.0
),
(
-
1.0
)]),
fillColor
:
new
util
.
Color
([
1
,
1
,
1
]),
opacity
:
1
,
depth
:
-
1
,
interpolate
:
true
,
});
polygon_fill
=
new
visual
.
Rect
({
win
:
psychoJS
.
window
,
name
:
'
polygon_fill
'
,
units
:
'
norm
'
,
width
:
[
0.1
,
0.03
][
0
],
height
:
[
0.1
,
0.03
][
1
],
ori
:
0
,
pos
:
[
0.8
,
0.9
],
lineWidth
:
0
,
lineColor
:
new
util
.
Color
([(
-
1.0
),
1.0
,
(
-
1.0
)]),
fillColor
:
new
util
.
Color
([(
-
1.0
),
1.0
,
(
-
1.0
)]),
opacity
:
1
,
depth
:
-
2
,
interpolate
:
true
,
});
elapsedProp
=
2
;
// Initialize components for Routine "setup"
setupClock
=
new
util
.
Clock
();
thisExp
=
psychoJS
.
experiment
;
...
...
@@ -424,147 +390,6 @@ function experimentInit() {
var
t
;
var
frameN
;
var
continueRoutine
;
var
gotValidClick
;
var
elapsedTime
;
var
keyStart
;
var
colour
;
var
dir_1Components
;
function
dir_1RoutineBegin
(
snapshot
)
{
return
function
()
{
//------Prepare to start Routine 'dir_1'-------
t
=
0
;
dir_1Clock
.
reset
();
// clock
frameN
=
-
1
;
continueRoutine
=
true
;
// until we're told otherwise
// update component parameters for each repeat
// setup some python lists for storing info about the mouse
gotValidClick
=
false
;
// until a click is received
elapsedTime
=
0
;
keyStart
=
0
;
colour
=
"
green
"
;
// keep track of which components have finished
dir_1Components
=
[];
dir_1Components
.
push
(
mouse
);
dir_1Components
.
push
(
polygon_border
);
dir_1Components
.
push
(
polygon_fill
);
for
(
const
thisComponent
of
dir_1Components
)
if
(
'
status
'
in
thisComponent
)
thisComponent
.
status
=
PsychoJS
.
Status
.
NOT_STARTED
;
return
Scheduler
.
Event
.
NEXT
;
}
}
var
keys
;
function
dir_1RoutineEachFrame
(
snapshot
)
{
return
function
()
{
//------Loop for each frame of Routine 'dir_1'-------
// get current time
t
=
dir_1Clock
.
getTime
();
frameN
=
frameN
+
1
;
// number of completed frames (so 0 is the first frame)
// update/draw components on each frame
// *polygon_border* updates
if
(
t
>=
0.0
&&
polygon_border
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
// keep track of start time/frame for later
polygon_border
.
tStart
=
t
;
// (not accounting for frame time here)
polygon_border
.
frameNStart
=
frameN
;
// exact frame index
polygon_border
.
setAutoDraw
(
true
);
}
// *polygon_fill* updates
if
(
t
>=
0.0
&&
polygon_fill
.
status
===
PsychoJS
.
Status
.
NOT_STARTED
)
{
// keep track of start time/frame for later
polygon_fill
.
tStart
=
t
;
// (not accounting for frame time here)
polygon_fill
.
frameNStart
=
frameN
;
// exact frame index
polygon_fill
.
setAutoDraw
(
true
);
}
keys
=
kb
.
getKeys
([
"
y
"
],
{
"
waitRelease
"
:
false
,
"
clear
"
:
true
});
if
((
t
>
30
))
{
continueRoutine
=
false
;
}
else
{
if
((
keys
.
length
||
(
mouse
.
getPressed
()[
0
]
===
1
)))
{
if
((
keyStart
===
0
))
{
keyStart
=
t
;
}
elapsedProp
=
((
2
-
((
elapsedTime
+
t
)
-
keyStart
))
/
2
);
polygon_fill
.
setSize
([(
0.1
*
elapsedProp
),
0.03
]);
polygon_fill
.
setPos
([(
0.75
+
(
0.05
*
elapsedProp
)),
0.9
]);
if
(((
elapsedProp
<
0.5
)
&&
(
colour
===
"
green
"
)))
{
colour
=
"
orange
"
;
polygon_fill
.
setFillColor
(
"
orange
"
);
}
else
{
if
(((
elapsedProp
<
0.25
)
&&
(
colour
===
"
orange
"
)))
{
colour
=
"
red
"
;
polygon_fill
.
setFillColor
(
"
red
"
);
}
else
{
if
((
elapsedProp
<=
0
))
{
continueRoutine
=
false
;
}
}
}
}
else
{
if
((
keyStart
>
0
))
{
elapsedTime
+=
(
t
-
keyStart
);
keyStart
=
0
;
}
}
}
// check for quit (typically the Esc key)
if
(
psychoJS
.
experiment
.
experimentEnded
||
psychoJS
.
eventManager
.
getKeys
({
keyList
:[
'
escape
'
]}).
length
>
0
)
{
return
quitPsychoJS
(
'
The [Escape] key was pressed. Goodbye!
'
,
false
);
}
// check if the Routine should terminate
if
(
!
continueRoutine
)
{
// a component has requested a forced-end of Routine
return
Scheduler
.
Event
.
NEXT
;
}
continueRoutine
=
false
;
// reverts to True if at least one component still running
for
(
const
thisComponent
of
dir_1Components
)
if
(
'
status
'
in
thisComponent
&&
thisComponent
.
status
!==
PsychoJS
.
Status
.
FINISHED
)
{
continueRoutine
=
true
;
break
;
}
// refresh the screen if continuing
if
(
continueRoutine
)
{
return
Scheduler
.
Event
.
FLIP_REPEAT
;
}
else
{
return
Scheduler
.
Event
.
NEXT
;
}
};
}
function
dir_1RoutineEnd
(
snapshot
)
{
return
function
()
{
//------Ending Routine 'dir_1'-------
for
(
const
thisComponent
of
dir_1Components
)
{
if
(
typeof
thisComponent
.
setAutoDraw
===
'
function
'
)
{
thisComponent
.
setAutoDraw
(
false
);
}
}
// store data for thisExp (ExperimentHandler)
thisExp
.
addData
(
"
DisplayTime_1
"
,
t
);
elapsedTime
+=
(
t
-
keyStart
);
thisExp
.
addData
(
"
LookawayTime_1
"
,
elapsedTime
);
// the Routine "dir_1" was not non-slip safe, so reset the non-slip timer
routineTimer
.
reset
();
return
Scheduler
.
Event
.
NEXT
;
};
}
var
_key_resp_allKeys
;
var
setupComponents
;
function
setupRoutineBegin
(
snapshot
)
{
...
...
@@ -595,6 +420,7 @@ function setupRoutineBegin(snapshot) {
var
_pj
;
var
keys
;
function
setupRoutineEachFrame
(
snapshot
)
{
return
function
()
{
//------Loop for each frame of Routine 'setup'-------
...
...
This diff is collapsed.
Click to expand it.
template.psyexp
View file @
232b218c
...
...
@@ -842,7 +842,6 @@
</Routine>
</Routines>
<Flow>
<Routine
name=
"dir_1"
/>
<Routine
name=
"setup"
/>
<Routine
name=
"embedded_form"
/>
<Routine
name=
"first_letter"
/>
...
...
This diff is collapsed.
Click to expand it.
template_lastrun.py
View file @
232b218c
This diff is collapsed.
Click to expand it.
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