AAT - script error: trial.selectnumber


Author
Message
alexa
alexa
Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)
Group: Forum Members
Posts: 27, Visits: 78
Hello!

I have modified the AAT-script according to my needs: 20 practice trials (grey rectangles) followed by 160 „real“ trials. The real trials were as followed: 2 groups of stimuli (40 food and 40-non-food stimuli) x 2 formats (once in portrait and once in landscape format) = 160. Now I would like to pretest the script with the test monkey, but I get the following error:

trial.selectnumber: expression ' - ' is invalid. Expression contains an unknown element or property name. I think this error must be in the sequencegenerator-script as it contains this element. I have attached both scripts. What did I do wrong?

Thank you for your help!
Alexa

Attachments
AAT_neu2.iqx (276 views, 57.00 KB)
aat_sequencegenerator_neu2.iqx (269 views, 21.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
alexa - Tuesday, February 27, 2018
Hello!

I have modified the AAT-script according to my needs: 20 practice trials (grey rectangles) followed by 160 „real“ trials. The real trials were as followed: 2 groups of stimuli (40 food and 40-non-food stimuli) x 2 formats (once in portrait and once in landscape format) = 160. Now I would like to pretest the script with the test monkey, but I get the following error:

trial.selectnumber: expression ' - ' is invalid. Expression contains an unknown element or property name. I think this error must be in the sequencegenerator-script as it contains this element. I have attached both scripts. What did I do wrong?

Thank you for your help!
Alexa

#1:
<include>
/ file = "aat_sequencegenerator_neu1.iqx"
</include>

in your AAT_neu2.iqx file

needs to read

<include>
/ file = "aat_sequencegenerator_neu2.iqx"
</include>

#2:

In your aat_sequencegenerator_neu2.iqx file, your mistake is here:

<trial selectnumber>
/ ontrialbegin = [values.newnumber = list.stimcats.nextvalue]
/ ontrialbegin = [values.index += 1]
/ ontrialbegin = [
            if (values.newnumber == 1)
                        {values.runcount_1 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_A;
                        values.count1 -=1}
            else if (values.newnumber ==2)
                        {values.runcount_1 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_B;
                        values.count2 -=1}
            else if (values.newnumber ==3)
                        {values.runcount_2 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_A;
                        values.count3 -= 1}
            else if (values.newnumber ==4)
                        {values.runcount_2 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_B;
                        values.count4 -=1}
            else if (values.newnumber ==5)
                        {values.runcount_3 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_3;
                        values.count_compareformat = values.runcount_A;
                         -= 1}
...
</trial>

It ought to read

<trial selectnumber>
/ ontrialbegin = [values.newnumber = list.stimcats.nextvalue]
/ ontrialbegin = [values.index += 1]
/ ontrialbegin = [
            if (values.newnumber == 1)
                        {values.runcount_1 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_A;
                        values.count1 -=1}
            else if (values.newnumber ==2)
                        {values.runcount_1 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_B;
                        values.count2 -=1}
            else if (values.newnumber ==3)
                        {values.runcount_2 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_A;
                        values.count3 -= 1}
            else if (values.newnumber ==4)
                        {values.runcount_2 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_B;
                        values.count4 -=1}
            else if (values.newnumber ==5)
                        {values.runcount_3 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_3;
                        values.count_compareformat = values.runcount_A;
                        values.count5 -= 1}
...
</trial>

alexa
alexa
Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)
Group: Forum Members
Posts: 27, Visits: 78
Dave - Tuesday, February 27, 2018
alexa - Tuesday, February 27, 2018
Hello!

I have modified the AAT-script according to my needs: 20 practice trials (grey rectangles) followed by 160 „real“ trials. The real trials were as followed: 2 groups of stimuli (40 food and 40-non-food stimuli) x 2 formats (once in portrait and once in landscape format) = 160. Now I would like to pretest the script with the test monkey, but I get the following error:

trial.selectnumber: expression ' - ' is invalid. Expression contains an unknown element or property name. I think this error must be in the sequencegenerator-script as it contains this element. I have attached both scripts. What did I do wrong?

Thank you for your help!
Alexa

#1:
<include>
/ file = "aat_sequencegenerator_neu1.iqx"
</include>

in your AAT_neu2.iqx file

needs to read

<include>
/ file = "aat_sequencegenerator_neu2.iqx"
</include>

#2:

In your aat_sequencegenerator_neu2.iqx file, your mistake is here:

<trial selectnumber>
/ ontrialbegin = [values.newnumber = list.stimcats.nextvalue]
/ ontrialbegin = [values.index += 1]
/ ontrialbegin = [
            if (values.newnumber == 1)
                        {values.runcount_1 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_A;
                        values.count1 -=1}
            else if (values.newnumber ==2)
                        {values.runcount_1 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_B;
                        values.count2 -=1}
            else if (values.newnumber ==3)
                        {values.runcount_2 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_A;
                        values.count3 -= 1}
            else if (values.newnumber ==4)
                        {values.runcount_2 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_B;
                        values.count4 -=1}
            else if (values.newnumber ==5)
                        {values.runcount_3 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_3;
                        values.count_compareformat = values.runcount_A;
                         -= 1}
...
</trial>

It ought to read

<trial selectnumber>
/ ontrialbegin = [values.newnumber = list.stimcats.nextvalue]
/ ontrialbegin = [values.index += 1]
/ ontrialbegin = [
            if (values.newnumber == 1)
                        {values.runcount_1 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_A;
                        values.count1 -=1}
            else if (values.newnumber ==2)
                        {values.runcount_1 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_B;
                        values.count2 -=1}
            else if (values.newnumber ==3)
                        {values.runcount_2 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_A;
                        values.count3 -= 1}
            else if (values.newnumber ==4)
                        {values.runcount_2 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_B;
                        values.count4 -=1}
            else if (values.newnumber ==5)
                        {values.runcount_3 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_3;
                        values.count_compareformat = values.runcount_A;
                        values.count5 -= 1}
...
</trial>

Thank you very much!
Now the script is working but there is another problem which occurs in some trials (not in all trials). When a picture is presented and the participant has to move the joystick, all of a sudden a second picture is presented in the same trial. This is weird because it never happened before. I have attached the raw data.
Thank you for your help!

Attachments
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
alexa - Wednesday, February 28, 2018
Dave - Tuesday, February 27, 2018
alexa - Tuesday, February 27, 2018
Hello!

I have modified the AAT-script according to my needs: 20 practice trials (grey rectangles) followed by 160 „real“ trials. The real trials were as followed: 2 groups of stimuli (40 food and 40-non-food stimuli) x 2 formats (once in portrait and once in landscape format) = 160. Now I would like to pretest the script with the test monkey, but I get the following error:

trial.selectnumber: expression ' - ' is invalid. Expression contains an unknown element or property name. I think this error must be in the sequencegenerator-script as it contains this element. I have attached both scripts. What did I do wrong?

Thank you for your help!
Alexa

#1:
<include>
/ file = "aat_sequencegenerator_neu1.iqx"
</include>

in your AAT_neu2.iqx file

needs to read

<include>
/ file = "aat_sequencegenerator_neu2.iqx"
</include>

#2:

In your aat_sequencegenerator_neu2.iqx file, your mistake is here:

<trial selectnumber>
/ ontrialbegin = [values.newnumber = list.stimcats.nextvalue]
/ ontrialbegin = [values.index += 1]
/ ontrialbegin = [
            if (values.newnumber == 1)
                        {values.runcount_1 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_A;
                        values.count1 -=1}
            else if (values.newnumber ==2)
                        {values.runcount_1 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_B;
                        values.count2 -=1}
            else if (values.newnumber ==3)
                        {values.runcount_2 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_A;
                        values.count3 -= 1}
            else if (values.newnumber ==4)
                        {values.runcount_2 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_B;
                        values.count4 -=1}
            else if (values.newnumber ==5)
                        {values.runcount_3 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_3;
                        values.count_compareformat = values.runcount_A;
                         -= 1}
...
</trial>

It ought to read

<trial selectnumber>
/ ontrialbegin = [values.newnumber = list.stimcats.nextvalue]
/ ontrialbegin = [values.index += 1]
/ ontrialbegin = [
            if (values.newnumber == 1)
                        {values.runcount_1 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_A;
                        values.count1 -=1}
            else if (values.newnumber ==2)
                        {values.runcount_1 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_B;
                        values.count2 -=1}
            else if (values.newnumber ==3)
                        {values.runcount_2 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_A;
                        values.count3 -= 1}
            else if (values.newnumber ==4)
                        {values.runcount_2 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_B;
                        values.count4 -=1}
            else if (values.newnumber ==5)
                        {values.runcount_3 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_3;
                        values.count_compareformat = values.runcount_A;
                        values.count5 -= 1}
...
</trial>

Thank you very much!
Now the script is working but there is another problem which occurs in some trials (not in all trials). When a picture is presented and the participant has to move the joystick, all of a sudden a second picture is presented in the same trial. This is weird because it never happened before. I have attached the raw data.
Thank you for your help!

If you look at your data file, there is clearly something wrong with your AAT_4 trial. That's where you should look for any errors / mistakes:



alexa
alexa
Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)
Group: Forum Members
Posts: 27, Visits: 78
Dave - Wednesday, February 28, 2018
alexa - Wednesday, February 28, 2018
Dave - Tuesday, February 27, 2018
alexa - Tuesday, February 27, 2018
Hello!

I have modified the AAT-script according to my needs: 20 practice trials (grey rectangles) followed by 160 „real“ trials. The real trials were as followed: 2 groups of stimuli (40 food and 40-non-food stimuli) x 2 formats (once in portrait and once in landscape format) = 160. Now I would like to pretest the script with the test monkey, but I get the following error:

trial.selectnumber: expression ' - ' is invalid. Expression contains an unknown element or property name. I think this error must be in the sequencegenerator-script as it contains this element. I have attached both scripts. What did I do wrong?

Thank you for your help!
Alexa

#1:
<include>
/ file = "aat_sequencegenerator_neu1.iqx"
</include>

in your AAT_neu2.iqx file

needs to read

<include>
/ file = "aat_sequencegenerator_neu2.iqx"
</include>

#2:

In your aat_sequencegenerator_neu2.iqx file, your mistake is here:

<trial selectnumber>
/ ontrialbegin = [values.newnumber = list.stimcats.nextvalue]
/ ontrialbegin = [values.index += 1]
/ ontrialbegin = [
            if (values.newnumber == 1)
                        {values.runcount_1 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_A;
                        values.count1 -=1}
            else if (values.newnumber ==2)
                        {values.runcount_1 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_B;
                        values.count2 -=1}
            else if (values.newnumber ==3)
                        {values.runcount_2 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_A;
                        values.count3 -= 1}
            else if (values.newnumber ==4)
                        {values.runcount_2 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_B;
                        values.count4 -=1}
            else if (values.newnumber ==5)
                        {values.runcount_3 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_3;
                        values.count_compareformat = values.runcount_A;
                         -= 1}
...
</trial>

It ought to read

<trial selectnumber>
/ ontrialbegin = [values.newnumber = list.stimcats.nextvalue]
/ ontrialbegin = [values.index += 1]
/ ontrialbegin = [
            if (values.newnumber == 1)
                        {values.runcount_1 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_A;
                        values.count1 -=1}
            else if (values.newnumber ==2)
                        {values.runcount_1 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_B;
                        values.count2 -=1}
            else if (values.newnumber ==3)
                        {values.runcount_2 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_A;
                        values.count3 -= 1}
            else if (values.newnumber ==4)
                        {values.runcount_2 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_B;
                        values.count4 -=1}
            else if (values.newnumber ==5)
                        {values.runcount_3 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_3;
                        values.count_compareformat = values.runcount_A;
                        values.count5 -= 1}
...
</trial>

Thank you very much!
Now the script is working but there is another problem which occurs in some trials (not in all trials). When a picture is presented and the participant has to move the joystick, all of a sudden a second picture is presented in the same trial. This is weird because it never happened before. I have attached the raw data.
Thank you for your help!

If you look at your data file, there is clearly something wrong with your AAT_4 trial. That's where you should look for any errors / mistakes:



Yes, that's true, thank you. Also, it seems that only the low-caloric pictures in the portrait format are causing issues.
I have done the AAT again. As soon as a low-caloric_P picture is presented and I move the joystick, a new picture (all formats / categories) appears.
I have carefully checked the syntax but I haven't found any irregularities in trial / category 4. Could you please help me out? I have attached the syntax.
Thank you very much!

Attachments
AAT_neu2.iqx (244 views, 57.00 KB)
aat_sequencegenerator_neu2.iqx (249 views, 22.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
alexa - Thursday, March 1, 2018
Dave - Wednesday, February 28, 2018
alexa - Wednesday, February 28, 2018
Dave - Tuesday, February 27, 2018
alexa - Tuesday, February 27, 2018
Hello!

I have modified the AAT-script according to my needs: 20 practice trials (grey rectangles) followed by 160 „real“ trials. The real trials were as followed: 2 groups of stimuli (40 food and 40-non-food stimuli) x 2 formats (once in portrait and once in landscape format) = 160. Now I would like to pretest the script with the test monkey, but I get the following error:

trial.selectnumber: expression ' - ' is invalid. Expression contains an unknown element or property name. I think this error must be in the sequencegenerator-script as it contains this element. I have attached both scripts. What did I do wrong?

Thank you for your help!
Alexa

#1:
<include>
/ file = "aat_sequencegenerator_neu1.iqx"
</include>

in your AAT_neu2.iqx file

needs to read

<include>
/ file = "aat_sequencegenerator_neu2.iqx"
</include>

#2:

In your aat_sequencegenerator_neu2.iqx file, your mistake is here:

<trial selectnumber>
/ ontrialbegin = [values.newnumber = list.stimcats.nextvalue]
/ ontrialbegin = [values.index += 1]
/ ontrialbegin = [
            if (values.newnumber == 1)
                        {values.runcount_1 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_A;
                        values.count1 -=1}
            else if (values.newnumber ==2)
                        {values.runcount_1 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_B;
                        values.count2 -=1}
            else if (values.newnumber ==3)
                        {values.runcount_2 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_A;
                        values.count3 -= 1}
            else if (values.newnumber ==4)
                        {values.runcount_2 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_B;
                        values.count4 -=1}
            else if (values.newnumber ==5)
                        {values.runcount_3 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_3;
                        values.count_compareformat = values.runcount_A;
                         -= 1}
...
</trial>

It ought to read

<trial selectnumber>
/ ontrialbegin = [values.newnumber = list.stimcats.nextvalue]
/ ontrialbegin = [values.index += 1]
/ ontrialbegin = [
            if (values.newnumber == 1)
                        {values.runcount_1 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_A;
                        values.count1 -=1}
            else if (values.newnumber ==2)
                        {values.runcount_1 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_B;
                        values.count2 -=1}
            else if (values.newnumber ==3)
                        {values.runcount_2 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_A;
                        values.count3 -= 1}
            else if (values.newnumber ==4)
                        {values.runcount_2 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_B;
                        values.count4 -=1}
            else if (values.newnumber ==5)
                        {values.runcount_3 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_3;
                        values.count_compareformat = values.runcount_A;
                        values.count5 -= 1}
...
</trial>

Thank you very much!
Now the script is working but there is another problem which occurs in some trials (not in all trials). When a picture is presented and the participant has to move the joystick, all of a sudden a second picture is presented in the same trial. This is weird because it never happened before. I have attached the raw data.
Thank you for your help!

If you look at your data file, there is clearly something wrong with your AAT_4 trial. That's where you should look for any errors / mistakes:



Yes, that's true, thank you. Also, it seems that only the low-caloric pictures in the portrait format are causing issues.
I have done the AAT again. As soon as a low-caloric_P picture is presented and I move the joystick, a new picture (all formats / categories) appears.
I have carefully checked the syntax but I haven't found any irregularities in trial / category 4. Could you please help me out? I have attached the syntax.
Thank you very much!

Compare:

<trial AAT_4>
/ ontrialbegin = [values.selectstimulus = list.category4.nextvalue]
/ ontrialbegin = [values.targetcategory = 2; values.targetformat = "p"]
/ ontrialbegin = [picture.targetstimulus.height = values.startheight_B]

/ ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0]
/ ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""]

/ stimulusframes = [1 = targetstimulus]
/ validresponse = (back, forward)
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_4.response == "back") ||
                                (values.expcondition == 2 && trial.AAT_4.response == "forward")]

/ ontrialend = [if (trial.AAT_4.correct) values.sumRTcorrect_4 += trial.AAT_4.latency]
/ ontrialend = [values.sumRT_4 += trial.AAT_4.latency]

/ ontrialend = [values.joystick_y = joystick.y]
/ ontrialend = [values.joystick_change = abs(values.joystick_y)]
/ ontrialend = [values.trialcode = "AAT_4"]
/ ontrialend = [values.RT = trial.AAT_4.latency]
/ ontrialend = [values.correct = trial.AAT_4.correct]
/ ontrialend = [values.stimulus = picture.targetstimulus.currentitem]
/ ontrialend = [if (trial.AAT_4.response == "forward") values.initialresponse = "PUSH"
                        else values.initialresponse = "PULL"]
</trial>

with for example

<trial AAT_3>
/ ontrialbegin = [values.selectstimulus = list.category3.nextvalue]
/ ontrialbegin = [values.targetcategory = 2; values.targetformat = "l"]
/ ontrialbegin = [picture.targetstimulus.height = values.startheight_A]

/ ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0]
/ ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""]

/ stimulusframes = [1 = targetstimulus]
/ validresponse = (back, forward)
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_3.response == "forward") ||
                                (values.expcondition == 2 && trial.AAT_3.response == "back")]

/ ontrialend = [if (trial.AAT_3.correct) values.sumRTcorrect_3 += trial.AAT_3.latency]
/ ontrialend = [values.sumRT_3 += trial.AAT_3.latency]

/ ontrialend = [values.joystick_y = joystick.y]
/ ontrialend = [values.joystick_change = abs(values.joystick_y)]
/ ontrialend = [values.trialcode = "AAT_3"]
/ ontrialend = [values.RT = trial.AAT_3.latency]
/ ontrialend = [values.correct = trial.AAT_3.correct]
/ ontrialend = [values.stimulus = picture.targetstimulus.currentitem]
/ ontrialend = [if (trial.AAT_3.response == "forward") values.initialresponse = "PUSH"
                        else values.initialresponse = "PULL"]

/branch = [if (trial.AAT_3.response == "forward") trial.decrease else trial.increase]
/recorddata = false

</trial>

Do you see what's missing in your <trial AAT_4> element? The trial never /branch'es to the decrease or increase trial based on the response, i.e. the AAT_4 sequence ends immediately when you move the joystick, and the next AAT trial starts.

alexa
alexa
Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)
Group: Forum Members
Posts: 27, Visits: 78
Dave - Thursday, March 1, 2018
alexa - Thursday, March 1, 2018
Dave - Wednesday, February 28, 2018
alexa - Wednesday, February 28, 2018
Dave - Tuesday, February 27, 2018
[quote]
alexa - Tuesday, February 27, 2018
Hello!

I have modified the AAT-script according to my needs: 20 practice trials (grey rectangles) followed by 160 „real“ trials. The real trials were as followed: 2 groups of stimuli (40 food and 40-non-food stimuli) x 2 formats (once in portrait and once in landscape format) = 160. Now I would like to pretest the script with the test monkey, but I get the following error:

trial.selectnumber: expression ' - ' is invalid. Expression contains an unknown element or property name. I think this error must be in the sequencegenerator-script as it contains this element. I have attached both scripts. What did I do wrong?

Thank you for your help!
Alexa

#1:
<include>
/ file = "aat_sequencegenerator_neu1.iqx"
</include>

in your AAT_neu2.iqx file

needs to read

<include>
/ file = "aat_sequencegenerator_neu2.iqx"
</include>

#2:

In your aat_sequencegenerator_neu2.iqx file, your mistake is here:

<trial selectnumber>
/ ontrialbegin = [values.newnumber = list.stimcats.nextvalue]
/ ontrialbegin = [values.index += 1]
/ ontrialbegin = [
            if (values.newnumber == 1)
                        {values.runcount_1 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_A;
                        values.count1 -=1}
            else if (values.newnumber ==2)
                        {values.runcount_1 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_B;
                        values.count2 -=1}
            else if (values.newnumber ==3)
                        {values.runcount_2 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_A;
                        values.count3 -= 1}
            else if (values.newnumber ==4)
                        {values.runcount_2 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_B;
                        values.count4 -=1}
            else if (values.newnumber ==5)
                        {values.runcount_3 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_3;
                        values.count_compareformat = values.runcount_A;
                         -= 1}
...
</trial>

It ought to read

<trial selectnumber>
/ ontrialbegin = [values.newnumber = list.stimcats.nextvalue]
/ ontrialbegin = [values.index += 1]
/ ontrialbegin = [
            if (values.newnumber == 1)
                        {values.runcount_1 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_A;
                        values.count1 -=1}
            else if (values.newnumber ==2)
                        {values.runcount_1 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_1;
                        values.count_compareformat = values.runcount_B;
                        values.count2 -=1}
            else if (values.newnumber ==3)
                        {values.runcount_2 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_A;
                        values.count3 -= 1}
            else if (values.newnumber ==4)
                        {values.runcount_2 += 1;
                        values.runcount_B += 1;
                        values.count_comparecat = values.runcount_2;
                        values.count_compareformat = values.runcount_B;
                        values.count4 -=1}
            else if (values.newnumber ==5)
                        {values.runcount_3 += 1;
                        values.runcount_A += 1;
                        values.count_comparecat = values.runcount_3;
                        values.count_compareformat = values.runcount_A;
                        values.count5 -= 1}
...
</trial>

Thank you very much!
Now the script is working but there is another problem which occurs in some trials (not in all trials). When a picture is presented and the participant has to move the joystick, all of a sudden a second picture is presented in the same trial. This is weird because it never happened before. I have attached the raw data.
Thank you for your help!

If you look at your data file, there is clearly something wrong with your AAT_4 trial. That's where you should look for any errors / mistakes:



Yes, that's true, thank you. Also, it seems that only the low-caloric pictures in the portrait format are causing issues.
I have done the AAT again. As soon as a low-caloric_P picture is presented and I move the joystick, a new picture (all formats / categories) appears.
I have carefully checked the syntax but I haven't found any irregularities in trial / category 4. Could you please help me out? I have attached the syntax.
Thank you very much!

Compare:

<trial AAT_4>
/ ontrialbegin = [values.selectstimulus = list.category4.nextvalue]
/ ontrialbegin = [values.targetcategory = 2; values.targetformat = "p"]
/ ontrialbegin = [picture.targetstimulus.height = values.startheight_B]

/ ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0]
/ ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""]

/ stimulusframes = [1 = targetstimulus]
/ validresponse = (back, forward)
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_4.response == "back") ||
                                (values.expcondition == 2 && trial.AAT_4.response == "forward")]

