Skip to content

Commit

Permalink
stims to pictures
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Li authored and Jamie Li committed Mar 5, 2019
1 parent 4669b14 commit 483638a
Show file tree
Hide file tree
Showing 290 changed files with 479 additions and 266 deletions.
12 changes: 6 additions & 6 deletions cued_task_switching_single_task_network/experiment.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,14 @@ var setStims = function() {
}

var getCue = function() {
var cue_html = '<div class = upperbox><div class = "center-text" >' + curr_cue +
'</div></div><div class = lowerbox><div class = fixation>+</div></div>'
var cue_html = '<div class = upperbox><div class = "center-text" >' + curr_cue + '</div></div>'+
'<div class = lowerbox><div class = fixation>+</div></div>'
return cue_html
}

var getStim = function() {
var stim_html = '<div class = upperbox><div class = "center-text" >' + curr_cue +
'</div></div><div class = lowerbox><div class = "center-text" style=color:' + curr_stim.color +
';>' + curr_stim.number + '</div>'
var stim_html = '<div class = upperbox><div class = "center-text" >' + curr_cue + '</div></div>'+
'<div class = lowerbox><div class = gng_number><div class = cue-text>'+ preFileType + curr_stim.number + fileTypePNG + '</div></div></div>'
return stim_html
}

Expand Down Expand Up @@ -277,7 +276,8 @@ var rt_thresh = 1000;
var missed_response_thresh = 0.10;
var accuracy_thresh = 0.80;


var fileTypePNG = ".png'></img>"
var preFileType = "<img class = center src='/static/experiments/cued_task_switching_single_task_network/images/"

//set up block stim. correct_responses indexed by [block][stim][type]
var tasks = {
Expand Down
Binary file added cued_task_switching_single_task_network/images/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 19 additions & 6 deletions cued_task_switching_single_task_network/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@
}

.cue-text {
text-align: center;
font-size: 50px;
position: relative;
top: 50%;
transform: translateY(-50%);
-webkit-transform: translateY(-50%);
width:20vw;
height: 20vh;
position:absolute;
top:50%;
left:50%;
margin-right:-50%;
transform: translate(-50%,-50%);
background-color: none;
}

.bigbox {
Expand Down Expand Up @@ -138,6 +140,7 @@ img.center {
left:50%;
margin-right:-50%;
transform: translate(-50%, -25%);
background-color: none;
}

.promptbox {
Expand All @@ -149,3 +152,13 @@ img.center {
margin-right:-50%;
transform: translate(-125%, 50%);
}

.gng_number {
width: 5vw;
height: 5vw;
position: absolute;
top: 50%;
left: 50%;
background-color: none;
transform: translate(-50%, -50%);
}
8 changes: 4 additions & 4 deletions directed_forgetting_with_flanker/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ position:absolute;
top:50%;
left:50%;
margin-right:0%;
transform: translate(-200%,-50%);
transform: translate(-150%,-50%);
background-color: none;
}

Expand All @@ -230,7 +230,7 @@ position:absolute;
top:50%;
left:50%;
margin-right:0%;
transform: translate(-125%,-50%);
transform: translate(-100%,-50%);
background-color: none;
}

Expand All @@ -252,7 +252,7 @@ position:absolute;
top:50%;
left:50%;
margin-right:0%;
transform: translate(25%,-50%);
transform: translate(0%,-50%);
background-color: none;
}

Expand All @@ -263,6 +263,6 @@ position:absolute;
top:50%;
left:50%;
margin-right:0%;
transform: translate(100%,-50%);
transform: translate(50%,-50%);
background-color: none;
}
8 changes: 4 additions & 4 deletions flanker_with_cued_task_switching/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ position:absolute;
top:50%;
left:50%;
margin-right:0%;
transform: translate(-200%,-50%);
transform: translate(-150%,-50%);
background-color: none;
}

Expand All @@ -174,7 +174,7 @@ position:absolute;
top:50%;
left:50%;
margin-right:0%;
transform: translate(-125%,-50%);
transform: translate(-100%,-50%);
background-color: none;
}

Expand All @@ -196,7 +196,7 @@ position:absolute;
top:50%;
left:50%;
margin-right:0%;
transform: translate(25%,-50%);
transform: translate(0%,-50%);
background-color: none;
}

Expand All @@ -207,6 +207,6 @@ position:absolute;
top:50%;
left:50%;
margin-right:0%;
transform: translate(100%,-50%);
transform: translate(50%,-50%);
background-color: none;
}
10 changes: 5 additions & 5 deletions flanker_with_predictable_task_switching/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ position:absolute;
top:50%;
left:50%;
margin-right:0%;
transform: translate(-200%,-50%);
transform: translate(-150%,-50%);
background-color: none;
}

Expand All @@ -193,7 +193,7 @@ position:absolute;
top:50%;
left:50%;
margin-right:0%;
transform: translate(-125%,-50%);
transform: translate(-100%,-50%);
background-color: none;
}

Expand All @@ -215,7 +215,7 @@ position:absolute;
top:50%;
left:50%;
margin-right:0%;
transform: translate(25%,-50%);
transform: translate(0%,-50%);
background-color: none;
}

Expand All @@ -226,6 +226,6 @@ position:absolute;
top:50%;
left:50%;
margin-right:0%;
transform: translate(100%,-50%);
transform: translate(50%,-50%);
background-color: none;
}
}
4 changes: 2 additions & 2 deletions go_nogo_with_directed_forgetting/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ background-color: none;
/*******************************************************/

