mrg4
|
|
Group: Forum Members
Posts: 19,
Visits: 218
|
Hi, I am currently working on creating templates for some standard procedures which only vary in their stimulus material and a few parameters. One of those parameters is the number of trials within a specific block. Is there any chance of using values within a block's trial-attribute? Here is a example of how I imagine the ideal sultion:
<block Test> /trials = [1-values.NumTrials = noreplace(trialA, trialB) /... </block>
Is this possible somehow? Thanks in advance!
Dominik
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 103K
|
+xHi, I am currently working on creating templates for some standard procedures which only vary in their stimulus material and a few parameters. One of those parameters is the number of trials within a specific block. Is there any chance of using values within a block's trial-attribute? Here is a example of how I imagine the ideal sultion: <block Test> /trials = [1-values.NumTrials = noreplace(trialA, trialB) /... </block> Is this possible somehow? Thanks in advance! Dominik You can achieve this by performing trial selection via a <list> and setting the <list>'s /poolsize via <parameters>: <parameters> / ntrials = 10</parameters> <block myblock> / stop = [ block.myblock.trialcount >= parameters.ntrials ]/ trials = [1=list.triallist]</block> <list triallist> / items = (trial.a, trial.b) / poolsize = parameters.ntrials</list> <trial a> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ]</trial> <trial b> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ]</trial> The above will run 10 trials (5 x a; 5 x b). Change the ntrials parameter to 20, and you'll get 10 x a and 10 x b: <parameters> / ntrials = 20 </parameters> <block myblock> / stop = [ block.myblock.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block> <list triallist> / items = (trial.a, trial.b) / poolsize = parameters.ntrials </list> <trial a> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ] </trial> <trial b> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ] </trial> Hope this helps.
|
|
|
mrg4
|
|
Group: Forum Members
Posts: 19,
Visits: 218
|
+x+xHi, I am currently working on creating templates for some standard procedures which only vary in their stimulus material and a few parameters. One of those parameters is the number of trials within a specific block. Is there any chance of using values within a block's trial-attribute? Here is a example of how I imagine the ideal sultion: <block Test> /trials = [1-values.NumTrials = noreplace(trialA, trialB) /... </block> Is this possible somehow? Thanks in advance! Dominik You can achieve this by performing trial selection via a <list> and setting the <list>'s /poolsize via <parameters>: <parameters> / ntrials = 10</parameters> <block myblock> / stop = [ block.myblock.trialcount >= parameters.ntrials ]/ trials = [1=list.triallist]</block> <list triallist> / items = (trial.a, trial.b) / poolsize = parameters.ntrials</list> <trial a> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ]</trial> <trial b> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ]</trial> The above will run 10 trials (5 x a; 5 x b). Change the ntrials parameter to 20, and you'll get 10 x a and 10 x b: <parameters> / ntrials = 20 </parameters> <block myblock> / stop = [ block.myblock.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block> <list triallist> / items = (trial.a, trial.b) / poolsize = parameters.ntrials </list> <trial a> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ] </trial> <trial b> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ] </trial> Hope this helps. Thank you so much for your quick response! That's the solution I was looking for! :) Best regards.
|
|
|
Andrew Papale
|
|
Group: Forum Members
Posts: 62,
Visits: 230
|
+x+x+xHi, I am currently working on creating templates for some standard procedures which only vary in their stimulus material and a few parameters. One of those parameters is the number of trials within a specific block. Is there any chance of using values within a block's trial-attribute? Here is a example of how I imagine the ideal sultion: <block Test> /trials = [1-values.NumTrials = noreplace(trialA, trialB) /... </block> Is this possible somehow? Thanks in advance! Dominik You can achieve this by performing trial selection via a <list> and setting the <list>'s /poolsize via <parameters>: <parameters> / ntrials = 10</parameters> <block myblock> / stop = [ block.myblock.trialcount >= parameters.ntrials ]/ trials = [1=list.triallist]</block> <list triallist> / items = (trial.a, trial.b) / poolsize = parameters.ntrials</list> <trial a> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ]</trial> <trial b> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ]</trial> The above will run 10 trials (5 x a; 5 x b). Change the ntrials parameter to 20, and you'll get 10 x a and 10 x b: <parameters> / ntrials = 20 </parameters> <block myblock> / stop = [ block.myblock.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block> <list triallist> / items = (trial.a, trial.b) / poolsize = parameters.ntrials </list> <trial a> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ] </trial> <trial b> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ] </trial> Hope this helps. Thank you so much for your quick response! That's the solution I was looking for! :) Best regards. I am trying to implement this to randomize total trial numbers, but it is not working correctly. e.g. in the code I specified, I wanted it to run 5 trials, and Inquisit is instead running exactly 3 trials of my task. The only difference appears to be that I branch from my trial in trial list to a feedback screen, and then from that feedback screen to list.triallist.nextvalue. Any help would be appreciated! <block experiment> / onblockbegin = [ values.scrfunc = noreplace("IEV","DEV","CEV","CEVR","IEV","DEV","IEV","DEV"); parameters.ntrials = 5; values.blockCount = values.blockCount + 1; values.trialCount = values.trialCount + parameters.ntrials; ] / stop = [ block.experiment.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block>
<list triallist> /items = (trial.experiment) / poolsize = parameters.ntrials </list>
<trial experiment> / branch = [ return trial.dispFeedback; ] </trial>
<trial dispFeedback> / branch = [ list.triallist.nextvalue ] </trial>
<expt main1> / blocks = [ 1=instructions; 2=experiment; 3=experiment; 4=endscreen; ] </expt>
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 103K
|
+x+x+x+xHi, I am currently working on creating templates for some standard procedures which only vary in their stimulus material and a few parameters. One of those parameters is the number of trials within a specific block. Is there any chance of using values within a block's trial-attribute? Here is a example of how I imagine the ideal sultion: <block Test> /trials = [1-values.NumTrials = noreplace(trialA, trialB) /... </block> Is this possible somehow? Thanks in advance! Dominik You can achieve this by performing trial selection via a <list> and setting the <list>'s /poolsize via <parameters>: <parameters> / ntrials = 10</parameters> <block myblock> / stop = [ block.myblock.trialcount >= parameters.ntrials ]/ trials = [1=list.triallist]</block> <list triallist> / items = (trial.a, trial.b) / poolsize = parameters.ntrials</list> <trial a> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ]</trial> <trial b> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ]</trial> The above will run 10 trials (5 x a; 5 x b). Change the ntrials parameter to 20, and you'll get 10 x a and 10 x b: <parameters> / ntrials = 20 </parameters> <block myblock> / stop = [ block.myblock.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block> <list triallist> / items = (trial.a, trial.b) / poolsize = parameters.ntrials </list> <trial a> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ] </trial> <trial b> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ] </trial> Hope this helps. Thank you so much for your quick response! That's the solution I was looking for! :) Best regards. I am trying to implement this to randomize total trial numbers, but it is not working correctly. e.g. in the code I specified, I wanted it to run 5 trials, and Inquisit is instead running exactly 3 trials of my task. The only difference appears to be that I branch from my trial in trial list to a feedback screen, and then from that feedback screen to list.triallist.nextvalue. Any help would be appreciated! <block experiment> / onblockbegin = [ values.scrfunc = noreplace("IEV","DEV","CEV","CEVR","IEV","DEV","IEV","DEV"); parameters.ntrials = 5; values.blockCount = values.blockCount + 1; values.trialCount = values.trialCount + parameters.ntrials; ] / stop = [ block.experiment.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block>
<list triallist> /items = (trial.experiment) / poolsize = parameters.ntrials </list>
<trial experiment> / branch = [ return trial.dispFeedback; ] </trial>
<trial dispFeedback> / branch = [ list.triallist.nextvalue ] </trial>
<expt main1> / blocks = [ 1=instructions; 2=experiment; 3=experiment; 4=endscreen; ] </expt> Feedback trials obviously go towards the trial count, so what you get is the expected resutl:
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 103K
|
+x+x+x+x+xHi, I am currently working on creating templates for some standard procedures which only vary in their stimulus material and a few parameters. One of those parameters is the number of trials within a specific block. Is there any chance of using values within a block's trial-attribute? Here is a example of how I imagine the ideal sultion: <block Test> /trials = [1-values.NumTrials = noreplace(trialA, trialB) /... </block> Is this possible somehow? Thanks in advance! Dominik You can achieve this by performing trial selection via a <list> and setting the <list>'s /poolsize via <parameters>: <parameters> / ntrials = 10</parameters> <block myblock> / stop = [ block.myblock.trialcount >= parameters.ntrials ]/ trials = [1=list.triallist]</block> <list triallist> / items = (trial.a, trial.b) / poolsize = parameters.ntrials</list> <trial a> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ]</trial> <trial b> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ]</trial> The above will run 10 trials (5 x a; 5 x b). Change the ntrials parameter to 20, and you'll get 10 x a and 10 x b: <parameters> / ntrials = 20 </parameters> <block myblock> / stop = [ block.myblock.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block> <list triallist> / items = (trial.a, trial.b) / poolsize = parameters.ntrials </list> <trial a> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ] </trial> <trial b> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ] </trial> Hope this helps. Thank you so much for your quick response! That's the solution I was looking for! :) Best regards. I am trying to implement this to randomize total trial numbers, but it is not working correctly. e.g. in the code I specified, I wanted it to run 5 trials, and Inquisit is instead running exactly 3 trials of my task. The only difference appears to be that I branch from my trial in trial list to a feedback screen, and then from that feedback screen to list.triallist.nextvalue. Any help would be appreciated! <block experiment> / onblockbegin = [ values.scrfunc = noreplace("IEV","DEV","CEV","CEVR","IEV","DEV","IEV","DEV"); parameters.ntrials = 5; values.blockCount = values.blockCount + 1; values.trialCount = values.trialCount + parameters.ntrials; ] / stop = [ block.experiment.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block>
<list triallist> /items = (trial.experiment) / poolsize = parameters.ntrials </list>
<trial experiment> / branch = [ return trial.dispFeedback; ] </trial>
<trial dispFeedback> / branch = [ list.triallist.nextvalue ] </trial>
<expt main1> / blocks = [ 1=instructions; 2=experiment; 3=experiment; 4=endscreen; ] </expt> Feedback trials obviously go towards the trial count, so what you get is the expected resutl: To do this properly, i.e. 5 "experiment" trials, each followed by a feedback trial per block, you'll want to do something like this: <values> / scrfunc = "" / blockcount = 0 / trialcount = 0 </values>
<parameters> / ntrials = 0 </parameters>
<block experiment> / onblockbegin = [ values.scrfunc = noreplace("IEV","DEV","CEV","CEVR","IEV","DEV","IEV","DEV"); parameters.ntrials = 5; list.triallist.poolsize = parameters.ntrials; values.trialcount = 0; values.blockCount = values.blockCount + 1; ] / stop = [ values.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block>
<list triallist> /items = (trial.experiment) / poolsize = parameters.ntrials </list>
<trial experiment> / trialduration = 100
/ branch = [ return trial.dispFeedback; ] </trial>
<trial dispFeedback> / ontrialbegin = [ values.trialcount += 1; ] / trialduration = 100 / branch = [ list.triallist.nextvalue ] </trial>
<expt main1> / blocks = [ 1=instructions; 2=experiment; 3=experiment; 4=endscreen; ] </expt>
<block instructions> / preinstructions = (intro) </block>
<block endscreen> / preinstructions = (end) </block>
<page intro> ^intro page </page>
<page end> ^end page </page>
<data> / columns = (date time subject group blocknum blockcode trialnum trialcode block.experiment.trialcount values.trialcount) </data>
|
|
|
Andrew Papale
|
|
Group: Forum Members
Posts: 62,
Visits: 230
|
+x+x+x+x+x+xHi, I am currently working on creating templates for some standard procedures which only vary in their stimulus material and a few parameters. One of those parameters is the number of trials within a specific block. Is there any chance of using values within a block's trial-attribute? Here is a example of how I imagine the ideal sultion: <block Test> /trials = [1-values.NumTrials = noreplace(trialA, trialB) /... </block> Is this possible somehow? Thanks in advance! Dominik You can achieve this by performing trial selection via a <list> and setting the <list>'s /poolsize via <parameters>: <parameters> / ntrials = 10</parameters> <block myblock> / stop = [ block.myblock.trialcount >= parameters.ntrials ]/ trials = [1=list.triallist]</block> <list triallist> / items = (trial.a, trial.b) / poolsize = parameters.ntrials</list> <trial a> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ]</trial> <trial b> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ]</trial> The above will run 10 trials (5 x a; 5 x b). Change the ntrials parameter to 20, and you'll get 10 x a and 10 x b: <parameters> / ntrials = 20 </parameters> <block myblock> / stop = [ block.myblock.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block> <list triallist> / items = (trial.a, trial.b) / poolsize = parameters.ntrials </list> <trial a> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ] </trial> <trial b> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ] </trial> Hope this helps. Thank you so much for your quick response! That's the solution I was looking for! :) Best regards. I am trying to implement this to randomize total trial numbers, but it is not working correctly. e.g. in the code I specified, I wanted it to run 5 trials, and Inquisit is instead running exactly 3 trials of my task. The only difference appears to be that I branch from my trial in trial list to a feedback screen, and then from that feedback screen to list.triallist.nextvalue. Any help would be appreciated! <block experiment> / onblockbegin = [ values.scrfunc = noreplace("IEV","DEV","CEV","CEVR","IEV","DEV","IEV","DEV"); parameters.ntrials = 5; values.blockCount = values.blockCount + 1; values.trialCount = values.trialCount + parameters.ntrials; ] / stop = [ block.experiment.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block>
<list triallist> /items = (trial.experiment) / poolsize = parameters.ntrials </list>
<trial experiment> / branch = [ return trial.dispFeedback; ] </trial>
<trial dispFeedback> / branch = [ list.triallist.nextvalue ] </trial>
<expt main1> / blocks = [ 1=instructions; 2=experiment; 3=experiment; 4=endscreen; ] </expt> Feedback trials obviously go towards the trial count, so what you get is the expected resutl: To do this properly, i.e. 5 "experiment" trials, each followed by a feedback trial per block, you'll want to do something like this: <values> / scrfunc = "" / blockcount = 0 / trialcount = 0 </values>
<parameters> / ntrials = 0 </parameters>
<block experiment> / onblockbegin = [ values.scrfunc = noreplace("IEV","DEV","CEV","CEVR","IEV","DEV","IEV","DEV"); parameters.ntrials = 5; list.triallist.poolsize = parameters.ntrials; values.trialcount = 0; values.blockCount = values.blockCount + 1; ] / stop = [ values.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block>
<list triallist> /items = (trial.experiment) / poolsize = parameters.ntrials </list>
<trial experiment> / trialduration = 100
/ branch = [ return trial.dispFeedback; ] </trial>
<trial dispFeedback> / ontrialbegin = [ values.trialcount += 1; ] / trialduration = 100 / branch = [ list.triallist.nextvalue ] </trial>
<expt main1> / blocks = [ 1=instructions; 2=experiment; 3=experiment; 4=endscreen; ] </expt>
<block instructions> / preinstructions = (intro) </block>
<block endscreen> / preinstructions = (end) </block>
<page intro> ^intro page </page>
<page end> ^end page </page>
<data> / columns = (date time subject group blocknum blockcode trialnum trialcode block.experiment.trialcount values.trialcount) </data>
Thank you, this works wonderfully.
|
|
|
Andrew Papale
|
|
Group: Forum Members
Posts: 62,
Visits: 230
|
+x+x+x+x+x+x+xHi, I am currently working on creating templates for some standard procedures which only vary in their stimulus material and a few parameters. One of those parameters is the number of trials within a specific block. Is there any chance of using values within a block's trial-attribute? Here is a example of how I imagine the ideal sultion: <block Test> /trials = [1-values.NumTrials = noreplace(trialA, trialB) /... </block> Is this possible somehow? Thanks in advance! Dominik You can achieve this by performing trial selection via a <list> and setting the <list>'s /poolsize via <parameters>: <parameters> / ntrials = 10</parameters> <block myblock> / stop = [ block.myblock.trialcount >= parameters.ntrials ]/ trials = [1=list.triallist]</block> <list triallist> / items = (trial.a, trial.b) / poolsize = parameters.ntrials</list> <trial a> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ]</trial> <trial b> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ]</trial> The above will run 10 trials (5 x a; 5 x b). Change the ntrials parameter to 20, and you'll get 10 x a and 10 x b: <parameters> / ntrials = 20 </parameters> <block myblock> / stop = [ block.myblock.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block> <list triallist> / items = (trial.a, trial.b) / poolsize = parameters.ntrials </list> <trial a> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ] </trial> <trial b> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ] </trial> Hope this helps. Thank you so much for your quick response! That's the solution I was looking for! :) Best regards. I am trying to implement this to randomize total trial numbers, but it is not working correctly. e.g. in the code I specified, I wanted it to run 5 trials, and Inquisit is instead running exactly 3 trials of my task. The only difference appears to be that I branch from my trial in trial list to a feedback screen, and then from that feedback screen to list.triallist.nextvalue. Any help would be appreciated! <block experiment> / onblockbegin = [ values.scrfunc = noreplace("IEV","DEV","CEV","CEVR","IEV","DEV","IEV","DEV"); parameters.ntrials = 5; values.blockCount = values.blockCount + 1; values.trialCount = values.trialCount + parameters.ntrials; ] / stop = [ block.experiment.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block>
<list triallist> /items = (trial.experiment) / poolsize = parameters.ntrials </list>
<trial experiment> / branch = [ return trial.dispFeedback; ] </trial>
<trial dispFeedback> / branch = [ list.triallist.nextvalue ] </trial>
<expt main1> / blocks = [ 1=instructions; 2=experiment; 3=experiment; 4=endscreen; ] </expt> Feedback trials obviously go towards the trial count, so what you get is the expected resutl: To do this properly, i.e. 5 "experiment" trials, each followed by a feedback trial per block, you'll want to do something like this: <values> / scrfunc = "" / blockcount = 0 / trialcount = 0 </values>
<parameters> / ntrials = 0 </parameters>
<block experiment> / onblockbegin = [ values.scrfunc = noreplace("IEV","DEV","CEV","CEVR","IEV","DEV","IEV","DEV"); parameters.ntrials = 5; list.triallist.poolsize = parameters.ntrials; values.trialcount = 0; values.blockCount = values.blockCount + 1; ] / stop = [ values.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block>
<list triallist> /items = (trial.experiment) / poolsize = parameters.ntrials </list>
<trial experiment> / trialduration = 100
/ branch = [ return trial.dispFeedback; ] </trial>
<trial dispFeedback> / ontrialbegin = [ values.trialcount += 1; ] / trialduration = 100 / branch = [ list.triallist.nextvalue ] </trial>
<expt main1> / blocks = [ 1=instructions; 2=experiment; 3=experiment; 4=endscreen; ] </expt>
<block instructions> / preinstructions = (intro) </block>
<block endscreen> / preinstructions = (end) </block>
<page intro> ^intro page </page>
<page end> ^end page </page>
<data> / columns = (date time subject group blocknum blockcode trialnum trialcode block.experiment.trialcount values.trialcount) </data>
Thank you, this works wonderfully. Can this same logic work to achieve variable block numbers? I assumed it would but am having some trouble implementing. Thanks, - Andre
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 103K
|
+x+x+x+x+x+x+x+xHi, I am currently working on creating templates for some standard procedures which only vary in their stimulus material and a few parameters. One of those parameters is the number of trials within a specific block. Is there any chance of using values within a block's trial-attribute? Here is a example of how I imagine the ideal sultion: <block Test> /trials = [1-values.NumTrials = noreplace(trialA, trialB) /... </block> Is this possible somehow? Thanks in advance! Dominik You can achieve this by performing trial selection via a <list> and setting the <list>'s /poolsize via <parameters>: <parameters> / ntrials = 10</parameters> <block myblock> / stop = [ block.myblock.trialcount >= parameters.ntrials ]/ trials = [1=list.triallist]</block> <list triallist> / items = (trial.a, trial.b) / poolsize = parameters.ntrials</list> <trial a> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ]</trial> <trial b> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ]</trial> The above will run 10 trials (5 x a; 5 x b). Change the ntrials parameter to 20, and you'll get 10 x a and 10 x b: <parameters> / ntrials = 20 </parameters> <block myblock> / stop = [ block.myblock.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block> <list triallist> / items = (trial.a, trial.b) / poolsize = parameters.ntrials </list> <trial a> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ] </trial> <trial b> / validresponse = (0) / trialduration = 10 / branch = [ list.triallist.nextvalue; ] </trial> Hope this helps. Thank you so much for your quick response! That's the solution I was looking for! :) Best regards. I am trying to implement this to randomize total trial numbers, but it is not working correctly. e.g. in the code I specified, I wanted it to run 5 trials, and Inquisit is instead running exactly 3 trials of my task. The only difference appears to be that I branch from my trial in trial list to a feedback screen, and then from that feedback screen to list.triallist.nextvalue. Any help would be appreciated! <block experiment> / onblockbegin = [ values.scrfunc = noreplace("IEV","DEV","CEV","CEVR","IEV","DEV","IEV","DEV"); parameters.ntrials = 5; values.blockCount = values.blockCount + 1; values.trialCount = values.trialCount + parameters.ntrials; ] / stop = [ block.experiment.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block>
<list triallist> /items = (trial.experiment) / poolsize = parameters.ntrials </list>
<trial experiment> / branch = [ return trial.dispFeedback; ] </trial>
<trial dispFeedback> / branch = [ list.triallist.nextvalue ] </trial>
<expt main1> / blocks = [ 1=instructions; 2=experiment; 3=experiment; 4=endscreen; ] </expt> Feedback trials obviously go towards the trial count, so what you get is the expected resutl: To do this properly, i.e. 5 "experiment" trials, each followed by a feedback trial per block, you'll want to do something like this: <values> / scrfunc = "" / blockcount = 0 / trialcount = 0 </values>
<parameters> / ntrials = 0 </parameters>
<block experiment> / onblockbegin = [ values.scrfunc = noreplace("IEV","DEV","CEV","CEVR","IEV","DEV","IEV","DEV"); parameters.ntrials = 5; list.triallist.poolsize = parameters.ntrials; values.trialcount = 0; values.blockCount = values.blockCount + 1; ] / stop = [ values.trialcount >= parameters.ntrials ] / trials = [1=list.triallist] </block>
<list triallist> /items = (trial.experiment) / poolsize = parameters.ntrials </list>
<trial experiment> / trialduration = 100
/ branch = [ return trial.dispFeedback; ] </trial>
<trial dispFeedback> / ontrialbegin = [ values.trialcount += 1; ] / trialduration = 100 / branch = [ list.triallist.nextvalue ] </trial>
<expt main1> / blocks = [ 1=instructions; 2=experiment; 3=experiment; 4=endscreen; ] </expt>
<block instructions> / preinstructions = (intro) </block>
<block endscreen> / preinstructions = (end) </block>
<page intro> ^intro page </page>
<page end> ^end page </page>
<data> / columns = (date time subject group blocknum blockcode trialnum trialcode block.experiment.trialcount values.trialcount) </data>
Thank you, this works wonderfully. Can this same logic work to achieve variable block numbers? I assumed it would but am having some trouble implementing. Thanks, - Andre Sure, you can do something similar for blocks.
|
|
|