/ ontrialend = [if (trial.AAT_4.correct) values.sumRTcorrect_4 += trial.AAT_4.latency]
/ ontrialend = [values.sumRT_4 += trial.AAT_4.latency]

/ ontrialend = [values.joystick_y = joystick.y]
/ ontrialend = [values.joystick_change = abs(values.joystick_y)]
/ ontrialend = [values.trialcode = "AAT_4"]
/ ontrialend = [values.RT = trial.AAT_4.latency]
/ ontrialend = [values.correct = trial.AAT_4.correct]
/ ontrialend = [values.stimulus = picture.targetstimulus.currentitem]
/ ontrialend = [if (trial.AAT_4.response == "forward") values.initialresponse = "PUSH"
                        else values.initialresponse = "PULL"]
</trial>

with for example

<trial AAT_3>
/ ontrialbegin = [values.selectstimulus = list.category3.nextvalue]
/ ontrialbegin = [values.targetcategory = 2; values.targetformat = "l"]
/ ontrialbegin = [picture.targetstimulus.height = values.startheight_A]

/ ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0]
/ ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""]

/ stimulusframes = [1 = targetstimulus]
/ validresponse = (back, forward)
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_3.response == "forward") ||
                                (values.expcondition == 2 && trial.AAT_3.response == "back")]

