By oconnordavid15 - 1/20/2022
Hello, I am looking to insert the following instructions
<page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page>
after trial block 2 and before trial block 3.
Sincerely, David
|
By Dave - 1/20/2022
+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks.
|
By oconnordavid15 - 1/21/2022
+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot!
|
By Dave - 1/21/2022
+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple.
<block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block>
with
<expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt>
|
By oconnordavid15 - 1/21/2022
+x+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple. <block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block> with <expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt> You're the best Dave, thank you.
Can we have 10 of each trial type but with random selection?
|
By Dave - 1/21/2022
+x+x+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple. <block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block> with <expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt> You're the best Dave, thank you. Can we have 10 of each trial type but with random selection? /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)]
Basics such as random block or trial selection you will find covered in the tutorials, for example.
|
By oconnordavid15 - 1/21/2022
+x+x+x+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple. <block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block> with <expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt> You're the best Dave, thank you. Can we have 10 of each trial type but with random selection? /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions ; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] Basics such as random block or trial selection you will find covered in the tutorials, for example. Amazing! Going to give it a try right no
|
By oconnordavid15 - 1/21/2022
+x+x+x+x+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple. <block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block> with <expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt> You're the best Dave, thank you. Can we have 10 of each trial type but with random selection? /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions ; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] Basics such as random block or trial selection you will find covered in the tutorials, for example. Amazing! Going to give it a try right no Works like a charm! Thanks Dave
|
By oconnordavid15 - 1/25/2022
+x+x+x+x+x+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple. <block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block> with <expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt> You're the best Dave, thank you. Can we have 10 of each trial type but with random selection? /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions ; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] Basics such as random block or trial selection you will find covered in the tutorials, for example. Amazing! Going to give it a try right no Works like a charm! Thanks Dave Hi Dave,
Can we embed logic into the summary data sheet?
For example,
Rather than outputting
In milliseconds, can I input logic to divide by 1000 to get seconds?
From column "draws", can I create a column which has "draws as a % of total boxes"?
Goal for Summary Output
|
By Dave - 1/25/2022
+x+x+x+x+x+x+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple. <block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block> with <expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt> You're the best Dave, thank you. Can we have 10 of each trial type but with random selection? /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions ; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] Basics such as random block or trial selection you will find covered in the tutorials, for example. Amazing! Going to give it a try right no Works like a charm! Thanks Dave Hi Dave, Can we embed logic into the summary data sheet? For example, Rather than outputting In milliseconds, can I input logic to divide by 1000 to get seconds? From column "draws", can I create a column which has "draws as a % of total boxes"? Goal for Summary Output <expressions> / elapsedtime_s = script.elapsedtime/1000 </expressions>
and log expressions.elapsedtime_s to the summary data file. Same for the draws. Divide by the relevant N, multiply by 100 if you want percentages.
|
By oconnordavid15 - 1/26/2022
+x+x+x+x+x+x+x+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple. <block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block> with <expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt> You're the best Dave, thank you. Can we have 10 of each trial type but with random selection? /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions ; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] Basics such as random block or trial selection you will find covered in the tutorials, for example. Amazing! Going to give it a try right no Works like a charm! Thanks Dave Hi Dave, Can we embed logic into the summary data sheet? For example, Rather than outputting In milliseconds, can I input logic to divide by 1000 to get seconds? From column "draws", can I create a column which has "draws as a % of total boxes"? Goal for Summary Output <expressions> / elapsedtime_s = script.elapsedtime/1000 </expressions> and log expressions.elapsedtime_s to the summary data file. Same for the draws. Divide by the relevant N, multiply by 100 if you want percentages. Hi Dave,
Worked like a charm, the output sheets really coming along. As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below?
values.colordecision_trial01, values.colordecision_trial02, values.colordecision_trial03, values.colordecision_trial04, values.colordecision_trial05, values.colordecision_trial06, values.colordecision_trial07, values.colordecision_trial08, values.colordecision_trial09, values.colordecision_trial10, values.colordecision_trial11, values.colordecision_trial12, values.colordecision_trial13, values.colordecision_trial14, values.colordecision_trial15, values.colordecision_trial16, values.colordecision_trial17, values.colordecision_trial18, values.colordecision_trial19, values.colordecision_trial20, values.colordecision_trial21, values.colordecision_trial22
|
By oconnordavid15 - 1/26/2022
+x+x+x+x+x+x+x+x+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple. <block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block> with <expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt> You're the best Dave, thank you. Can we have 10 of each trial type but with random selection? /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions ; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] Basics such as random block or trial selection you will find covered in the tutorials, for example. Amazing! Going to give it a try right no Works like a charm! Thanks Dave Hi Dave, Can we embed logic into the summary data sheet? For example, Rather than outputting In milliseconds, can I input logic to divide by 1000 to get seconds? From column "draws", can I create a column which has "draws as a % of total boxes"? Goal for Summary Output <expressions> / elapsedtime_s = script.elapsedtime/1000 </expressions> and log expressions.elapsedtime_s to the summary data file. Same for the draws. Divide by the relevant N, multiply by 100 if you want percentages. Hi Dave, Worked like a charm, the output sheets really coming along. As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? values.colordecision_trial01, values.colordecision_trial02, values.colordecision_trial03, values.colordecision_trial04, values.colordecision_trial05, values.colordecision_trial06, values.colordecision_trial07, values.colordecision_trial08, values.colordecision_trial09, values.colordecision_trial10, values.colordecision_trial11, values.colordecision_trial12, values.colordecision_trial13, values.colordecision_trial14, values.colordecision_trial15, values.colordecision_trial16, values.colordecision_trial17, values.colordecision_trial18, values.colordecision_trial19, values.colordecision_trial20, values.colordecision_trial21, values.colordecision_trial22
|
By Dave - 1/26/2022
+x+x+x+x+x+x+x+x+x+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple. <block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block> with <expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt> You're the best Dave, thank you. Can we have 10 of each trial type but with random selection? /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions ; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] Basics such as random block or trial selection you will find covered in the tutorials, for example. Amazing! Going to give it a try right no Works like a charm! Thanks Dave Hi Dave, Can we embed logic into the summary data sheet? For example, Rather than outputting In milliseconds, can I input logic to divide by 1000 to get seconds? From column "draws", can I create a column which has "draws as a % of total boxes"? Goal for Summary Output <expressions> / elapsedtime_s = script.elapsedtime/1000 </expressions> and log expressions.elapsedtime_s to the summary data file. Same for the draws. Divide by the relevant N, multiply by 100 if you want percentages. Hi Dave, Worked like a charm, the output sheets really coming along. As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? values.colordecision_trial01, values.colordecision_trial02, values.colordecision_trial03, values.colordecision_trial04, values.colordecision_trial05, values.colordecision_trial06, values.colordecision_trial07, values.colordecision_trial08, values.colordecision_trial09, values.colordecision_trial10, values.colordecision_trial11, values.colordecision_trial12, values.colordecision_trial13, values.colordecision_trial14, values.colordecision_trial15, values.colordecision_trial16, values.colordecision_trial17, values.colordecision_trial18, values.colordecision_trial19, values.colordecision_trial20, values.colordecision_trial21, values.colordecision_trial22 > As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below?
Because your if() -else if() syntax is broken; You have statement separators (,) where there shouldn't be any.
|
By Dave - 1/26/2022
+x+x+x+x+x+x+x+x+x+x+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple. <block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block> with <expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt> You're the best Dave, thank you. Can we have 10 of each trial type but with random selection? /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions ; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] Basics such as random block or trial selection you will find covered in the tutorials, for example. Amazing! Going to give it a try right no Works like a charm! Thanks Dave Hi Dave, Can we embed logic into the summary data sheet? For example, Rather than outputting In milliseconds, can I input logic to divide by 1000 to get seconds? From column "draws", can I create a column which has "draws as a % of total boxes"? Goal for Summary Output <expressions> / elapsedtime_s = script.elapsedtime/1000 </expressions> and log expressions.elapsedtime_s to the summary data file. Same for the draws. Divide by the relevant N, multiply by 100 if you want percentages. Hi Dave, Worked like a charm, the output sheets really coming along. As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? values.colordecision_trial01, values.colordecision_trial02, values.colordecision_trial03, values.colordecision_trial04, values.colordecision_trial05, values.colordecision_trial06, values.colordecision_trial07, values.colordecision_trial08, values.colordecision_trial09, values.colordecision_trial10, values.colordecision_trial11, values.colordecision_trial12, values.colordecision_trial13, values.colordecision_trial14, values.colordecision_trial15, values.colordecision_trial16, values.colordecision_trial17, values.colordecision_trial18, values.colordecision_trial19, values.colordecision_trial20, values.colordecision_trial21, values.colordecision_trial22 > As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? Because your if() -else if() syntax is broken; You have statement separators (,) where there shouldn't be any. This thing is a bit of mess now. You need to be a little more careful to not break things when you add or change things. Beyond a host of minor syntax mistakes, there are some things that do not make sense: - Why are the color sequences for the 9-box trials all 12 items long? Obviously it's not possible to uncover 12 colored dots when there are only 9 boxes to open. - It looks like you're not taking into account that you are now randomizing 9-box and 64-box blocks/trials. Block/trial number 3 might be a 9-box block/trial in one run, but a 64-box block/trial in the other. That is, you will end up assigning a color sequence of only 9 (or 12, see above) colors to a 64-box block/trial and -- vice versa -- a color sequence of length 64 to a 9-box block/trial. What's up with that? Is that intentional?
|
By Dave - 1/26/2022
+x+x+x+x+x+x+x+x+x+x+x+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple. <block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block> with <expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt> You're the best Dave, thank you. Can we have 10 of each trial type but with random selection? /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions ; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] Basics such as random block or trial selection you will find covered in the tutorials, for example. Amazing! Going to give it a try right no Works like a charm! Thanks Dave Hi Dave, Can we embed logic into the summary data sheet? For example, Rather than outputting In milliseconds, can I input logic to divide by 1000 to get seconds? From column "draws", can I create a column which has "draws as a % of total boxes"? Goal for Summary Output <expressions> / elapsedtime_s = script.elapsedtime/1000 </expressions> and log expressions.elapsedtime_s to the summary data file. Same for the draws. Divide by the relevant N, multiply by 100 if you want percentages. Hi Dave, Worked like a charm, the output sheets really coming along. As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? values.colordecision_trial01, values.colordecision_trial02, values.colordecision_trial03, values.colordecision_trial04, values.colordecision_trial05, values.colordecision_trial06, values.colordecision_trial07, values.colordecision_trial08, values.colordecision_trial09, values.colordecision_trial10, values.colordecision_trial11, values.colordecision_trial12, values.colordecision_trial13, values.colordecision_trial14, values.colordecision_trial15, values.colordecision_trial16, values.colordecision_trial17, values.colordecision_trial18, values.colordecision_trial19, values.colordecision_trial20, values.colordecision_trial21, values.colordecision_trial22 > As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? Because your if() -else if() syntax is broken; You have statement separators (,) where there shouldn't be any. This thing is a bit of mess now. You need to be a little more careful to not break things when you add or change things. Beyond a host of minor syntax mistakes, there are some things that do not make sense: - Why are the color sequences for the 9-box trials all 12 items long? Obviously it's not possible to uncover 12 colored dots when there are only 9 boxes to open. - It looks like you're not taking into account that you are now randomizing 9-box and 64-box blocks/trials. Block/trial number 3 might be a 9-box block/trial in one run, but a 64-box block/trial in the other. That is, you will end up assigning a color sequence of only 9 (or 12, see above) colors to a 64-box block/trial and -- vice versa -- a color sequence of length 64 to a 9-box block/trial. What's up with that? Is that intentional? Attached is a major revision of the script, based on my best guesses for the correct / intended behavior. Some open questions remain. - Compare side by side (use a diff tool) to the previous, faulty script and work through all the changes until you understand them. Ask specific questions if cannot make sense of a particular change. - Add comments to the code as you go along. This will help somebody else understand it; it will also help you better understand it if you need to revist the code months or years from now. - For future additions to the code, think through the consequences any particular change will have (cf. the block randomization mentioned previously) and take them into account.
|
By oconnordavid15 - 1/27/2022
+x+x+x+x+x+x+x+x+x+x+x+x+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple. <block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block> with <expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt> You're the best Dave, thank you. Can we have 10 of each trial type but with random selection? /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions ; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] Basics such as random block or trial selection you will find covered in the tutorials, for example. Amazing! Going to give it a try right no Works like a charm! Thanks Dave Hi Dave, Can we embed logic into the summary data sheet? For example, Rather than outputting In milliseconds, can I input logic to divide by 1000 to get seconds? From column "draws", can I create a column which has "draws as a % of total boxes"? Goal for Summary Output <expressions> / elapsedtime_s = script.elapsedtime/1000 </expressions> and log expressions.elapsedtime_s to the summary data file. Same for the draws. Divide by the relevant N, multiply by 100 if you want percentages. Hi Dave, Worked like a charm, the output sheets really coming along. As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? values.colordecision_trial01, values.colordecision_trial02, values.colordecision_trial03, values.colordecision_trial04, values.colordecision_trial05, values.colordecision_trial06, values.colordecision_trial07, values.colordecision_trial08, values.colordecision_trial09, values.colordecision_trial10, values.colordecision_trial11, values.colordecision_trial12, values.colordecision_trial13, values.colordecision_trial14, values.colordecision_trial15, values.colordecision_trial16, values.colordecision_trial17, values.colordecision_trial18, values.colordecision_trial19, values.colordecision_trial20, values.colordecision_trial21, values.colordecision_trial22 > As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? Because your if() -else if() syntax is broken; You have statement separators (,) where there shouldn't be any. This thing is a bit of mess now. You need to be a little more careful to not break things when you add or change things. Beyond a host of minor syntax mistakes, there are some things that do not make sense: - Why are the color sequences for the 9-box trials all 12 items long? Obviously it's not possible to uncover 12 colored dots when there are only 9 boxes to open. - It looks like you're not taking into account that you are now randomizing 9-box and 64-box blocks/trials. Block/trial number 3 might be a 9-box block/trial in one run, but a 64-box block/trial in the other. That is, you will end up assigning a color sequence of only 9 (or 12, see above) colors to a 64-box block/trial and -- vice versa -- a color sequence of length 64 to a 9-box block/trial. What's up with that? Is that intentional? Attached is a major revision of the script, based on my best guesses for the correct / intended behavior. Some open questions remain. - Compare side by side (use a diff tool) to the previous, faulty script and work through all the changes until you understand them. Ask specific questions if cannot make sense of a particular change. - Add comments to the code as you go along. This will help somebody else understand it; it will also help you better understand it if you need to revist the code months or years from now. - For future additions to the code, think through the consequences any particular change will have (cf. the block randomization mentioned previously) and take them into account. It's beautiful, I'm actually astonished at how much help you've given, thank you Dave.
Given each trial has two color choices. Can we make an expression which returns "1" if a choice is correct or "0" if a choice is incorrect? We are looking to output "Accuracy". I am not sure how the logic would work here, given trials are selected randomly.
|
By Dave - 1/27/2022
+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple. <block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block> with <expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt> You're the best Dave, thank you. Can we have 10 of each trial type but with random selection? /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions ; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] Basics such as random block or trial selection you will find covered in the tutorials, for example. Amazing! Going to give it a try right no Works like a charm! Thanks Dave Hi Dave, Can we embed logic into the summary data sheet? For example, Rather than outputting In milliseconds, can I input logic to divide by 1000 to get seconds? From column "draws", can I create a column which has "draws as a % of total boxes"? Goal for Summary Output <expressions> / elapsedtime_s = script.elapsedtime/1000 </expressions> and log expressions.elapsedtime_s to the summary data file. Same for the draws. Divide by the relevant N, multiply by 100 if you want percentages. Hi Dave, Worked like a charm, the output sheets really coming along. As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? values.colordecision_trial01, values.colordecision_trial02, values.colordecision_trial03, values.colordecision_trial04, values.colordecision_trial05, values.colordecision_trial06, values.colordecision_trial07, values.colordecision_trial08, values.colordecision_trial09, values.colordecision_trial10, values.colordecision_trial11, values.colordecision_trial12, values.colordecision_trial13, values.colordecision_trial14, values.colordecision_trial15, values.colordecision_trial16, values.colordecision_trial17, values.colordecision_trial18, values.colordecision_trial19, values.colordecision_trial20, values.colordecision_trial21, values.colordecision_trial22 > As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? Because your if() -else if() syntax is broken; You have statement separators (,) where there shouldn't be any. This thing is a bit of mess now. You need to be a little more careful to not break things when you add or change things. Beyond a host of minor syntax mistakes, there are some things that do not make sense: - Why are the color sequences for the 9-box trials all 12 items long? Obviously it's not possible to uncover 12 colored dots when there are only 9 boxes to open. - It looks like you're not taking into account that you are now randomizing 9-box and 64-box blocks/trials. Block/trial number 3 might be a 9-box block/trial in one run, but a 64-box block/trial in the other. That is, you will end up assigning a color sequence of only 9 (or 12, see above) colors to a 64-box block/trial and -- vice versa -- a color sequence of length 64 to a 9-box block/trial. What's up with that? Is that intentional? Attached is a major revision of the script, based on my best guesses for the correct / intended behavior. Some open questions remain. - Compare side by side (use a diff tool) to the previous, faulty script and work through all the changes until you understand them. Ask specific questions if cannot make sense of a particular change. - Add comments to the code as you go along. This will help somebody else understand it; it will also help you better understand it if you need to revist the code months or years from now. - For future additions to the code, think through the consequences any particular change will have (cf. the block randomization mentioned previously) and take them into account. It's beautiful, I'm actually astonished at how much help you've given, thank you Dave. Given each trial has two color choices. Can we make an expression which returns "1" if a choice is correct or "0" if a choice is incorrect? We are looking to output "Accuracy". I am not sure how the logic would work here, given trials are selected randomly. > We are looking to output "Accuracy". I am not sure how the logic would work here, given trials are selected randomly.
The random selection is irrelevant, you know which trial is which because there is a unique identifier. That is one of the many things I fixed in the script. Take another look at that, please, and go from there.
|
By oconnordavid15 - 1/28/2022
+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple. <block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block> with <expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt> You're the best Dave, thank you. Can we have 10 of each trial type but with random selection? /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions ; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] Basics such as random block or trial selection you will find covered in the tutorials, for example. Amazing! Going to give it a try right no Works like a charm! Thanks Dave Hi Dave, Can we embed logic into the summary data sheet? For example, Rather than outputting In milliseconds, can I input logic to divide by 1000 to get seconds? From column "draws", can I create a column which has "draws as a % of total boxes"? Goal for Summary Output <expressions> / elapsedtime_s = script.elapsedtime/1000 </expressions> and log expressions.elapsedtime_s to the summary data file. Same for the draws. Divide by the relevant N, multiply by 100 if you want percentages. Hi Dave, Worked like a charm, the output sheets really coming along. As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? values.colordecision_trial01, values.colordecision_trial02, values.colordecision_trial03, values.colordecision_trial04, values.colordecision_trial05, values.colordecision_trial06, values.colordecision_trial07, values.colordecision_trial08, values.colordecision_trial09, values.colordecision_trial10, values.colordecision_trial11, values.colordecision_trial12, values.colordecision_trial13, values.colordecision_trial14, values.colordecision_trial15, values.colordecision_trial16, values.colordecision_trial17, values.colordecision_trial18, values.colordecision_trial19, values.colordecision_trial20, values.colordecision_trial21, values.colordecision_trial22 > As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? Because your if() -else if() syntax is broken; You have statement separators (,) where there shouldn't be any. This thing is a bit of mess now. You need to be a little more careful to not break things when you add or change things. Beyond a host of minor syntax mistakes, there are some things that do not make sense: - Why are the color sequences for the 9-box trials all 12 items long? Obviously it's not possible to uncover 12 colored dots when there are only 9 boxes to open. - It looks like you're not taking into account that you are now randomizing 9-box and 64-box blocks/trials. Block/trial number 3 might be a 9-box block/trial in one run, but a 64-box block/trial in the other. That is, you will end up assigning a color sequence of only 9 (or 12, see above) colors to a 64-box block/trial and -- vice versa -- a color sequence of length 64 to a 9-box block/trial. What's up with that? Is that intentional? Attached is a major revision of the script, based on my best guesses for the correct / intended behavior. Some open questions remain. - Compare side by side (use a diff tool) to the previous, faulty script and work through all the changes until you understand them. Ask specific questions if cannot make sense of a particular change. - Add comments to the code as you go along. This will help somebody else understand it; it will also help you better understand it if you need to revist the code months or years from now. - For future additions to the code, think through the consequences any particular change will have (cf. the block randomization mentioned previously) and take them into account. It's beautiful, I'm actually astonished at how much help you've given, thank you Dave. Given each trial has two color choices. Can we make an expression which returns "1" if a choice is correct or "0" if a choice is incorrect? We are looking to output "Accuracy". I am not sure how the logic would work here, given trials are selected randomly. > We are looking to output "Accuracy". I am not sure how the logic would work here, given trials are selected randomly. The random selection is irrelevant, you know which trial is which because there is a unique identifier. That is one of the many things I fixed in the script. Take another look at that, please, and go from there. Hi Dave,
I created / accuracy_trial01 - 22 under values.
for the logic I put,
if(values.colordecision_trial01 = list.colors_text_trial01;) { values.accuracy_trial01 = 1; } else { values.accuracy_trial01 = 0; }
and then I added values.accuracy_trial01 - 22 in summary data
How can I fix my logic so it works?
Sorry if im missing something
|
By Dave - 1/28/2022
+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple. <block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block> with <expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt> You're the best Dave, thank you. Can we have 10 of each trial type but with random selection? /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions ; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] Basics such as random block or trial selection you will find covered in the tutorials, for example. Amazing! Going to give it a try right no Works like a charm! Thanks Dave Hi Dave, Can we embed logic into the summary data sheet? For example, Rather than outputting In milliseconds, can I input logic to divide by 1000 to get seconds? From column "draws", can I create a column which has "draws as a % of total boxes"? Goal for Summary Output <expressions> / elapsedtime_s = script.elapsedtime/1000 </expressions> and log expressions.elapsedtime_s to the summary data file. Same for the draws. Divide by the relevant N, multiply by 100 if you want percentages. Hi Dave, Worked like a charm, the output sheets really coming along. As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? values.colordecision_trial01, values.colordecision_trial02, values.colordecision_trial03, values.colordecision_trial04, values.colordecision_trial05, values.colordecision_trial06, values.colordecision_trial07, values.colordecision_trial08, values.colordecision_trial09, values.colordecision_trial10, values.colordecision_trial11, values.colordecision_trial12, values.colordecision_trial13, values.colordecision_trial14, values.colordecision_trial15, values.colordecision_trial16, values.colordecision_trial17, values.colordecision_trial18, values.colordecision_trial19, values.colordecision_trial20, values.colordecision_trial21, values.colordecision_trial22 > As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? Because your if() -else if() syntax is broken; You have statement separators (,) where there shouldn't be any. This thing is a bit of mess now. You need to be a little more careful to not break things when you add or change things. Beyond a host of minor syntax mistakes, there are some things that do not make sense: - Why are the color sequences for the 9-box trials all 12 items long? Obviously it's not possible to uncover 12 colored dots when there are only 9 boxes to open. - It looks like you're not taking into account that you are now randomizing 9-box and 64-box blocks/trials. Block/trial number 3 might be a 9-box block/trial in one run, but a 64-box block/trial in the other. That is, you will end up assigning a color sequence of only 9 (or 12, see above) colors to a 64-box block/trial and -- vice versa -- a color sequence of length 64 to a 9-box block/trial. What's up with that? Is that intentional? Attached is a major revision of the script, based on my best guesses for the correct / intended behavior. Some open questions remain. - Compare side by side (use a diff tool) to the previous, faulty script and work through all the changes until you understand them. Ask specific questions if cannot make sense of a particular change. - Add comments to the code as you go along. This will help somebody else understand it; it will also help you better understand it if you need to revist the code months or years from now. - For future additions to the code, think through the consequences any particular change will have (cf. the block randomization mentioned previously) and take them into account. It's beautiful, I'm actually astonished at how much help you've given, thank you Dave. Given each trial has two color choices. Can we make an expression which returns "1" if a choice is correct or "0" if a choice is incorrect? We are looking to output "Accuracy". I am not sure how the logic would work here, given trials are selected randomly. > We are looking to output "Accuracy". I am not sure how the logic would work here, given trials are selected randomly. The random selection is irrelevant, you know which trial is which because there is a unique identifier. That is one of the many things I fixed in the script. Take another look at that, please, and go from there. Hi Dave, I created / accuracy_trial01 - 22 under values. for the logic I put, if(values.colordecision_trial01 = list.colors_text_trial01;) { values.accuracy_trial01 = 1; } else { values.accuracy_trial01 = 0; } and then I added values.accuracy_trial01 - 22 in summary data How can I fix my logic so it works? Sorry if im missing something > if(values.colordecision_trial01 = list.colors_text_trial01;)
= is the assignment operator. It's the wrong operator. You're performing a logical check -- whether the statement is TRUE or FALSE -- and thus need the logical equivalence operator ==. See the operators topic in the documentation.
list.colors_text_trial01 does not return anything. Which property of the list do you (think you) need to query? See the language reference for <list> elements for all available properties.
|
By oconnordavid15 - 1/28/2022
+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple. <block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block> with <expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt> You're the best Dave, thank you. Can we have 10 of each trial type but with random selection? /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions ; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] Basics such as random block or trial selection you will find covered in the tutorials, for example. Amazing! Going to give it a try right no Works like a charm! Thanks Dave Hi Dave, Can we embed logic into the summary data sheet? For example, Rather than outputting In milliseconds, can I input logic to divide by 1000 to get seconds? From column "draws", can I create a column which has "draws as a % of total boxes"? Goal for Summary Output <expressions> / elapsedtime_s = script.elapsedtime/1000 </expressions> and log expressions.elapsedtime_s to the summary data file. Same for the draws. Divide by the relevant N, multiply by 100 if you want percentages. Hi Dave, Worked like a charm, the output sheets really coming along. As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? values.colordecision_trial01, values.colordecision_trial02, values.colordecision_trial03, values.colordecision_trial04, values.colordecision_trial05, values.colordecision_trial06, values.colordecision_trial07, values.colordecision_trial08, values.colordecision_trial09, values.colordecision_trial10, values.colordecision_trial11, values.colordecision_trial12, values.colordecision_trial13, values.colordecision_trial14, values.colordecision_trial15, values.colordecision_trial16, values.colordecision_trial17, values.colordecision_trial18, values.colordecision_trial19, values.colordecision_trial20, values.colordecision_trial21, values.colordecision_trial22 > As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? Because your if() -else if() syntax is broken; You have statement separators (,) where there shouldn't be any. This thing is a bit of mess now. You need to be a little more careful to not break things when you add or change things. Beyond a host of minor syntax mistakes, there are some things that do not make sense: - Why are the color sequences for the 9-box trials all 12 items long? Obviously it's not possible to uncover 12 colored dots when there are only 9 boxes to open. - It looks like you're not taking into account that you are now randomizing 9-box and 64-box blocks/trials. Block/trial number 3 might be a 9-box block/trial in one run, but a 64-box block/trial in the other. That is, you will end up assigning a color sequence of only 9 (or 12, see above) colors to a 64-box block/trial and -- vice versa -- a color sequence of length 64 to a 9-box block/trial. What's up with that? Is that intentional? Attached is a major revision of the script, based on my best guesses for the correct / intended behavior. Some open questions remain. - Compare side by side (use a diff tool) to the previous, faulty script and work through all the changes until you understand them. Ask specific questions if cannot make sense of a particular change. - Add comments to the code as you go along. This will help somebody else understand it; it will also help you better understand it if you need to revist the code months or years from now. - For future additions to the code, think through the consequences any particular change will have (cf. the block randomization mentioned previously) and take them into account. It's beautiful, I'm actually astonished at how much help you've given, thank you Dave. Given each trial has two color choices. Can we make an expression which returns "1" if a choice is correct or "0" if a choice is incorrect? We are looking to output "Accuracy". I am not sure how the logic would work here, given trials are selected randomly. > We are looking to output "Accuracy". I am not sure how the logic would work here, given trials are selected randomly. The random selection is irrelevant, you know which trial is which because there is a unique identifier. That is one of the many things I fixed in the script. Take another look at that, please, and go from there. Hi Dave, I created / accuracy_trial01 - 22 under values. for the logic I put, if(values.colordecision_trial01 = list.colors_text_trial01;) { values.accuracy_trial01 = 1; } else { values.accuracy_trial01 = 0; } and then I added values.accuracy_trial01 - 22 in summary data How can I fix my logic so it works? Sorry if im missing something > if(values.colordecision_trial01 = list.colors_text_trial01;) = is the assignment operator. It's the wrong operator. You're performing a logical check -- whether the statement is TRUE or FALSE -- and thus need the logical equivalence operator ==. See the operators topic in the documentation. list.colors_text_trial01 does not return anything. Which property of the list do you (think you) need to query? See the language reference for <list> elements for all available properties. Hi Dave,
Could I query the list for the mean?
if(values.colordecision_trial01 == list.colors_text_trial01.mean;) { values.accuracy_trial01 = 1; } else { values.accuracy_trial01 = 0; }
|
By Dave - 1/28/2022
+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+xHello, I am looking to insert the following instructions <page Practice_Trials> ^^ Thank you. For the following trials, the task will stay the same, it is your task to determine which color is more frequent.. </page> after trial block 2 and before trial block 3. Sincerely, David Set up a block that displays the page per its /pre- or /postinstructions, run that block at the desired point per your <expt>'s /blocks. Hi Dave, ok ill give it a shot! It's really simple. <block post_practice_instructions> / preinstructions = (page.Practice_Trials) </block> with <expt experiment> /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions; 4-13=boxtask_pressure9; 14-23=boxtask_pressure64] ... </expt> You're the best Dave, thank you. Can we have 10 of each trial type but with random selection? /blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=post_practice_instructions ; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] Basics such as random block or trial selection you will find covered in the tutorials, for example. Amazing! Going to give it a try right no Works like a charm! Thanks Dave Hi Dave, Can we embed logic into the summary data sheet? For example, Rather than outputting In milliseconds, can I input logic to divide by 1000 to get seconds? From column "draws", can I create a column which has "draws as a % of total boxes"? Goal for Summary Output <expressions> / elapsedtime_s = script.elapsedtime/1000 </expressions> and log expressions.elapsedtime_s to the summary data file. Same for the draws. Divide by the relevant N, multiply by 100 if you want percentages. Hi Dave, Worked like a charm, the output sheets really coming along. As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? values.colordecision_trial01, values.colordecision_trial02, values.colordecision_trial03, values.colordecision_trial04, values.colordecision_trial05, values.colordecision_trial06, values.colordecision_trial07, values.colordecision_trial08, values.colordecision_trial09, values.colordecision_trial10, values.colordecision_trial11, values.colordecision_trial12, values.colordecision_trial13, values.colordecision_trial14, values.colordecision_trial15, values.colordecision_trial16, values.colordecision_trial17, values.colordecision_trial18, values.colordecision_trial19, values.colordecision_trial20, values.colordecision_trial21, values.colordecision_trial22 > As far as output values, do you know why I am getting half correct output ("selected color") and half incorrect output ("-88") for the output values below? Because your if() -else if() syntax is broken; You have statement separators (,) where there shouldn't be any. This thing is a bit of mess now. You need to be a little more careful to not break things when you add or change things. Beyond a host of minor syntax mistakes, there are some things that do not make sense: - Why are the color sequences for the 9-box trials all 12 items long? Obviously it's not possible to uncover 12 colored dots when there are only 9 boxes to open. - It looks like you're not taking into account that you are now randomizing 9-box and 64-box blocks/trials. Block/trial number 3 might be a 9-box block/trial in one run, but a 64-box block/trial in the other. That is, you will end up assigning a color sequence of only 9 (or 12, see above) colors to a 64-box block/trial and -- vice versa -- a color sequence of length 64 to a 9-box block/trial. What's up with that? Is that intentional? Attached is a major revision of the script, based on my best guesses for the correct / intended behavior. Some open questions remain. - Compare side by side (use a diff tool) to the previous, faulty script and work through all the changes until you understand them. Ask specific questions if cannot make sense of a particular change. - Add comments to the code as you go along. This will help somebody else understand it; it will also help you better understand it if you need to revist the code months or years from now. - For future additions to the code, think through the consequences any particular change will have (cf. the block randomization mentioned previously) and take them into account. It's beautiful, I'm actually astonished at how much help you've given, thank you Dave. Given each trial has two color choices. Can we make an expression which returns "1" if a choice is correct or "0" if a choice is incorrect? We are looking to output "Accuracy". I am not sure how the logic would work here, given trials are selected randomly. > We are looking to output "Accuracy". I am not sure how the logic would work here, given trials are selected randomly. The random selection is irrelevant, you know which trial is which because there is a unique identifier. That is one of the many things I fixed in the script. Take another look at that, please, and go from there. Hi Dave, I created / accuracy_trial01 - 22 under values. for the logic I put, if(values.colordecision_trial01 = list.colors_text_trial01;) { values.accuracy_trial01 = 1; } else { values.accuracy_trial01 = 0; } and then I added values.accuracy_trial01 - 22 in summary data How can I fix my logic so it works? Sorry if im missing something > if(values.colordecision_trial01 = list.colors_text_trial01;) = is the assignment operator. It's the wrong operator. You're performing a logical check -- whether the statement is TRUE or FALSE -- and thus need the logical equivalence operator ==. See the operators topic in the documentation. list.colors_text_trial01 does not return anything. Which property of the list do you (think you) need to query? See the language reference for <list> elements for all available properties. Hi Dave, Could I query the list for the mean? if(values.colordecision_trial01 == list.colors_text_trial01.mean;) { values.accuracy_trial01 = 1; } else { values.accuracy_trial01 = 0; } This is that list:
<list colors_text_trial01> / items = ("green", "purple") / selectionrate = block </list>
What's the mean of "green" and "purple"? And even if there were such a thing, what would it tell you? Not what you want to know, I'm fairly sure.
What's the correct answer for trial01? Where is that already encoded -- and if it isn't -- how could you encode it in the script?
|
By oconnordavid15 - 1/28/2022
So the correct answer for trial 1 is "Green".
<list color_sequence_trial01> / items = ( green, purple, green, purple, green, green, green, green,green) / selectionmode = values.current_click </list>
I could code this as
<list corrrect_answer_trial01> / items = ("green") </list>
or possible as
list.color_sequence_trial01.mean
|
By Dave - 1/28/2022
> I could code this as > > <list corrrect_answer_trial01> > / items = ("green") > </list>
Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.)
<list list_correct_answer> / items = (list.corrrect_answer_trial01.item.1, ..., list.corrrect_answer_trial22.item.1) / selectionmode = values.current_list </list>
and make use of that just like you already make use of the other lists set up in exactly the same way.
|
By oconnordavid15 - 1/31/2022
+x> I could code this as > > <list corrrect_answer_trial01> > / items = ("green") > </list> Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.) <list list_correct_answer> / items = (list.corrrect_answer_trial01.item.1, ..., list.corrrect_answer_trial22.item.1) / selectionmode = values.current_list </list> and make use of that just like you already make use of the other lists set up in exactly the same way. Hi Dave,
This is the logic I implemented
if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial03 == 1; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial03 == 0; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial04 == 1; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial04 == 0; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial05 == 1; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial05 == 0; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial06 == 1; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial06 == 0; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial07 == 1; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial07 == 0; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial08 == 1; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial08 == 0; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial09 == 1; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial09 == 0; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial10 == 1; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial10 == 0;
Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong
|
By Dave - 1/31/2022
+x+x> I could code this as > > <list corrrect_answer_trial01> > / items = ("green") > </list> Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.) <list list_correct_answer> / items = (list.corrrect_answer_trial01.item.1, ..., list.corrrect_answer_trial22.item.1) / selectionmode = values.current_list </list> and make use of that just like you already make use of the other lists set up in exactly the same way. Hi Dave, This is the logic I implemented if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial03 == 1; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial03 == 0; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial04 == 1; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial04 == 0; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial05 == 1; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial05 == 0; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial06 == 1; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial06 == 0; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial07 == 1; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial07 == 0; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial08 == 1; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial08 == 0; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial09 == 1; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial09 == 0; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial10 == 1; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial10 == 0; Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; .... Wrong operator.
|
By oconnordavid15 - 1/31/2022
+x+x+x> I could code this as > > <list corrrect_answer_trial01> > / items = ("green") > </list> Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.) <list list_correct_answer> / items = (list.corrrect_answer_trial01.item.1, ..., list.corrrect_answer_trial22.item.1) / selectionmode = values.current_list </list> and make use of that just like you already make use of the other lists set up in exactly the same way. Hi Dave, This is the logic I implemented if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial03 == 1; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial03 == 0; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial04 == 1; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial04 == 0; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial05 == 1; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial05 == 0; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial06 == 1; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial06 == 0; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial07 == 1; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial07 == 0; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial08 == 1; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial08 == 0; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial09 == 1; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial09 == 0; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial10 == 1; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial10 == 0; Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; .... Wrong operator. thank you
|
By oconnordavid15 - 2/1/2022
+x+x+x+x> I could code this as > > <list corrrect_answer_trial01> > / items = ("green") > </list> Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.) <list list_correct_answer> / items = (list.corrrect_answer_trial01.item.1, ..., list.corrrect_answer_trial22.item.1) / selectionmode = values.current_list </list> and make use of that just like you already make use of the other lists set up in exactly the same way. Hi Dave, This is the logic I implemented if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial03 == 1; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial03 == 0; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial04 == 1; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial04 == 0; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial05 == 1; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial05 == 0; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial06 == 1; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial06 == 0; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial07 == 1; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial07 == 0; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial08 == 1; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial08 == 0; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial09 == 1; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial09 == 0; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial10 == 1; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial10 == 0; Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; .... Wrong operator. thank you Hi Dave,
Stopping and starting timer for every trial, does this look about right?
*logic to start-timing* if (values.current_list == 1;) {clock.timer_1.start} else if (values.current_list == 2;) {clock.timer_2.start} *logic to stop timing* if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 1) { clock.timer_1.stop } else if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 2)
{ clock.timer_2.stop }
output timer_1, timer_2 etc.
sincerely, David
|
By Dave - 2/1/2022
+x+x+x+x+x> I could code this as > > <list corrrect_answer_trial01> > / items = ("green") > </list> Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.) <list list_correct_answer> / items = (list.corrrect_answer_trial01.item.1, ..., list.corrrect_answer_trial22.item.1) / selectionmode = values.current_list </list> and make use of that just like you already make use of the other lists set up in exactly the same way. Hi Dave, This is the logic I implemented if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial03 == 1; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial03 == 0; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial04 == 1; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial04 == 0; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial05 == 1; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial05 == 0; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial06 == 1; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial06 == 0; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial07 == 1; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial07 == 0; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial08 == 1; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial08 == 0; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial09 == 1; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial09 == 0; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial10 == 1; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial10 == 0; Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; .... Wrong operator. thank you Hi Dave, Stopping and starting timer for every trial, does this look about right? *logic to start-timing* if (values.current_list == 1;) {clock.timer_1.start} else if (values.current_list == 2;) {clock.timer_2.start} *logic to stop timing* if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 1) { clock.timer_1.stop } else if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 2) { clock.timer_2.stop } output timer_1, timer_2 etc. sincerely, David That's not an answerable question based on an out-of-context code snippet.
|
By oconnordavid15 - 2/1/2022
+x+x+x+x+x+x> I could code this as > > <list corrrect_answer_trial01> > / items = ("green") > </list> Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.) <list list_correct_answer> / items = (list.corrrect_answer_trial01.item.1, ..., list.corrrect_answer_trial22.item.1) / selectionmode = values.current_list </list> and make use of that just like you already make use of the other lists set up in exactly the same way. Hi Dave, This is the logic I implemented if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial03 == 1; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial03 == 0; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial04 == 1; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial04 == 0; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial05 == 1; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial05 == 0; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial06 == 1; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial06 == 0; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial07 == 1; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial07 == 0; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial08 == 1; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial08 == 0; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial09 == 1; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial09 == 0; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial10 == 1; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial10 == 0; Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; .... Wrong operator. thank you Hi Dave, Stopping and starting timer for every trial, does this look about right? *logic to start-timing* if (values.current_list == 1;) {clock.timer_1.start} else if (values.current_list == 2;) {clock.timer_2.start} *logic to stop timing* if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 1) { clock.timer_1.stop } else if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 2) { clock.timer_2.stop } output timer_1, timer_2 etc. sincerely, David That's not an answerable question based on an out-of-context code snippet. Sorry, I should have formulated my question better. My apologies.
If I want to time each trial, and output how long each trial took, would I use
<clock> / mode = stopwatch / resetrate = block / format = "mm:ss" </clock>
I do not know how to time a trial, and output it
|
By Dave - 2/1/2022
+x+x+x+x+x+x+x> I could code this as > > <list corrrect_answer_trial01> > / items = ("green") > </list> Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.) <list list_correct_answer> / items = (list.corrrect_answer_trial01.item.1, ..., list.corrrect_answer_trial22.item.1) / selectionmode = values.current_list </list> and make use of that just like you already make use of the other lists set up in exactly the same way. Hi Dave, This is the logic I implemented if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial03 == 1; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial03 == 0; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial04 == 1; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial04 == 0; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial05 == 1; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial05 == 0; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial06 == 1; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial06 == 0; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial07 == 1; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial07 == 0; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial08 == 1; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial08 == 0; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial09 == 1; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial09 == 0; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial10 == 1; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial10 == 0; Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; .... Wrong operator. thank you Hi Dave, Stopping and starting timer for every trial, does this look about right? *logic to start-timing* if (values.current_list == 1;) {clock.timer_1.start} else if (values.current_list == 2;) {clock.timer_2.start} *logic to stop timing* if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 1) { clock.timer_1.stop } else if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 2) { clock.timer_2.stop } output timer_1, timer_2 etc. sincerely, David That's not an answerable question based on an out-of-context code snippet. Sorry, I should have formulated my question better. My apologies. If I want to time each trial, and output how long each trial took, would I use <clock> / mode = stopwatch / resetrate = block / format = "mm:ss" </clock> I do not know how to time a trial, and output it What do you mean by "time" a trial? The clock stimulus is there to display a timer on-screen., it has nothing to do with logging. It's also not clear what you mean by "trial". Are you referring to a single instance of a <trial>? Are you referring to a <block> of X trials, which in the script at hand represents a single "game round" in the task?
|
By oconnordavid15 - 2/1/2022
+x+x+x+x+x+x+x+x> I could code this as > > <list corrrect_answer_trial01> > / items = ("green") > </list> Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.) <list list_correct_answer> / items = (list.corrrect_answer_trial01.item.1, ..., list.corrrect_answer_trial22.item.1) / selectionmode = values.current_list </list> and make use of that just like you already make use of the other lists set up in exactly the same way. Hi Dave, This is the logic I implemented if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial03 == 1; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial03 == 0; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial04 == 1; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial04 == 0; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial05 == 1; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial05 == 0; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial06 == 1; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial06 == 0; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial07 == 1; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial07 == 0; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial08 == 1; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial08 == 0; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial09 == 1; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial09 == 0; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial10 == 1; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial10 == 0; Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; .... Wrong operator. thank you Hi Dave, Stopping and starting timer for every trial, does this look about right? *logic to start-timing* if (values.current_list == 1;) {clock.timer_1.start} else if (values.current_list == 2;) {clock.timer_2.start} *logic to stop timing* if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 1) { clock.timer_1.stop } else if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 2) { clock.timer_2.stop } output timer_1, timer_2 etc. sincerely, David That's not an answerable question based on an out-of-context code snippet. Sorry, I should have formulated my question better. My apologies. If I want to time each trial, and output how long each trial took, would I use <clock> / mode = stopwatch / resetrate = block / format = "mm:ss" </clock> I do not know how to time a trial, and output it What do you mean by "time" a trial? The clock stimulus is there to display a timer on-screen., it has nothing to do with logging. It's also not clear what you mean by "trial". Are you referring to a single instance of a <trial>? Are you referring to a <block> of X trials, which in the script at hand represents a single "game round" in the task? Hi Dave,
I would like to time each "game round" (1 - 22). And output "time to decision" for each round.
|
By Dave - 2/1/2022
+x+x+x+x+x+x+x+x+x> I could code this as > > <list corrrect_answer_trial01> > / items = ("green") > </list> Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.) <list list_correct_answer> / items = (list.corrrect_answer_trial01.item.1, ..., list.corrrect_answer_trial22.item.1) / selectionmode = values.current_list </list> and make use of that just like you already make use of the other lists set up in exactly the same way. Hi Dave, This is the logic I implemented if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial03 == 1; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial03 == 0; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial04 == 1; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial04 == 0; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial05 == 1; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial05 == 0; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial06 == 1; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial06 == 0; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial07 == 1; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial07 == 0; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial08 == 1; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial08 == 0; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial09 == 1; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial09 == 0; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial10 == 1; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial10 == 0; Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; .... Wrong operator. thank you Hi Dave, Stopping and starting timer for every trial, does this look about right? *logic to start-timing* if (values.current_list == 1;) {clock.timer_1.start} else if (values.current_list == 2;) {clock.timer_2.start} *logic to stop timing* if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 1) { clock.timer_1.stop } else if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 2) { clock.timer_2.stop } output timer_1, timer_2 etc. sincerely, David That's not an answerable question based on an out-of-context code snippet. Sorry, I should have formulated my question better. My apologies. If I want to time each trial, and output how long each trial took, would I use <clock> / mode = stopwatch / resetrate = block / format = "mm:ss" </clock> I do not know how to time a trial, and output it What do you mean by "time" a trial? The clock stimulus is there to display a timer on-screen., it has nothing to do with logging. It's also not clear what you mean by "trial". Are you referring to a single instance of a <trial>? Are you referring to a <block> of X trials, which in the script at hand represents a single "game round" in the task? Hi Dave, I would like to time each "game round" (1 - 22). And output "time to decision" for each round. Each game round is a block. <block boxtask_pressure9> is for the 9-box rounds, <block boxtask_pressure64> is for the 64-box rounds. The block ends when a decision is made. So you simply store the respective block's elapsedtime property in the appropriate value /onblockend. Elapsedtime is in milliseconds, so divide by 1000 to get seconds.
https://www.millisecond.com/support/docs/v6/html/language/properties/elapsedtime.htm https://www.millisecond.com/support/docs/v6/html/language/attributes/onblockend.htm
|
By oconnordavid15 - 2/3/2022
+x+x+x+x+x+x+x+x+x+x> I could code this as > > <list corrrect_answer_trial01> > / items = ("green") > </list> Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.) <list list_correct_answer> / items = (list.corrrect_answer_trial01.item.1, ..., list.corrrect_answer_trial22.item.1) / selectionmode = values.current_list </list> and make use of that just like you already make use of the other lists set up in exactly the same way. Hi Dave, This is the logic I implemented if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial03 == 1; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial03 == 0; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial04 == 1; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial04 == 0; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial05 == 1; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial05 == 0; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial06 == 1; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial06 == 0; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial07 == 1; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial07 == 0; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial08 == 1; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial08 == 0; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial09 == 1; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial09 == 0; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial10 == 1; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial10 == 0; Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; .... Wrong operator. thank you Hi Dave, Stopping and starting timer for every trial, does this look about right? *logic to start-timing* if (values.current_list == 1;) {clock.timer_1.start} else if (values.current_list == 2;) {clock.timer_2.start} *logic to stop timing* if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 1) { clock.timer_1.stop } else if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 2) { clock.timer_2.stop } output timer_1, timer_2 etc. sincerely, David That's not an answerable question based on an out-of-context code snippet. Sorry, I should have formulated my question better. My apologies. If I want to time each trial, and output how long each trial took, would I use <clock> / mode = stopwatch / resetrate = block / format = "mm:ss" </clock> I do not know how to time a trial, and output it What do you mean by "time" a trial? The clock stimulus is there to display a timer on-screen., it has nothing to do with logging. It's also not clear what you mean by "trial". Are you referring to a single instance of a <trial>? Are you referring to a <block> of X trials, which in the script at hand represents a single "game round" in the task? Hi Dave, I would like to time each "game round" (1 - 22). And output "time to decision" for each round. Each game round is a block. <block boxtask_pressure9> is for the 9-box rounds, <block boxtask_pressure64> is for the 64-box rounds. The block ends when a decision is made. So you simply store the respective block's elapsedtime property in the appropriate value /onblockend. Elapsedtime is in milliseconds, so divide by 1000 to get seconds. https://www.millisecond.com/support/docs/v6/html/language/properties/elapsedtime.htmhttps://www.millisecond.com/support/docs/v6/html/language/attributes/onblockend.htm Hi Dave,
Storing elapsed time using /onblockend
/ onblockend = [ if (values.current_list == 1) { script.elapsedtime.elapsedtime = values.trial01_timer } else if (values.current_list == 2) { script.elapsedtime.elapsedtime = values.trial02_timer } else if (values.current_list == 3) { script.elapsedtime.elapsedtime = values.trial03_timer } else if (values.current_list == 4) { script.elapsedtime.elapsedtime = values.trial04_timer } else if (values.current_list == 5) { script.elapsedtime.elapsedtime = values.trial05_timer } else if (values.current_list == 6) { script.elapsedtime.elapsedtime = values.trial06_timer } else if (values.current_list == 7) { script.elapsedtime.elapsedtime = values.trial07_timer } else if (values.current_list == 8) { script.elapsedtime.elapsedtime = values.trial08_timer } else if (values.current_list == 9) { script.elapsedtime.elapsedtime = values.trial09_timer } else if (values.current_list == 10) { script.elapsedtime.elapsedtime = values.trial10_timer } else if (values.current_list == 11) { script.elapsedtime.elapsedtime = values.trial11_timer } else if (values.current_list == 12) { script.elapsedtime.elapsedtime = values.trial12_timer } else if (values.current_list == 13) { script.elapsedtime.elapsedtime = values.trial13_timer } else if (values.current_list == 14) { script.elapsedtime.elapsedtime = values.trial14_timer } else if (values.current_list == 15) { script.elapsedtime.elapsedtime = values.trial15_timer } else if (values.current_list == 16) { script.elapsedtime.elapsedtime = values.trial16_timer } else if (values.current_list == 17) { script.elapsedtime.elapsedtime = values.trial17_timer } else if (values.current_list == 18) { script.elapsedtime.elapsedtime = values.trial18_timer } else if (values.current_list == 19) { script.elapsedtime.elapsedtime = values.trial19_timer } else if (values.current_list == 20) { script.elapsedtime.elapsedtime = values.trial20_timer } else if (values.current_list == 21) { script.elapsedtime.elapsedtime = values.trial21_timer } else if (values.current_list == 22) { script.elapsedtime.elapsedtime = values.trial22_timer };
However I am using it inside of
<expt>
</expt>
Should I be using it instead inside the pressure 64 and pressure 9 block?
|
By oconnordavid15 - 2/3/2022
+x+x+x+x+x+x+x+x+x+x+x> I could code this as > > <list corrrect_answer_trial01> > / items = ("green") > </list> Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.) <list list_correct_answer> / items = (list.corrrect_answer_trial01.item.1, ..., list.corrrect_answer_trial22.item.1) / selectionmode = values.current_list </list> and make use of that just like you already make use of the other lists set up in exactly the same way. Hi Dave, This is the logic I implemented if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial03 == 1; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial03 == 0; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial04 == 1; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial04 == 0; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial05 == 1; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial05 == 0; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial06 == 1; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial06 == 0; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial07 == 1; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial07 == 0; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial08 == 1; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial08 == 0; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial09 == 1; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial09 == 0; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial10 == 1; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial10 == 0; Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; .... Wrong operator. thank you Hi Dave, Stopping and starting timer for every trial, does this look about right? *logic to start-timing* if (values.current_list == 1;) {clock.timer_1.start} else if (values.current_list == 2;) {clock.timer_2.start} *logic to stop timing* if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 1) { clock.timer_1.stop } else if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 2) { clock.timer_2.stop } output timer_1, timer_2 etc. sincerely, David That's not an answerable question based on an out-of-context code snippet. Sorry, I should have formulated my question better. My apologies. If I want to time each trial, and output how long each trial took, would I use <clock> / mode = stopwatch / resetrate = block / format = "mm:ss" </clock> I do not know how to time a trial, and output it What do you mean by "time" a trial? The clock stimulus is there to display a timer on-screen., it has nothing to do with logging. It's also not clear what you mean by "trial". Are you referring to a single instance of a <trial>? Are you referring to a <block> of X trials, which in the script at hand represents a single "game round" in the task? Hi Dave, I would like to time each "game round" (1 - 22). And output "time to decision" for each round. Each game round is a block. <block boxtask_pressure9> is for the 9-box rounds, <block boxtask_pressure64> is for the 64-box rounds. The block ends when a decision is made. So you simply store the respective block's elapsedtime property in the appropriate value /onblockend. Elapsedtime is in milliseconds, so divide by 1000 to get seconds. https://www.millisecond.com/support/docs/v6/html/language/properties/elapsedtime.htmhttps://www.millisecond.com/support/docs/v6/html/language/attributes/onblockend.htm Hi Dave, Storing elapsed time using /onblockend / onblockend = [ if (values.current_list == 1) { script.elapsedtime.elapsedtime = values.trial01_timer } else if (values.current_list == 2) { script.elapsedtime.elapsedtime = values.trial02_timer } else if (values.current_list == 3) { script.elapsedtime.elapsedtime = values.trial03_timer } else if (values.current_list == 4) { script.elapsedtime.elapsedtime = values.trial04_timer } else if (values.current_list == 5) { script.elapsedtime.elapsedtime = values.trial05_timer } else if (values.current_list == 6) { script.elapsedtime.elapsedtime = values.trial06_timer } else if (values.current_list == 7) { script.elapsedtime.elapsedtime = values.trial07_timer } else if (values.current_list == 8) { script.elapsedtime.elapsedtime = values.trial08_timer } else if (values.current_list == 9) { script.elapsedtime.elapsedtime = values.trial09_timer } else if (values.current_list == 10) { script.elapsedtime.elapsedtime = values.trial10_timer } else if (values.current_list == 11) { script.elapsedtime.elapsedtime = values.trial11_timer } else if (values.current_list == 12) { script.elapsedtime.elapsedtime = values.trial12_timer } else if (values.current_list == 13) { script.elapsedtime.elapsedtime = values.trial13_timer } else if (values.current_list == 14) { script.elapsedtime.elapsedtime = values.trial14_timer } else if (values.current_list == 15) { script.elapsedtime.elapsedtime = values.trial15_timer } else if (values.current_list == 16) { script.elapsedtime.elapsedtime = values.trial16_timer } else if (values.current_list == 17) { script.elapsedtime.elapsedtime = values.trial17_timer } else if (values.current_list == 18) { script.elapsedtime.elapsedtime = values.trial18_timer } else if (values.current_list == 19) { script.elapsedtime.elapsedtime = values.trial19_timer } else if (values.current_list == 20) { script.elapsedtime.elapsedtime = values.trial20_timer } else if (values.current_list == 21) { script.elapsedtime.elapsedtime = values.trial21_timer } else if (values.current_list == 22) { script.elapsedtime.elapsedtime = values.trial22_timer }; However I am using it inside of <expt> </expt> Should I be using it instead inside the pressure 64 and pressure 9 block? I am only getting a timed value for my first trial none of the others are recording
|
By Dave - 2/3/2022
+x+x+x+x+x+x+x+x+x+x+x+x> I could code this as > > <list corrrect_answer_trial01> > / items = ("green") > </list> Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.) <list list_correct_answer> / items = (list.corrrect_answer_trial01.item.1, ..., list.corrrect_answer_trial22.item.1) / selectionmode = values.current_list </list> and make use of that just like you already make use of the other lists set up in exactly the same way. Hi Dave, This is the logic I implemented if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial03 == 1; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial03 == 0; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial04 == 1; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial04 == 0; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial05 == 1; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial05 == 0; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial06 == 1; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial06 == 0; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial07 == 1; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial07 == 0; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial08 == 1; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial08 == 0; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial09 == 1; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial09 == 0; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial10 == 1; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial10 == 0; Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; .... Wrong operator. thank you Hi Dave, Stopping and starting timer for every trial, does this look about right? *logic to start-timing* if (values.current_list == 1;) {clock.timer_1.start} else if (values.current_list == 2;) {clock.timer_2.start} *logic to stop timing* if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 1) { clock.timer_1.stop } else if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 2) { clock.timer_2.stop } output timer_1, timer_2 etc. sincerely, David That's not an answerable question based on an out-of-context code snippet. Sorry, I should have formulated my question better. My apologies. If I want to time each trial, and output how long each trial took, would I use <clock> / mode = stopwatch / resetrate = block / format = "mm:ss" </clock> I do not know how to time a trial, and output it What do you mean by "time" a trial? The clock stimulus is there to display a timer on-screen., it has nothing to do with logging. It's also not clear what you mean by "trial". Are you referring to a single instance of a <trial>? Are you referring to a <block> of X trials, which in the script at hand represents a single "game round" in the task? Hi Dave, I would like to time each "game round" (1 - 22). And output "time to decision" for each round. Each game round is a block. <block boxtask_pressure9> is for the 9-box rounds, <block boxtask_pressure64> is for the 64-box rounds. The block ends when a decision is made. So you simply store the respective block's elapsedtime property in the appropriate value /onblockend. Elapsedtime is in milliseconds, so divide by 1000 to get seconds. https://www.millisecond.com/support/docs/v6/html/language/properties/elapsedtime.htmhttps://www.millisecond.com/support/docs/v6/html/language/attributes/onblockend.htm Hi Dave, Storing elapsed time using /onblockend / onblockend = [ if (values.current_list == 1) { script.elapsedtime.elapsedtime = values.trial01_timer } else if (values.current_list == 2) { script.elapsedtime.elapsedtime = values.trial02_timer } else if (values.current_list == 3) { script.elapsedtime.elapsedtime = values.trial03_timer } else if (values.current_list == 4) { script.elapsedtime.elapsedtime = values.trial04_timer } else if (values.current_list == 5) { script.elapsedtime.elapsedtime = values.trial05_timer } else if (values.current_list == 6) { script.elapsedtime.elapsedtime = values.trial06_timer } else if (values.current_list == 7) { script.elapsedtime.elapsedtime = values.trial07_timer } else if (values.current_list == 8) { script.elapsedtime.elapsedtime = values.trial08_timer } else if (values.current_list == 9) { script.elapsedtime.elapsedtime = values.trial09_timer } else if (values.current_list == 10) { script.elapsedtime.elapsedtime = values.trial10_timer } else if (values.current_list == 11) { script.elapsedtime.elapsedtime = values.trial11_timer } else if (values.current_list == 12) { script.elapsedtime.elapsedtime = values.trial12_timer } else if (values.current_list == 13) { script.elapsedtime.elapsedtime = values.trial13_timer } else if (values.current_list == 14) { script.elapsedtime.elapsedtime = values.trial14_timer } else if (values.current_list == 15) { script.elapsedtime.elapsedtime = values.trial15_timer } else if (values.current_list == 16) { script.elapsedtime.elapsedtime = values.trial16_timer } else if (values.current_list == 17) { script.elapsedtime.elapsedtime = values.trial17_timer } else if (values.current_list == 18) { script.elapsedtime.elapsedtime = values.trial18_timer } else if (values.current_list == 19) { script.elapsedtime.elapsedtime = values.trial19_timer } else if (values.current_list == 20) { script.elapsedtime.elapsedtime = values.trial20_timer } else if (values.current_list == 21) { script.elapsedtime.elapsedtime = values.trial21_timer } else if (values.current_list == 22) { script.elapsedtime.elapsedtime = values.trial22_timer }; However I am using it inside of <expt> </expt> Should I be using it instead inside the pressure 64 and pressure 9 block? I am only getting a timed value for my first trial none of the others are recording (1) There is no such thing as script.elapsedtime.elapsedtime. (2) Script.elapsedtime is not what you want. You want the respective block's elapsedtime. (3) This is simply wrong.
/ onblockend = [ if (values.current_list == 1) { script.elapsedtime.elapsedtime = values.trial01_timer } else if (values.current_list == 2) { script.elapsedtime.elapsedtime = values.trial02_timer } ... ]
You do not want to give elapsed time the value of values.trial01_timer. You want the exact opposite.
(4) > "I am only getting a timed value for my first trial none of the others are recording"
That is because you have THIS elsewhere
which is also wrong.
|
By Dave - 2/3/2022
+x+x+x+x+x+x+x+x+x+x+x+x+x> I could code this as > > <list corrrect_answer_trial01> > / items = ("green") > </list> Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.) <list list_correct_answer> / items = (list.corrrect_answer_trial01.item.1, ..., list.corrrect_answer_trial22.item.1) / selectionmode = values.current_list </list> and make use of that just like you already make use of the other lists set up in exactly the same way. Hi Dave, This is the logic I implemented if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial03 == 1; } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial03 == 0; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial04 == 1; } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial04 == 0; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial05 == 1; } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial05 == 0; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial06 == 1; } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial06 == 0; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial07 == 1; } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial07 == 0; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial08 == 1; } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial08 == 0; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial09 == 1; } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial09 == 0; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial10 == 1; } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial10 == 0; Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial01 == 1; } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial01 == 0; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){ values.accuracy_trial02 == 1; } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){ values.accuracy_trial02 == 0; .... Wrong operator. thank you Hi Dave, Stopping and starting timer for every trial, does this look about right? *logic to start-timing* if (values.current_list == 1;) {clock.timer_1.start} else if (values.current_list == 2;) {clock.timer_2.start} *logic to stop timing* if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 1) { clock.timer_1.stop } else if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 2) { clock.timer_2.stop } output timer_1, timer_2 etc. sincerely, David That's not an answerable question based on an out-of-context code snippet. Sorry, I should have formulated my question better. My apologies. If I want to time each trial, and output how long each trial took, would I use <clock> / mode = stopwatch / resetrate = block / format = "mm:ss" </clock> I do not know how to time a trial, and output it What do you mean by "time" a trial? The clock stimulus is there to display a timer on-screen., it has nothing to do with logging. It's also not clear what you mean by "trial". Are you referring to a single instance of a <trial>? Are you referring to a <block> of X trials, which in the script at hand represents a single "game round" in the task? Hi Dave, I would like to time each "game round" (1 - 22). And output "time to decision" for each round. Each game round is a block. <block boxtask_pressure9> is for the 9-box rounds, <block boxtask_pressure64> is for the 64-box rounds. The block ends when a decision is made. So you simply store the respective block's elapsedtime property in the appropriate value /onblockend. Elapsedtime is in milliseconds, so divide by 1000 to get seconds. https://www.millisecond.com/support/docs/v6/html/language/properties/elapsedtime.htmhttps://www.millisecond.com/support/docs/v6/html/language/attributes/onblockend.htm Hi Dave, Storing elapsed time using /onblockend / onblockend = [ if (values.current_list == 1) { script.elapsedtime.elapsedtime = values.trial01_timer } else if (values.current_list == 2) { script.elapsedtime.elapsedtime = values.trial02_timer } else if (values.current_list == 3) { script.elapsedtime.elapsedtime = values.trial03_timer } else if (values.current_list == 4) { script.elapsedtime.elapsedtime = values.trial04_timer } else if (values.current_list == 5) { script.elapsedtime.elapsedtime = values.trial05_timer } else if (values.current_list == 6) { script.elapsedtime.elapsedtime = values.trial06_timer } else if (values.current_list == 7) { script.elapsedtime.elapsedtime = values.trial07_timer } else if (values.current_list == 8) { script.elapsedtime.elapsedtime = values.trial08_timer } else if (values.current_list == 9) { script.elapsedtime.elapsedtime = values.trial09_timer } else if (values.current_list == 10) { script.elapsedtime.elapsedtime = values.trial10_timer } else if (values.current_list == 11) { script.elapsedtime.elapsedtime = values.trial11_timer } else if (values.current_list == 12) { script.elapsedtime.elapsedtime = values.trial12_timer } else if (values.current_list == 13) { script.elapsedtime.elapsedtime = values.trial13_timer } else if (values.current_list == 14) { script.elapsedtime.elapsedtime = values.trial14_timer } else if (values.current_list == 15) { script.elapsedtime.elapsedtime = values.trial15_timer } else if (values.current_list == 16) { script.elapsedtime.elapsedtime = values.trial16_timer } else if (values.current_list == 17) { script.elapsedtime.elapsedtime = values.trial17_timer } else if (values.current_list == 18) { script.elapsedtime.elapsedtime = values.trial18_timer } else if (values.current_list == 19) { script.elapsedtime.elapsedtime = values.trial19_timer } else if (values.current_list == 20) { script.elapsedtime.elapsedtime = values.trial20_timer } else if (values.current_list == 21) { script.elapsedtime.elapsedtime = values.trial21_timer } else if (values.current_list == 22) { script.elapsedtime.elapsedtime = values.trial22_timer }; However I am using it inside of <expt> </expt> Should I be using it instead inside the pressure 64 and pressure 9 block? I am only getting a timed value for my first trial none of the others are recording (1) There is no such thing as script.elapsedtime.elapsedtime. (2) Script.elapsedtime is not what you want. You want the respective block's elapsedtime. (3) This is simply wrong. / onblockend = [ if (values.current_list == 1) { script.elapsedtime.elapsedtime = values.trial01_timer } else if (values.current_list == 2) { script.elapsedtime.elapsedtime = values.trial02_timer } ... ]
You do not want to give elapsed time the value of values.trial01_timer. You want the exact opposite. (4) > "I am only getting a timed value for my first trial none of the others are recording" That is because you have THIS elsewhere which is also wrong. Here's a fixed version. Work through this, please. You'll see that what's done is really not any different from other variables you wanted recorded and implemented before and discussed here at length. Apply this to anything else you may want to add.
|
|