.gng_number {
width: 10vw;
height: 10vw;
width: 5vw;
height: 5vw;
position:absolute;
top:50%;
left:50%;
Expand Down
8 changes: 4 additions & 4 deletions go_nogo_with_flanker/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ position:absolute;
top:50%;
left:50%;
margin-right:0%;
transform: translate(-200%,-50%);
transform: translate(-150%,-50%);
background-color: none;
}

Expand All @@ -140,7 +140,7 @@ position:absolute;
top:50%;
left:50%;
margin-right:0%;
transform: translate(-125%,-50%);
transform: translate(-100%,-50%);
background-color: none;
}

Expand All @@ -162,7 +162,7 @@ position:absolute;
top:50%;
left:50%;
margin-right:0%;
transform: translate(25%,-50%);
transform: translate(0%,-50%);
background-color: none;
}

Expand All @@ -173,6 +173,6 @@ position:absolute;
top:50%;
left:50%;
margin-right:0%;
transform: translate(100%,-50%);
transform: translate(50%,-50%);
background-color: none;
}
8 changes: 4 additions & 4 deletions go_nogo_with_predictable_task_switching/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
}

.cue-text {
width:100vw;
height: 100vh;
width:20vw;
height: 20vh;
position:absolute;
top:50%;
left:50%;
Expand Down Expand Up @@ -174,8 +174,8 @@ img.center {
/*******************************************************/

.gng_number {
width: 15vw;
height: 15vw;
width: 5vw;
height: 5vw;
position:absolute;
top:50%;
left:50%;
Expand Down
16 changes: 10 additions & 6 deletions n_back_single_task_network/experiment.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,13 @@ var getStim = function(){
correct_response = stim.correct_response
delay = stim.delay


return task_boards[0]+
probe+
task_boards[1]
if (probe == probe.toUpperCase()) {
letter_case = 'uppercase'
} else if (probe == probe.toLowerCase()) {
letter_case = 'lowercase'
}

return task_boards[0]+ preFileType + letter_case + '_' + probe + fileTypePNG + task_boards[1]
}

var getResponse = function(){
Expand All @@ -217,7 +220,8 @@ var appendData = function(){
correct_response: correct_response,
delay: delay,
current_trial: current_trial,
current_block: current_block
current_block: current_block,
letter_case: letter_case
})

if (jsPsych.data.getDataByTrialIndex(curr_trial).key_press == correct_response){
Expand Down Expand Up @@ -287,7 +291,7 @@ var current_block = 0
/* Define Game Boards */
/* ************************************ */

var task_boards = [['<div class = bigbox><div class = centerbox><div class = flanker-text>'],['<div></div><div>']]
var task_boards = ['<div class = bigbox><div class = centerbox><div class = gng_number><div class = cue-text>','</div></div></div></div>']

var stims = createTrialTypes(practice_len, delay)

Expand Down
Binary file added n_back_single_task_network/images/lowercase_B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added n_back_single_task_network/images/lowercase_D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added n_back_single_task_network/images/lowercase_G.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added n_back_single_task_network/images/lowercase_T.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added n_back_single_task_network/images/lowercase_V.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added n_back_single_task_network/images/uppercase_B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added n_back_single_task_network/images/uppercase_D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added n_back_single_task_network/images/uppercase_G.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added n_back_single_task_network/images/uppercase_T.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added n_back_single_task_network/images/uppercase_V.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 21 additions & 6 deletions n_back_single_task_network/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
-webkit-transform: translateY(-50%);
}



.fb_box {
width:35vw;
height: 20vh;
Expand Down Expand Up @@ -60,12 +62,13 @@
}

.cue-text {
text-align: center;
font-size: 50px;
position: relative;
top: 50%;
transform: translateY(-50%);
-webkit-transform: translateY(-50%);
width:20vw;
height: 20vh;
position:absolute;
top:50%;
left:50%;
margin-right:-50%;
transform: translate(-50%,-50%);
}

.bigbox {
Expand Down Expand Up @@ -129,3 +132,15 @@ img.center {
margin-right:-50%;
transform: translate(-50%,-50%);
}


.gng_number {
width: 5vw;
height: 5vw;
position:absolute;
top:50%;
left:50%;
margin-right:0%;
transform: translate(-50%,-50%);
background-color: none;
}
13 changes: 9 additions & 4 deletions n_back_with_cued_task_switching/experiment.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,21 @@ var getCueStim = function() {
correct_response = stim.correct_response
delay = stim.delay

if (probe == probe.toUpperCase()) {
letter_case = 'uppercase'
} else if (probe == probe.toLowerCase()) {
letter_case = 'lowercase'
}

var cue_html = '<div class = upperbox><div class = "center-text" >' + curr_cue +
'</div></div><div class = lowerbox><div class = fixation>+</div></div>'
return cue_html
}

var getStim = function() {

var stim_html = '<div class = upperbox><div class = "center-text" >' + curr_cue +
'</div></div><div class = lowerbox><div class = flanker-text>'+ probe +'</div></div>'
var stim_html = '<div class = upperbox><div class = "center-text" >' + curr_cue + '</div></div>'+
'<div class = lowerbox><div class = gng_number><div class = cue-text>'+ preFileType + letter_case + '_' + probe + fileTypePNG +'</div></div></div>'

return stim_html
}
Expand Down Expand Up @@ -414,8 +420,7 @@ var current_block = 0
/* Define Game Boards */
/* ************************************ */

var task_boards = [['<div class = bigbox><div class = centerbox><div class = fixation>'],['</div></div></div>']]

var task_boards = ['<div class = bigbox><div class = centerbox><div class = gng_number><div class = cue-text>','</div></div></div></div>']


/* ************************************ */
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added n_back_with_cued_task_switching/images/lowercase_I.png
Loading

0 comments on commit 483638a

Please sign in to comment.