/ ontrialend = [if (trial.AAT_3.correct) values.sumRTcorrect_3 += trial.AAT_3.latency]
/ ontrialend = [values.sumRT_3 += trial.AAT_3.latency]

/ ontrialend = [values.joystick_y = joystick.y]
/ ontrialend = [values.joystick_change = abs(values.joystick_y)]
/ ontrialend = [values.trialcode = "AAT_3"]
/ ontrialend = [values.RT = trial.AAT_3.latency]
/ ontrialend = [values.correct = trial.AAT_3.correct]
/ ontrialend = [values.stimulus = picture.targetstimulus.currentitem]
/ ontrialend = [if (trial.AAT_3.response == "forward") values.initialresponse = "PUSH"
                        else values.initialresponse = "PULL"]

/branch = [if (trial.AAT_3.response == "forward") trial.decrease else trial.increase]
/recorddata = false

</trial>

Do you see what's missing in your <trial AAT_4> element? The trial never /branch'es to the decrease or increase trial based on the response, i.e. the AAT_4 sequence ends immediately when you move the joystick, and the next AAT trial starts.

[/quote

Oh, that's right! I have implemented:

/branch = [if (trial.AAT_4.response == "forward") trial.decrease else trial.increase]
/recorddata = false

Thank you very much for your help!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search