lukasg
|
|
Group: Forum Members
Posts: 35,
Visits: 103
|
+xNo, you'll need two trials. An <openended> for the textbox response, followed by the shape selection <trial>. When looking at the raw data file, the second response mode (textbox) creates a new row entry with another trial number. Since the first and second response are essentially the same trial, I was wondering whether it would be possible to append the row of the first trial instead?
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+xNo, you'll need two trials. An <openended> for the textbox response, followed by the shape selection <trial>. When looking at the raw data file, the second response mode (textbox) creates a new row entry with another trial number. Since the first and second response are essentially the same trial, I was wondering whether it would be possible to append the row of the first trial instead? Sure, store the response from the openended (textbox) in a value, set the openended's /recorddata attribute to false, log the value to the raw data file.
|
|
|
lukasg
|
|
Group: Forum Members
Posts: 35,
Visits: 103
|
+xSure, store the response from the openended (textbox) in a value, set the openended's /recorddata attribute to false, log the value to the raw data file. As always, much appreciated Dave. I do encounter an issue with the data though, and the data seem not to save to the corresponding trial. In the attached screenshot, no response is saved for the first trial which makes be think there is an offset ( )? <openended trial250> / ontrialbegin = [ // select digit items values.dig1 = list.digits.nextvalue; values.dig2 = list.digits.nextvalue; // select target item values.t = list.t_items.nextvalue; // select distractor items values.d1 = list.d_items.nextvalue; values.d2 = list.d_items.nextvalue; // select target position values.t_x = list.t_x.nextvalue; // select distractor positions values.d1_x = list.d_x.nextvalue; values.d2_x = list.d_x.nextvalue; // select target color values.t_color = list.t_colors.nextvalue; // and corresponding response key // combine digits values.correctdigit = concat(values.dig1, values.dig2); // select distractor colors values.d1_color = list.d_colors.nextvalue; values.d2_color = list.d_colors.nextvalue; ]
/stimulustimes = [0 = clearscreen; 1 = fixation; 150 = clearscreen; 151 = t, d1, d2 , dig1, dig2; 401 = clearscreen] / mask = positiveinteger / beginresponsetime = 600 / correctresponse = (values.correctdigit)
/ branch = [if(openended.trialPractice.correct == 1 || openended.trialPractice.correct == 0)trial.colorResponse]
/ ontrialend = [ // save data list.targetColor.appenditem(values.cresp);
// reset relevant lists for next trial list.d_items.reset(); list.d_x.reset(); list.d_colors.reset(); ]
</openended> <trial colorResponse>
/ recorddata = false
/ ontrialbegin = [ if(values.t_color == #1f77b4){ values.cresp = "shape1" } else if (values.t_color == #ff7f0e){ values.cresp = "shape2" } else if (values.t_color == #2ca02c){ values.cresp = "shape3" } else if (values.t_color == #d62728){ values.cresp = "shape4" } else if (values.t_color == #9467bd){ values.cresp = "shape5" } else if (values.t_color == #8c564b){ values.cresp = "shape6" } else if (values.t_color == #e377c2){ values.cresp = "shape7" } else if (values.t_color == #17becf){ values.cresp = "shape8" }; ]
/stimulustimes = [0 = clearscreen; 1 = shape1, shape2, shape3, shape4, shape5, shape6, shape7, shape8] // validresponse = ("1", "2", "3", "4", "5", "6", "7", "8") / correctresponse = (values.cresp) / inputdevice = mouse / validresponse = (shape1,shape2,shape3,shape4,shape5,shape6,shape7,shape8)
/ ontrialend = [ values.colorResponse = trial.colorResponse.response; values.colorCorrect = trial.colorResponse.correct; ]
/ posttrialpause = 1000
</trial> <data> / columns = (build, computer.platform, computer.timerresolution, expressions.canvasRatio, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, script.sessionid, script.currentblock, script.currenttrialnumber, values.t, values.t_x, values.t_color, values.colorResponse, values.cresp, values.colorCorrect, correct, latency, values.d1_color, values.d2_color, values.dig1, values.dig2, values.cresp, response ... Where does my saving the trial information go wrong?
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+xSure, store the response from the openended (textbox) in a value, set the openended's /recorddata attribute to false, log the value to the raw data file. As always, much appreciated Dave. I do encounter an issue with the data though, and the data seem not to save to the corresponding trial. In the attached screenshot, no response is saved for the first trial which makes be think there is an offset ( )? <openended trial250> / ontrialbegin = [ // select digit items values.dig1 = list.digits.nextvalue; values.dig2 = list.digits.nextvalue; // select target item values.t = list.t_items.nextvalue; // select distractor items values.d1 = list.d_items.nextvalue; values.d2 = list.d_items.nextvalue; // select target position values.t_x = list.t_x.nextvalue; // select distractor positions values.d1_x = list.d_x.nextvalue; values.d2_x = list.d_x.nextvalue; // select target color values.t_color = list.t_colors.nextvalue; // and corresponding response key // combine digits values.correctdigit = concat(values.dig1, values.dig2); // select distractor colors values.d1_color = list.d_colors.nextvalue; values.d2_color = list.d_colors.nextvalue; ]
/stimulustimes = [0 = clearscreen; 1 = fixation; 150 = clearscreen; 151 = t, d1, d2 , dig1, dig2; 401 = clearscreen] / mask = positiveinteger / beginresponsetime = 600 / correctresponse = (values.correctdigit)
/ branch = [if(openended.trialPractice.correct == 1 || openended.trialPractice.correct == 0)trial.colorResponse]
/ ontrialend = [ // save data list.targetColor.appenditem(values.cresp);
// reset relevant lists for next trial list.d_items.reset(); list.d_x.reset(); list.d_colors.reset(); ]
</openended> <trial colorResponse>
/ recorddata = false
/ ontrialbegin = [ if(values.t_color == #1f77b4){ values.cresp = "shape1" } else if (values.t_color == #ff7f0e){ values.cresp = "shape2" } else if (values.t_color == #2ca02c){ values.cresp = "shape3" } else if (values.t_color == #d62728){ values.cresp = "shape4" } else if (values.t_color == #9467bd){ values.cresp = "shape5" } else if (values.t_color == #8c564b){ values.cresp = "shape6" } else if (values.t_color == #e377c2){ values.cresp = "shape7" } else if (values.t_color == #17becf){ values.cresp = "shape8" }; ]
/stimulustimes = [0 = clearscreen; 1 = shape1, shape2, shape3, shape4, shape5, shape6, shape7, shape8] // validresponse = ("1", "2", "3", "4", "5", "6", "7", "8") / correctresponse = (values.cresp) / inputdevice = mouse / validresponse = (shape1,shape2,shape3,shape4,shape5,shape6,shape7,shape8)
/ ontrialend = [ values.colorResponse = trial.colorResponse.response; values.colorCorrect = trial.colorResponse.correct; ]
/ posttrialpause = 1000
</trial> <data> / columns = (build, computer.platform, computer.timerresolution, expressions.canvasRatio, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, script.sessionid, script.currentblock, script.currenttrialnumber, values.t, values.t_x, values.t_color, values.colorResponse, values.cresp, values.colorCorrect, correct, latency, values.d1_color, values.d2_color, values.dig1, values.dig2, values.cresp, response ... Where does my saving the trial information go wrong? You're doing things the wrong way around. The openended *precedes* the color response trial. The openended can't look into the future and log information it cannot possibly know yet.
|
|
|
lukasg
|
|
Group: Forum Members
Posts: 35,
Visits: 103
|
+xYou're doing things the wrong way around. The openended *precedes* the color response trial. The openended can't look into the future and log information it cannot possibly know yet. Meaning rather than saving values of the 2nd trial, I need to save those of the 1st (250 ms) trial? Unfortunately, most values of the 250ms trial are relevant whereas I am only interested in the response during the 2nd trial.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+xYou're doing things the wrong way around. The openended *precedes* the color response trial. The openended can't look into the future and log information it cannot possibly know yet. Meaning rather than saving values of the 2nd trial, I need to save those of the 1st (250 ms) trial? Unfortunately, most values of the 250ms trial are relevant whereas I am only interested in the response during the 2nd trial. > Unfortunately, most values of the 250ms trial are relevant whereas I am only interested in the response during the 2nd trial. They'll still be logged, so I don't know why you think this would be a problem.
|
|
|
lukasg
|
|
Group: Forum Members
Posts: 35,
Visits: 103
|
+x> Unfortunately, most values of the 250ms trial are relevant whereas I am only interested in the response during the 2nd trial. They'll still be logged, so I don't know why you think this would be a problem. I was under the impression that, similar to what I did before, I would need to save all information in separate 'values'. I suppose the values are logged and overwritten once the next 250ms trial begins? Switching the order solved the issue
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x> Unfortunately, most values of the 250ms trial are relevant whereas I am only interested in the response during the 2nd trial. They'll still be logged, so I don't know why you think this would be a problem. I was under the impression that, similar to what I did before, I would need to save all information in separate 'values'. I suppose the values are logged and overwritten once the next 250ms trial begins? Switching the order solved the issue In Inquisit parlance, a "value" is what you know as a variable* in other programming languages. A variable keeps the value you assign to until you change it. You assign values to your variables at the start of each instance of <openended trial250>. <trial colorResponse> changes nothing in these variables, so when that trial writes a line to the data file, the values as set in the preceding openended are captured. *<variables> used to be a diferent syntax construct from early on in Inquisit's history, so the proper moniker was already taken; unfortunate in hindsight.
|
|
|
lukasg
|
|
Group: Forum Members
Posts: 35,
Visits: 103
|
+xIn Inquisit parlance, a "value" is what you know as a variable* in other programming languages. A variable keeps the value you assign to until you change it. You assign values to your variables at the start of each instance of <openended trial250>. <trial colorResponse> changes nothing in these variables, so when that trial writes a line to the data file, the values as set in the preceding openended are captured. *<variables> used to be a diferent syntax construct from early on in Inquisit's history, so the proper moniker was already taken; unfortunate in hindsight. However, what about variables such as latency. This is overwritten upon the start of the second trial. How would I go about importing the latency of the 1st trial, without specifying a new column for each type of 1st trial (because the first trial will vary on presentation times). I would want to avoid the following: <data> / columns = (build, computer.platform, computer.timerresolution, expressions.canvasRatio, date, time, subject, blockcode, blocknum, trialcode, trialnum,blockcode
values.t, values.t_x, values.t_color, openended.trial250.response, openended.trial250.cresp, values.colorResponse, values.colorCorrect, openended.trial250.latency, openended.trial200.latency, ..
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+xIn Inquisit parlance, a "value" is what you know as a variable* in other programming languages. A variable keeps the value you assign to until you change it. You assign values to your variables at the start of each instance of <openended trial250>. <trial colorResponse> changes nothing in these variables, so when that trial writes a line to the data file, the values as set in the preceding openended are captured. *<variables> used to be a diferent syntax construct from early on in Inquisit's history, so the proper moniker was already taken; unfortunate in hindsight. However, what about variables such as latency. This is overwritten upon the start of the second trial. How would I go about importing the latency of the 1st trial, without specifying a new column for each type of 1st trial (because the first trial will vary on presentation times). I would want to avoid the following: <data> / columns = (build, computer.platform, computer.timerresolution, expressions.canvasRatio, date, time, subject, blockcode, blocknum, trialcode, trialnum,blockcode
values.t, values.t_x, values.t_color, openended.trial250.response, openended.trial250.cresp, values.colorResponse, values.colorCorrect, openended.trial250.latency, openended.trial200.latency, ..
All you need is a variable (value) and then have all openended elements store their latency in that variable. Log that variable.
|
|
|