Which test? Learning phase (images and questions) and test phase (images and questions).


Author
Message
Hasagu
Hasagu
New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)
Group: Forum Members
Posts: 7, Visits: 30
Hi Inquisit users,

I'm wondering if someone can help me find the appopriate Inquisit test for my study.

I want to present 90 single images in a learning phase (with stimulus presentation and inter stimulus interval), and ask participants to categories each as an indoor or outdoor item (I for indoor and O for outdoor).

In a test phase, I will present 135 single images and ask participants to specify whether each image is a repeat, new, or similar image.

Does anyone know if there are any tests like this already? I've been searching the library but can't find anything yet.

TIA!

Dave
Dave
Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)
Group: Administrators
Posts: 11K, Visits: 67K
Hasagu - 3/9/2021
Hi Inquisit users,

I'm wondering if someone can help me find the appopriate Inquisit test for my study.

I want to present 90 single images in a learning phase (with stimulus presentation and inter stimulus interval), and ask participants to categories each as an indoor or outdoor item (I for indoor and O for outdoor).

In a test phase, I will present 135 single images and ask participants to specify whether each image is a repeat, new, or similar image.

Does anyone know if there are any tests like this already? I've been searching the library but can't find anything yet.

TIA!

The first aspect of your task is a simple, two-choice categorisation task. These are trivial to implement, scripts like all the IATs, lexical decision tasks (word vs. nonword) are all two-choice categorisation tasks. These kinds of tasks are also covered extensively in the tutorials: https://www.millisecond.com/support/docs/v6/html/tutorials/tutorials.htm

The second aspect of your task is an old-new paradigm (with lures). These kinds of paradigms have been discussed here a number of times and you can find examples e.g. here https://www.millisecond.com/forums/Topic21813.aspx

Edited Last Month by Dave
Hasagu
Hasagu
New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)
Group: Forum Members
Posts: 7, Visits: 30
Thanks Dave, that's really helpfu

Hasagu
Hasagu
New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)
Group: Forum Members
Posts: 7, Visits: 30
Dave - 3/9/2021
Hasagu - 3/9/2021
Hi Inquisit users,

I'm wondering if someone can help me find the appopriate Inquisit test for my study.

I want to present 90 single images in a learning phase (with stimulus presentation and inter stimulus interval), and ask participants to categories each as an indoor or outdoor item (I for indoor and O for outdoor).

In a test phase, I will present 135 single images and ask participants to specify whether each image is a repeat, new, or similar image.

Does anyone know if there are any tests like this already? I've been searching the library but can't find anything yet.

TIA!

The first aspect of your task is a simple, two-choice categorisation task. These are trivial to implement, scripts like all the IATs, lexical decision tasks (word vs. nonword) are all two-choice categorisation tasks. These kinds of tasks are also covered extensively in the tutorials: https://www.millisecond.com/support/docs/v6/html/tutorials/tutorials.htm

The second aspect of your task is an old-new paradigm (with lures). These kinds of paradigms have been discussed here a number of times and you can find examples e.g. here https://www.millisecond.com/forums/Topic21813.aspx

The Lexical Decision Task is exactly what I need for the first part. Is there a way to substitute words for images?

Dave
Dave
Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)
Group: Administrators
Posts: 11K, Visits: 67K
Hasagu - 3/9/2021
Dave - 3/9/2021
Hasagu - 3/9/2021
Hi Inquisit users,

I'm wondering if someone can help me find the appopriate Inquisit test for my study.

I want to present 90 single images in a learning phase (with stimulus presentation and inter stimulus interval), and ask participants to categories each as an indoor or outdoor item (I for indoor and O for outdoor).

In a test phase, I will present 135 single images and ask participants to specify whether each image is a repeat, new, or similar image.

Does anyone know if there are any tests like this already? I've been searching the library but can't find anything yet.

TIA!

The first aspect of your task is a simple, two-choice categorisation task. These are trivial to implement, scripts like all the IATs, lexical decision tasks (word vs. nonword) are all two-choice categorisation tasks. These kinds of tasks are also covered extensively in the tutorials: https://www.millisecond.com/support/docs/v6/html/tutorials/tutorials.htm

The second aspect of your task is an old-new paradigm (with lures). These kinds of paradigms have been discussed here a number of times and you can find examples e.g. here https://www.millisecond.com/forums/Topic21813.aspx

The Lexical Decision Task is exactly what I need for the first part. Is there a way to substitute words for images?

Change the <text> elements to <picture> elements.
Hasagu
Hasagu
New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)
Group: Forum Members
Posts: 7, Visits: 30
Dave - 3/9/2021
Hasagu - 3/9/2021
Dave - 3/9/2021
Hasagu - 3/9/2021
Hi Inquisit users,

I'm wondering if someone can help me find the appopriate Inquisit test for my study.

I want to present 90 single images in a learning phase (with stimulus presentation and inter stimulus interval), and ask participants to categories each as an indoor or outdoor item (I for indoor and O for outdoor).

In a test phase, I will present 135 single images and ask participants to specify whether each image is a repeat, new, or similar image.

Does anyone know if there are any tests like this already? I've been searching the library but can't find anything yet.

TIA!

The first aspect of your task is a simple, two-choice categorisation task. These are trivial to implement, scripts like all the IATs, lexical decision tasks (word vs. nonword) are all two-choice categorisation tasks. These kinds of tasks are also covered extensively in the tutorials: https://www.millisecond.com/support/docs/v6/html/tutorials/tutorials.htm

The second aspect of your task is an old-new paradigm (with lures). These kinds of paradigms have been discussed here a number of times and you can find examples e.g. here https://www.millisecond.com/forums/Topic21813.aspx

The Lexical Decision Task is exactly what I need for the first part. Is there a way to substitute words for images?

Change the <text> elements to <picture> elements.
Thanks Dave.

I have changed the item category to pictures:
From:
<item category>
/ 1 = "category1"
/ 2 = "category2"
/ 3 = "category3"
/ 4 = "category4"
/ 5 = "category5"
/ 6 = "category6"
/ 7 = "category7"
/ 8 = "category8"
/ 9 = "category9"
/ 10 = "category10"
/ 11 = "category11"
/ 12 = "category12"
/ 13 = "category13"
</item>

to:
<item target1>
/1 = "Picture 1a.jpg"
/2 = "Picture 2a.jpg"
/3 = "Picture 3a.jpg"
/4 = "Picture 4a.jpg"
/5 = "Picture 5a.jpg"
/6 = "Picture 6a.jpg"
/7 = "Picture 7a.jpg"
/8 = "Picture 8a.jpg"
/9 = "Picture 9a.jpg"
/10 = "Picture 10a.jpg"

And the stimuli:
From:
<text category>
/ items = category
/ fontstyle = ("Arial", parameters.stimSize, false, false, false, false, 5, 0)
</text>

To:
<picture category>
/ items = target1
/select = values.stimulusselect
/position = (50%, 50%)
/ size = (40%, 40%)
</picture>

But, there is no folder to store my pictures, and I get a lot of errors, some of which are:
'text.nonword' Expression contains an invalid identifier.
'text.nonword.currentitem' Expression contains an invalid identifier.
Unable to load the picture '/Users/hannahgutmann/Downloads/Picture 4a.jpg'. Network Error: Error opening /Users/hannahgutmann/Downloads/Picture 4a.jpg: No such file or directory
Hasagu
Hasagu
New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)
Group: Forum Members
Posts: 7, Visits: 30
Hasagu - 3/9/2021
Dave - 3/9/2021
Hasagu - 3/9/2021
Dave - 3/9/2021
Hasagu - 3/9/2021
Hi Inquisit users,

I'm wondering if someone can help me find the appopriate Inquisit test for my study.

I want to present 90 single images in a learning phase (with stimulus presentation and inter stimulus interval), and ask participants to categories each as an indoor or outdoor item (I for indoor and O for outdoor).

In a test phase, I will present 135 single images and ask participants to specify whether each image is a repeat, new, or similar image.

Does anyone know if there are any tests like this already? I've been searching the library but can't find anything yet.

TIA!

The first aspect of your task is a simple, two-choice categorisation task. These are trivial to implement, scripts like all the IATs, lexical decision tasks (word vs. nonword) are all two-choice categorisation tasks. These kinds of tasks are also covered extensively in the tutorials: https://www.millisecond.com/support/docs/v6/html/tutorials/tutorials.htm

The second aspect of your task is an old-new paradigm (with lures). These kinds of paradigms have been discussed here a number of times and you can find examples e.g. here https://www.millisecond.com/forums/Topic21813.aspx

The Lexical Decision Task is exactly what I need for the first part. Is there a way to substitute words for images?

Change the <text> elements to <picture> elements.
Thanks Dave.

I have changed the item category to pictures:
From:
<item category>
/ 1 = "category1"
/ 2 = "category2"
/ 3 = "category3"
/ 4 = "category4"
/ 5 = "category5"
/ 6 = "category6"
/ 7 = "category7"
/ 8 = "category8"
/ 9 = "category9"
/ 10 = "category10"
/ 11 = "category11"
/ 12 = "category12"
/ 13 = "category13"
</item>

to:
<item target1>
/1 = "Picture 1a.jpg"
/2 = "Picture 2a.jpg"
/3 = "Picture 3a.jpg"
/4 = "Picture 4a.jpg"
/5 = "Picture 5a.jpg"
/6 = "Picture 6a.jpg"
/7 = "Picture 7a.jpg"
/8 = "Picture 8a.jpg"
/9 = "Picture 9a.jpg"
/10 = "Picture 10a.jpg"

And the stimuli:
From:
<text category>
/ items = category
/ fontstyle = ("Arial", parameters.stimSize, false, false, false, false, 5, 0)
</text>

To:
<picture category>
/ items = target1
/select = values.stimulusselect
/position = (50%, 50%)
/ size = (40%, 40%)
</picture>

But, there is no folder to store my pictures, and I get a lot of errors, some of which are:
'text.nonword' Expression contains an invalid identifier.
'text.nonword.currentitem' Expression contains an invalid identifier.
Unable to load the picture '/Users/hannahgutmann/Downloads/Picture 4a.jpg'. Network Error: Error opening /Users/hannahgutmann/Downloads/Picture 4a.jpg: No such file or directory

This is the code the error is related to:

<trial ldtnonword>
/ ontrialbegin = [
    values.condition = "Non Word";
    trial.ldtnonword.insertstimulustime(text.nonword, parameters.fixationDuration);
    trial.ldtnonword.insertstimulustime(shape.blank, (parameters.fixationDuration + parameters.stimDuration));    
]
/ stimulustimes = [0=ready]
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/beginresponsetime = parameters.fixationDuration
/ ontrialend = [
    trial.ldtnonword.resetstimulusframes();
    
    list.nonwords.appenditem(trial.ldtnonword.correct);
    list.overallaccuracy.appenditem(trial.ldtnonword.correct);    
    if (trial.ldtnonword.correct) {
        list.nonwords_correctRT.appenditem(trial.ldtnonword.latency);
        list.overallRT.appenditem(trial.ldtnonword.latency);        
    };    
    
    values.presentedStim = text.nonword.currentitem;
]
</trial>

trial ldtneutralPractice>
/ ontrialbegin = [
    values.condition = "Neutral Word";
    trial.ldtneutralPractice.insertstimulustime(text.neutralPractice, parameters.fixationDuration);
    trial.ldtneutralPractice.insertstimulustime(shape.blank, (parameters.fixationDuration + parameters.stimDuration));    
]
/ stimulustimes = [0=ready]
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/beginresponsetime = parameters.fixationDuration
/ ontrialend = [
    trial.ldtneutralPractice.resetstimulusframes();
    values.presentedStim = text.neutralPractice.currentitem;
]
</trial>

<trial ldtnonwordPractice>
/ ontrialbegin = [
    values.Condition = "Non Word";
    trial.ldtnonwordPractice.insertstimulustime(text.nonwordPractice, parameters.fixationDuration);
    trial.ldtnonwordPractice.insertstimulustime(shape.blank, (parameters.fixationDuration + parameters.stimDuration));    
]
/ stimulustimes = [0=ready]
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/beginresponsetime = parameters.fixationDuration
/ ontrialend = [
    trial.ldtnonwordPractice.resetstimulusframes();
    values.presentedStim = text.nonwordPractice.currentitem;
]
</trial>

<trial instructions>
/ stimulustimes = [0=instructions]
/ validresponse = (" ")
/ recorddata = false
</trial>
Dave
Dave
Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)
Group: Administrators
Posts: 11K, Visits: 67K
Hasagu - 3/9/2021
Hasagu - 3/9/2021
Dave - 3/9/2021
Hasagu - 3/9/2021
Dave - 3/9/2021
Hasagu - 3/9/2021
Hi Inquisit users,

I'm wondering if someone can help me find the appopriate Inquisit test for my study.

I want to present 90 single images in a learning phase (with stimulus presentation and inter stimulus interval), and ask participants to categories each as an indoor or outdoor item (I for indoor and O for outdoor).

In a test phase, I will present 135 single images and ask participants to specify whether each image is a repeat, new, or similar image.

Does anyone know if there are any tests like this already? I've been searching the library but can't find anything yet.

TIA!

The first aspect of your task is a simple, two-choice categorisation task. These are trivial to implement, scripts like all the IATs, lexical decision tasks (word vs. nonword) are all two-choice categorisation tasks. These kinds of tasks are also covered extensively in the tutorials: https://www.millisecond.com/support/docs/v6/html/tutorials/tutorials.htm

The second aspect of your task is an old-new paradigm (with lures). These kinds of paradigms have been discussed here a number of times and you can find examples e.g. here https://www.millisecond.com/forums/Topic21813.aspx

The Lexical Decision Task is exactly what I need for the first part. Is there a way to substitute words for images?

Change the <text> elements to <picture> elements.
Thanks Dave.

I have changed the item category to pictures:
From:
<item category>
/ 1 = "category1"
/ 2 = "category2"
/ 3 = "category3"
/ 4 = "category4"
/ 5 = "category5"
/ 6 = "category6"
/ 7 = "category7"
/ 8 = "category8"
/ 9 = "category9"
/ 10 = "category10"
/ 11 = "category11"
/ 12 = "category12"
/ 13 = "category13"
</item>

to:
<item target1>
/1 = "Picture 1a.jpg"
/2 = "Picture 2a.jpg"
/3 = "Picture 3a.jpg"
/4 = "Picture 4a.jpg"
/5 = "Picture 5a.jpg"
/6 = "Picture 6a.jpg"
/7 = "Picture 7a.jpg"
/8 = "Picture 8a.jpg"
/9 = "Picture 9a.jpg"
/10 = "Picture 10a.jpg"

And the stimuli:
From:
<text category>
/ items = category
/ fontstyle = ("Arial", parameters.stimSize, false, false, false, false, 5, 0)
</text>

To:
<picture category>
/ items = target1
/select = values.stimulusselect
/position = (50%, 50%)
/ size = (40%, 40%)
</picture>

But, there is no folder to store my pictures, and I get a lot of errors, some of which are:
'text.nonword' Expression contains an invalid identifier.
'text.nonword.currentitem' Expression contains an invalid identifier.
Unable to load the picture '/Users/hannahgutmann/Downloads/Picture 4a.jpg'. Network Error: Error opening /Users/hannahgutmann/Downloads/Picture 4a.jpg: No such file or directory

This is the code the error is related to:

<trial ldtnonword>
/ ontrialbegin = [
    values.condition = "Non Word";
    trial.ldtnonword.insertstimulustime(text.nonword, parameters.fixationDuration);
    trial.ldtnonword.insertstimulustime(shape.blank, (parameters.fixationDuration + parameters.stimDuration));    
]
/ stimulustimes = [0=ready]
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/beginresponsetime = parameters.fixationDuration
/ ontrialend = [
    trial.ldtnonword.resetstimulusframes();
    
    list.nonwords.appenditem(trial.ldtnonword.correct);
    list.overallaccuracy.appenditem(trial.ldtnonword.correct);    
    if (trial.ldtnonword.correct) {
        list.nonwords_correctRT.appenditem(trial.ldtnonword.latency);
        list.overallRT.appenditem(trial.ldtnonword.latency);        
    };    
    
    values.presentedStim = text.nonword.currentitem;
]
</trial>

trial ldtneutralPractice>
/ ontrialbegin = [
    values.condition = "Neutral Word";
    trial.ldtneutralPractice.insertstimulustime(text.neutralPractice, parameters.fixationDuration);
    trial.ldtneutralPractice.insertstimulustime(shape.blank, (parameters.fixationDuration + parameters.stimDuration));    
]
/ stimulustimes = [0=ready]
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/beginresponsetime = parameters.fixationDuration
/ ontrialend = [
    trial.ldtneutralPractice.resetstimulusframes();
    values.presentedStim = text.neutralPractice.currentitem;
]
</trial>

<trial ldtnonwordPractice>
/ ontrialbegin = [
    values.Condition = "Non Word";
    trial.ldtnonwordPractice.insertstimulustime(text.nonwordPractice, parameters.fixationDuration);
    trial.ldtnonwordPractice.insertstimulustime(shape.blank, (parameters.fixationDuration + parameters.stimDuration));    
]
/ stimulustimes = [0=ready]
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/beginresponsetime = parameters.fixationDuration
/ ontrialend = [
    trial.ldtnonwordPractice.resetstimulusframes();
    values.presentedStim = text.nonwordPractice.currentitem;
]
</trial>

<trial instructions>
/ stimulustimes = [0=instructions]
/ validresponse = (" ")
/ recorddata = false
</trial>

(1) Image files ought to reside in the same folder where the script resides. Your system's "Downloads" folder is not a suitable place for this. Create a folder on your Desktop or in your personal files directory, and move the script and image files there.

(2) There is no text.nonword anymore.

<trial ldtnonword>
/ ontrialbegin = [
values.condition = "Non Word";
trial.ldtnonword.insertstimulustime(text.nonword, parameters.fixationDuration);
trial.ldtnonword.insertstimulustime(shape.blank, (parameters.fixationDuration + parameters.stimDuration));
]
/ stimulustimes = [0=ready]
...
</trial>

If you make changes, you need to adjust the rest of the code accordingly.

Hasagu
Hasagu
New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)
Group: Forum Members
Posts: 7, Visits: 30
Dave - 3/9/2021
Hasagu - 3/9/2021
Hasagu - 3/9/2021
Dave - 3/9/2021
Hasagu - 3/9/2021
Dave - 3/9/2021
Hasagu - 3/9/2021
Hi Inquisit users,

I'm wondering if someone can help me find the appopriate Inquisit test for my study.

I want to present 90 single images in a learning phase (with stimulus presentation and inter stimulus interval), and ask participants to categories each as an indoor or outdoor item (I for indoor and O for outdoor).

In a test phase, I will present 135 single images and ask participants to specify whether each image is a repeat, new, or similar image.

Does anyone know if there are any tests like this already? I've been searching the library but can't find anything yet.

TIA!

The first aspect of your task is a simple, two-choice categorisation task. These are trivial to implement, scripts like all the IATs, lexical decision tasks (word vs. nonword) are all two-choice categorisation tasks. These kinds of tasks are also covered extensively in the tutorials: https://www.millisecond.com/support/docs/v6/html/tutorials/tutorials.htm

The second aspect of your task is an old-new paradigm (with lures). These kinds of paradigms have been discussed here a number of times and you can find examples e.g. here https://www.millisecond.com/forums/Topic21813.aspx

The Lexical Decision Task is exactly what I need for the first part. Is there a way to substitute words for images?

Change the <text> elements to <picture> elements.
Thanks Dave.

I have changed the item category to pictures:
From:
<item category>
/ 1 = "category1"
/ 2 = "category2"
/ 3 = "category3"
/ 4 = "category4"
/ 5 = "category5"
/ 6 = "category6"
/ 7 = "category7"
/ 8 = "category8"
/ 9 = "category9"
/ 10 = "category10"
/ 11 = "category11"
/ 12 = "category12"
/ 13 = "category13"
</item>

to:
<item target1>
/1 = "Picture 1a.jpg"
/2 = "Picture 2a.jpg"
/3 = "Picture 3a.jpg"
/4 = "Picture 4a.jpg"
/5 = "Picture 5a.jpg"
/6 = "Picture 6a.jpg"
/7 = "Picture 7a.jpg"
/8 = "Picture 8a.jpg"
/9 = "Picture 9a.jpg"
/10 = "Picture 10a.jpg"

And the stimuli:
From:
<text category>
/ items = category
/ fontstyle = ("Arial", parameters.stimSize, false, false, false, false, 5, 0)
</text>

To:
<picture category>
/ items = target1
/select = values.stimulusselect
/position = (50%, 50%)
/ size = (40%, 40%)
</picture>

But, there is no folder to store my pictures, and I get a lot of errors, some of which are:
'text.nonword' Expression contains an invalid identifier.
'text.nonword.currentitem' Expression contains an invalid identifier.
Unable to load the picture '/Users/hannahgutmann/Downloads/Picture 4a.jpg'. Network Error: Error opening /Users/hannahgutmann/Downloads/Picture 4a.jpg: No such file or directory

This is the code the error is related to:

<trial ldtnonword>
/ ontrialbegin = [
    values.condition = "Non Word";
    trial.ldtnonword.insertstimulustime(text.nonword, parameters.fixationDuration);
    trial.ldtnonword.insertstimulustime(shape.blank, (parameters.fixationDuration + parameters.stimDuration));    
]
/ stimulustimes = [0=ready]
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/beginresponsetime = parameters.fixationDuration
/ ontrialend = [
    trial.ldtnonword.resetstimulusframes();
    
    list.nonwords.appenditem(trial.ldtnonword.correct);
    list.overallaccuracy.appenditem(trial.ldtnonword.correct);    
    if (trial.ldtnonword.correct) {
        list.nonwords_correctRT.appenditem(trial.ldtnonword.latency);
        list.overallRT.appenditem(trial.ldtnonword.latency);        
    };    
    
    values.presentedStim = text.nonword.currentitem;
]
</trial>

trial ldtneutralPractice>
/ ontrialbegin = [
    values.condition = "Neutral Word";
    trial.ldtneutralPractice.insertstimulustime(text.neutralPractice, parameters.fixationDuration);
    trial.ldtneutralPractice.insertstimulustime(shape.blank, (parameters.fixationDuration + parameters.stimDuration));    
]
/ stimulustimes = [0=ready]
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/beginresponsetime = parameters.fixationDuration
/ ontrialend = [
    trial.ldtneutralPractice.resetstimulusframes();
    values.presentedStim = text.neutralPractice.currentitem;
]
</trial>

<trial ldtnonwordPractice>
/ ontrialbegin = [
    values.Condition = "Non Word";
    trial.ldtnonwordPractice.insertstimulustime(text.nonwordPractice, parameters.fixationDuration);
    trial.ldtnonwordPractice.insertstimulustime(shape.blank, (parameters.fixationDuration + parameters.stimDuration));    
]
/ stimulustimes = [0=ready]
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/beginresponsetime = parameters.fixationDuration
/ ontrialend = [
    trial.ldtnonwordPractice.resetstimulusframes();
    values.presentedStim = text.nonwordPractice.currentitem;
]
</trial>

<trial instructions>
/ stimulustimes = [0=instructions]
/ validresponse = (" ")
/ recorddata = false
</trial>

(1) Image files ought to reside in the same folder where the script resides. Your system's "Downloads" folder is not a suitable place for this. Create a folder on your Desktop or in your personal files directory, and move the script and image files there.

(2) There is no text.nonword anymore.

<trial ldtnonword>
/ ontrialbegin = [
values.condition = "Non Word";
trial.ldtnonword.insertstimulustime(text.nonword, parameters.fixationDuration);
trial.ldtnonword.insertstimulustime(shape.blank, (parameters.fixationDuration + parameters.stimDuration));
]
/ stimulustimes = [0=ready]
...
</trial>

If you make changes, you need to adjust the rest of the code accordingly.

Thanks for all your help Dave.

In reference to the first part of my study,
1.    What does this error mean?  'values.stimulusselect' The expression contains an unknown property. (in ref to below code).

<picture neutralPractice>
/ items = neutralPractice
/select = values.stimulusselect
/position = (50%, 50%)
/ size = (40%, 40%)
</picture>



In reference to the second part of my study:
2.    How can I connect the two parts of this study into one piece of code? I want to bring the code for the recognition part of this study (from this test https://www.millisecond.com/download/library/bpso/), but I’m not sure what sections are relevant.

- Do I bring the editable parametres section over?
“EDITABLE PARAMETERS: change editable parameters here”

<parameters>
/showresponsekeyreminder = false
/nr_subsetImages = "64"
/selfpaced = false
/stimulusduration = 2000
/ISI = 500
</parameters>

- I have added the recognition stimuli (new and similar items) to the stimuli section. *I have no lure bins.
“EDITABLE STIMULI: originals from Stark et al (2013)”

- I will change the instructions as needed
“EDITABLE INSTRUCTIONS: change instructions here”

-    I’m not sure what to take from the remaining code.
!!!REMAINING CODE: Customize after careful consideration only!!!
**************************************************************************************************************

*******************************************************************************************************************
*******************************************************************************************************************
    DEFAULTS:
*******************************************************************************************************************
*******************************************************************************************************************
requires Inquisit 6.1.0.0

<defaults>
/minimumversion = "6.1.0.0"
/canvasaspectratio = (4,3)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txbgcolor = white
/ txcolor = black
</defaults>

*******************************************************************************************************************
*******************************************************************************************************************
    DATA: this section contains data file information
*******************************************************************************************************************
*******************************************************************************************************************

********************
raw data
********************
<data>
/ columns = (build, computer.platform, date, time, subject, group, script.sessionid,
values.set, values.setsize, parameters.nr_subsetImages,
blockcode, blocknum, trialcode, trialnum,
values.stimulus, values.stimulusselect, values.trialtype, values.lurebin,
response, values.responseCategory, correct, latency)
</data>

********************
summary data
********************

<summarydata>
/ columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid,
script.elapsedtime, script.completed,
parameters.showresponsekeyreminder,values.set, values.setsize, parameters.nr_subsetImages, parameters.selfpaced, parameters.stimulusduration, parameters.ISI,

values.countl1, values.countl2, values.countl3, values.countl4, values.countl5, expressions.minlurefreq,

values.count_oldtargets, values.count_simtargets, values.count_newtargets, values.count_targets, values.count_targets_corr,
values.count_oldlures, values.count_simlures, values.count_newlures, values.count_lures, values.count_lures_corr,
values.count_oldfoils, values.count_simfoils, values.count_newfoils, values.count_foils, values.count_foils_corr,

expressions.rawrate_oldtargets, expressions.rawrate_simtargets, expressions.rawrate_newtargets,
expressions.rawrate_oldlures, expressions.rawrate_simlures, expressions.rawrate_newlures,
expressions.rawrate_oldfoils, expressions.rawrate_simfoils, expressions.rawrate_newfoils,

expressions.corrrate_oldtargets, expressions.corrrate_simtargets, expressions.corrrate_newtargets,
expressions.corrrate_oldlures, expressions.corrrate_simlures, expressions.corrrate_newlures,
expressions.corrrate_oldfoils, expressions.corrrate_simfoils, expressions.corrrate_newfoils,

values.L1, values.L2, values.L3, values.L4, values.L5,
values.L1_NR, values.L2_NR, values.L3_NR, values.L4_NR, values.L5_NR,
values.L1O, values.L1S, values.L1N,
values.L2O, values.L2S, values.L2N,
values.L3O, values.L3S, values.L3N,
values.L4O, values.L4S, values.L4N,
values.L5O, values.L5S, values.L5N,

expressions.rawpercentcorrect, expressions.corrpercentcorrect,

expressions.BPS, expressions.TRS)
</summarydata>



*******************************************************************************************************************
*******************************************************************************************************************
    VALUES: automatically updated
*******************************************************************************************************************
*******************************************************************************************************************
/setsize:                                the number of items per condition in part 2 (default is 64 but can be automatically updated)
/nextitem:                                helper variable to fill target/lure/foil lists
/nextlurebin:                            helper variable to fill lure list (stores the lure bin of the next item that could be added to list.lures)
/countL1-
/countL5:                                helper variables that keep track of how many lures of each of the 5 categories have been sorted into list.lures
/countlureselections:                    helper variables to keep track of how many successful lures have been selected for list.lures
/count_trials:                            helper variable to keep track of trialnumbers
/stimulusselect:                        determines the currently presented picture
/stimulus:                                stores the currently presented picture
/trialtype:                                the current trial type
                                            1 = target
                                            2 = foil
                                            3 = lure
/response:                                part1; "indoor" vs. "outdoor"; part2: "old", "new", "similar"
/lurebin:                                the lure bin of current lure (1-5)

<values>
/set = "C"
/setsize = 64
/nextitem = 0
/nextlurebin = 0
/countL1 = 0
/countL2 = 0
/countL3 = 0
/countL4 = 0
/countL5 = 0
/countlureselections = 0
/count_trials = 0
/stimulusselect = 1
/stimulus = 0
/trialtype = 0
/responseCategory = ""
/lurebin = 0

/responsekey_indoor = "I"
/responsekey_outdoor = "O"
/responsekey_old = "V"
/responsekey_new = "N"
/responsekey_similar = "B"
</values>


Summary Variables
/count_noresponses:                counts all no responses
/count_targets:                    counts all target trials (same for foils, lures)
/count_targets_corr:            counts all target trials that were responded to (same for foils, lures)
/count_oldtargets:                counts all "old" responses to targets
/count_simtargets-
/count_newlures:                counts all responses for targets, lures, foils (depending on response)
                                e.g. count_simtargets: counts all targets classified as "similar"

<values>
/count_noresponses = 0
/count_targets = 0
/count_targets_corr = 0
/count_oldtargets = 0
/count_simtargets = 0
/count_newtargets = 0

/count_foils = 0
/count_foils_corr = 0
/count_newfoils = 0
/count_simfoils = 0
/count_oldfoils = 0

/count_lures = 0
/count_lures_corr = 0
/count_simlures = 0
/count_oldlures = 0
/count_newlures = 0
</values>


Lure Bins Summary Statistics:
/L1-L5:                    counts how often lures of category 1-5 were run

/L1_NR-
/L5_NR:                    counts no reponses (NR) to all 5 bin lure categories

/L1O - L5O:                counts how often lures of category 1-5 were categorized as "old"
/L1S - L5S:     counts how often lures of category 1-5 were categorized as "similar"
/L1N - L5N:                counts how often lures of category 1-5 were categorized as "new"

<values>
/L1 = 0
/L2 = 0
/L3 = 0
/L4 = 0
/L5 = 0

/L1_NR = 0
/L2_NR = 0
/L3_NR = 0
/L4_NR = 0
/L5_NR = 0

/L1O = 0
/L1S = 0
/L1N = 0
/L2O = 0
/L2S = 0
/L2N = 0
/L3O = 0
/L3S = 0
/L3N = 0
/L4O = 0
/L4S = 0
/L4N = 0
/L5O = 0
/L5S = 0
/L5N = 0
</values>

*******************************************************************************************************************
*******************************************************************************************************************
    EXPRESSIONS
*******************************************************************************************************************
*******************************************************************************************************************
/minlurefreq:                        the minimum number of lures of each lure bin
/part2TrialNumber:                    calculates the number of trials needed for part 3 based on values.setsize

/rawpercentcorrect:                    uncorrected overall percent correct rate (takes all trials into account)
/corrpercentcorrect:                corrected overall percent correct rate (takes only those trials with a response into account)

/rawrate_oldtargets:                uncorrected rate of "old" responses to all target trial
/rawrate_simtargets:                uncorrected rate of "similar" responses to all target trials
/rawrate_newtargets:                uncorrected rate of "new" responses to all target trials
/corrrate_oldtargets:                corrected rate of "old" responses to target trials that were responded to (no responses excluded)
/corrrate_simtargets:                corrected rate of "similar" responses to target trials that were responded to (no responses excluded)
/corrrate_newtargets:                corrected rate of "new" responses to target trials that were responded to (no responses excluded)

/rawrate_oldlures-
/corrrate_newfoils:                    same for lures and foils

/BPS:                                Behavioral Pattern Separation Score (BPS): rates corrected for no responses
                                        => "hit" rate for lures (=proportion of similar responses to lure objects) - "false alarm" rate for foils (=proportion of similar responses to foil objects)

/TRS:                                Traditional Recognition Score (TRS): rates corrected for no responses
                                        => hit rate for targets (=proportion of old responses to old objects) - false alarm rate for foils (=proportion of old responses to foil objects)

<expressions>
/minlurefreq = ipart(values.setsize/5)
/part2TrialNumber = 3 * values.setsize

/rawpercentcorrect = ((values.count_oldtargets + values.count_simlures + values.count_newfoils)/(values.count_targets + values.count_lures + values.count_foils)) * 100
/corrpercentcorrect = ((values.count_oldtargets + values.count_simlures + values.count_newfoils)/(values.count_targets_corr + values.count_lures_corr + values.count_foils_corr)) * 100

/rawrate_oldtargets = values.count_oldtargets/values.count_targets
/rawrate_simtargets = values.count_simtargets/values.count_targets
/rawrate_newtargets = values.count_newtargets/values.count_targets
/corrrate_oldtargets = values.count_oldtargets/values.count_targets_corr
/corrrate_simtargets = values.count_simtargets/values.count_targets_corr
/corrrate_newtargets = values.count_newtargets/values.count_targets_corr

/rawrate_oldlures = values.count_oldlures/values.count_lures
/rawrate_simlures = values.count_simlures/values.count_lures
/rawrate_newlures = values.count_newlures/values.count_lures
/corrrate_oldlures = values.count_oldlures/values.count_lures_corr
/corrrate_simlures = values.count_simlures/values.count_lures_corr
/corrrate_newlures = values.count_newlures/values.count_lures_corr

/rawrate_oldfoils = values.count_oldfoils/values.count_foils
/rawrate_simfoils = values.count_simfoils/values.count_foils
/rawrate_newfoils = values.count_newfoils/values.count_foils
/corrrate_oldfoils = values.count_oldfoils/values.count_foils_corr
/corrrate_simfoils = values.count_simfoils/values.count_foils_corr
/corrrate_newfoils = values.count_newfoils/values.count_foils_corr

/TRS = expressions.corrrate_oldtargets - expressions.corrrate_oldfoils
/BPS = expressions.corrrate_simlures - expressions.corrrate_simfoils
</expressions>

*******************************************************************************************************************
*******************************************************************************************************************
    INSTRUCTIONS
*******************************************************************************************************************
*******************************************************************************************************************

<video instructionvideo>
/ items = instructionvideo
/ size = (60%, 60%)
/ playthrough = true
</video>

<trial instructions_part2>
/ stimulusframes = [1 = instructionvideo]
/ trialduration = 106000
/ branch = [trial.spacebar]
</trial>

<trial spacebar>
/ stimulusframes = [1 = spacebar]
/ validresponse = (" ")
</trial>

<text Spacebar>
/ items = ("Press <SPACEBAR> to start")
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ position = (50%, 85%)
</text>

*******************************************************************************************************************
*******************************************************************************************************************
    STIMULI
*******************************************************************************************************************
*******************************************************************************************************************

<picture target>
/items = Stimuli
/select = values.stimulusselect
/position = (50%, 50%)
/ size = (40%, 40%)
</picture>

<picture foil>
/items = Stimuli
/select = values.stimulusselect
/position = (50%, 50%)
/ size = (40%, 40%)
</picture>

<picture lure>
/items = Stimuli_lures
/select = values.stimulusselect
/position = (50%, 50%)
/ size = (40%, 40%)
</picture>


*************************
optional -> parameters.showresponsekeyreminder
*************************

<text responsekeys_part1>
/items = ("INDOOR: <%values.responsekey_indoor%>                    OUTDOOR: <%values.responsekey_outdoor%>")
/position = (50%, 95%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = black
/erase = false
</text>

<text responsekeys_part2>
/items = ("OLD: <%values.responsekey_old%>        SIMILAR: <%values.responsekey_similar%>        NEW: <%values.responsekey_new%>")
/position = (50%, 95%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = black
/erase = false
</text>

*******************************************************************************************************************
*******************************************************************************************************************
    LISTS: Item lists used depending on parameters.nr_subsetImages
*******************************************************************************************************************
*******************************************************************************************************************

****************************************************************************
Itemnumber list for sets of 64 items (either set C or set D)
****************************************************************************

Note: list contains all the possible itemnumbers (1-192)
<list itemnumbers>
/items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
191, 192)
/replace = false
/selectionrate = always
</list>


****************************************************************************
Itemnumber lists for sets of 32 items from Set C
(the original list of 192 items was divided into two sets of 32)

-> lists were randomly assembled
(constraints: a minimum number of 13 lures had to be present for each
lure bin in each item list)
****************************************************************************

<list C32_1>
/items = (
3, 7, 8, 10, 11, 13, 14, 15, 17, 20, 24, 26, 28, 29, 31, 35, 39, 41, 42, 43,
46, 47, 52, 53, 54, 59, 60, 63, 66, 68, 70, 71, 72, 74, 77, 79, 81, 83, 84,
87, 88, 90, 91, 96, 97, 103, 106, 110, 111, 114, 115, 117, 119, 120, 121, 122,
123, 124, 125, 126, 128, 131, 132, 134, 136, 138, 141, 144, 145, 146, 148, 149,
150, 151, 153, 154, 155, 157, 158, 159, 160, 163, 164, 167, 168, 171, 173, 177,
178, 179, 180, 182, 184, 190, 191, 192)
/replace = false
/selectionrate = always
</list>

<list C32_2>
/items = (
1, 2, 4, 5, 6, 9, 12, 16, 18, 19, 21, 22, 23, 25, 27, 30, 32, 33, 34, 36, 37, 38, 40,
44, 45, 48, 49, 50, 51, 55, 56, 57, 58, 61, 62, 64, 65, 67, 69, 73, 75, 76, 78, 80, 82,
85, 86, 89, 92, 93, 94, 95, 98, 99, 100, 101, 102, 104, 105, 107, 108, 109, 112, 113, 116,
118, 127, 129, 130, 133, 135, 137, 139, 140, 142, 143, 147, 152, 156, 161, 162, 165, 166,
169, 170, 172, 174, 175, 176, 181, 183, 185, 186, 187, 188, 189)
/replace = false
/selectionrate = always
</list>

****************************************************************************
Itemnumber lists for sets of 20 items from Set C
(the original list of 192 items was divided into three sets of 20)

-> lists were randomly assembled
(constraints: a minimum number of 9 lures had to be present for each
lure bin in each item list)
****************************************************************************

<list C20_1>
/items = (
1, 3, 6, 10, 12, 16, 22, 27, 28, 29, 30, 32, 33, 42, 45, 48, 51, 52, 54, 55,
56, 57, 58, 59, 61, 66, 67, 68, 69, 70, 74, 79, 87, 94, 97, 101, 105, 114, 120, 122,
124, 125, 126, 127, 129, 130, 136, 137, 139, 143, 154, 155, 158, 160, 163, 164, 168, 174, 181, 187)
/replace = false
/selectionrate = always
</list>

<list C20_2>
/items = (
2, 4, 5, 7, 8, 9, 17, 18, 19, 24, 26, 34, 35, 36, 38, 40, 41, 43, 44, 46,
49, 50, 62, 63, 71, 77, 80, 85, 88, 90, 93, 100, 104, 106, 107, 108, 109, 112, 115, 116,
123, 131, 132, 138, 141, 144, 146, 149, 152, 156, 157, 165, 167, 169, 171, 173, 176, 178, 180, 188)
/replace = false
/selectionrate = always
</list>

<list C20_3>
/items = (
11, 13, 14, 15, 20, 21, 25, 31, 37, 39, 47, 53, 60, 65, 72, 73, 75, 76, 81, 82,
84, 86, 89, 91, 92, 95, 96, 99, 102, 103, 111, 113, 117, 118, 128, 133, 134, 140, 142, 145,
147, 148, 150, 153, 159, 161, 162, 166, 170, 172, 175, 177, 179, 183, 184, 186, 189, 190, 191, 192)
/replace = false
/selectionrate = always
</list>

*******************************************************************************************************************
*******************************************************************************************************************
    LISTS: targets/lures/foil lists that are filled during runtime
*******************************************************************************************************************
*******************************************************************************************************************

Note: the following lists are filled during runtime.

-> will contain all the stimulusitemnumbers that are presented during Part1
<list stimuluspresentation>
/replace = false
/resetinterval = 1
</list>

-> will contain all the stimulusitemnumbers of targets (presented during Part 1 and Part 2)
<list targets>
/replace = false
/resetinterval = 1
</list>

-> will contain all the stimulusitemnumbers of foils (only presented during Part 2)
<list foils>
/replace = false
/resetinterval = 1
</list>

-> will contain all the stimulusitemnumbers of lures (only presented Part 2 but very similar to items from Part 1)
<list lures>
/replace = false
/resetinterval = 1
</list>

Note: list.part2 specifies how many trials are run in part2 (based on values.setsize,
same frequency of target trials (1), foil trials (2), lure trials (3)
<list part2>
/items = (1, 2, 3)
/ poolsize = expressions.part2trialnumber
/replace = false
/resetinterval = 1
</list>

*******************************************************************************************************************
*******************************************************************************************************************
    TRIALS: Lure, Targets, Foil List Generation
*******************************************************************************************************************
*******************************************************************************************************************

**********************************
Set size = 64
**********************************

NOTES: trial.selectlures64
* randomly assembles list.lures with the constraint that each of the 5 lure types have at least values.setsize/5 lures
in the list
<trial selectlures64>
/ontrialbegin = [
    values.countlureselections += 1;
    values.nextitem = list.itemnumbers.nextvalue;
    values.nextlurebin = item.lurebins.item(values.nextitem);    

    if (values.nextlurebin == "1") {
        values.countL1 += 1;
    } else if (values.nextlurebin == "2") {
        values.countL2 += 1;
    } else if (values.nextlurebin == "3") {
        values.countL3 += 1;
    } else if (values.nextlurebin == "4") {
        values.countL4 += 1;
    } else if (values.nextlurebin == "5") {
        values.countL5 += 1;
    };
]
/branch = [
    if (values.nextlurebin == "1" && values.countL1 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
            values.countL1 -= 1;
            values.countlureselections -=1;
            list.itemnumbers.appenditem(values.nextitem);
            return trial.selectlures64;
    } else if (values.nextlurebin == "2" && values.countL2 > expressions.minlurefreq && (values.countL1 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
            values.countL2 -= 1;
            values.countlureselections -=1;
            list.itemnumbers.appenditem(values.nextitem);
            return trial.selectlures64;
    } else if (values.nextlurebin == "3" && values.countL3 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
            values.countL3 -= 1;
            values.countlureselections -=1;
            list.itemnumbers.appenditem(values.nextitem);
            return trial.selectlures64;            
    } else if (values.nextlurebin == "4" && values.countL4 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
            values.countL4 -= 1;
            values.countlureselections -=1;
            list.itemnumbers.appenditem(values.nextitem);
            return trial.selectlures64;        
    } else if (values.nextlurebin == "5" && values.countL5 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq)){
            values.countL5 -= 1;
            values.countlureselections -=1;
            list.itemnumbers.appenditem(values.nextitem);
            return trial.selectlures64;        
    } else if (values.countlureselections < values.setsize) {
        list.lures.appenditem(values.nextitem);
        list.stimuluspresentation.appenditem(values.nextitem);
        return trial.selectlures64;
    } else if (values.countlureselections >= values.setsize) {
        list.lures.appenditem(values.nextitem);
        list.stimuluspresentation.appenditem(values.nextitem);
        return trial.selecttargetsandfoils64;
    };
]
/recorddata = false
/trialduration = 0
</trial>

NOTES: trial.selecttargetsandfoils64
* assembles the target and foils list with the itemnumbers that have not been selected as lures yet.
* completes list.stimuluspresentation
<trial selecttargetsandfoils64>
/ontrialbegin = [
    values.nextitem = list.itemnumbers.nextvalue;
    list.targets.appenditem(values.nextitem);
    list.stimuluspresentation.appenditem(values.nextitem);
    values.nextitem = list.itemnumbers.nextvalue;
    list.foils.appenditem(values.nextitem);
]
/trialduration = 0
/branch = [
    if (list.stimuluspresentation.itemcount < (2 * values.setsize)) {
        return trial.selecttargetsandfoils64;
    };
]
/recorddata = false
</trial>

**********************************
Set size = 32
**********************************

NOTES: trial.selectlures32
* randomly assembles list.lures with the constraint that each of the 5 lure types have at least values.setsize/5 lures
in the list
<trial selectlures32>
/ontrialbegin = [
    values.countlureselections += 1;

    if (values.set == "C" && parameters.nr_subsetImages == "32-1") {
        values.nextitem = list.c32_1.nextvalue;        
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-2") {
        values.nextitem = list.c32_2.nextvalue;    
    };
    
    values.nextlurebin = item.lurebins.item(values.nextitem);        

    if (values.nextlurebin == "1") {
        values.countL1 += 1;
    } else if (values.nextlurebin == "2") {
        values.countL2 += 1;
    } else if (values.nextlurebin == "3") {
        values.countL3 += 1;
    } else if (values.nextlurebin == "4") {
        values.countL4 += 1;
    } else if (values.nextlurebin == "5") {
        values.countL5 += 1;
    };
]

/branch = [
    if (values.set == "C" && parameters.nr_subsetImages == "32-1" && values.nextlurebin == "1" && values.countL1 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL1 -= 1;
        values.countlureselections -=1;
        list.c32_1.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-2" && values.nextlurebin == "1" && values.countL1 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL1 -= 1;
        values.countlureselections -=1;
        list.c32_2.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-1" && values.nextlurebin == "2" && values.countL2 > expressions.minlurefreq && (values.countL1 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL2 -= 1;
        values.countlureselections -=1;
        list.c32_1.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-2" && values.nextlurebin == "2" && values.countL2 > expressions.minlurefreq && (values.countL1 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL2 -= 1;
        values.countlureselections -=1;
        list.c32_2.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-1" && values.nextlurebin == "3" && values.countL3 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL3 -= 1;
        values.countlureselections -=1;
        list.c32_1.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-2" && values.nextlurebin == "3" && values.countL3 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL3 -= 1;
        values.countlureselections -=1;
        list.c32_2.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-1" && values.nextlurebin == "4" && values.countL4 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL4 -= 1;
        values.countlureselections -=1;
        list.c32_1.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-2" && values.nextlurebin == "4" && values.countL4 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL4 -= 1;
        values.countlureselections -=1;
        list.c32_2.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-1" && values.nextlurebin == "5" && values.countL5 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq)){
        values.countL5 -= 1;
        values.countlureselections -=1;
        list.c32_1.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-2" && values.nextlurebin == "5" && values.countL5 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq)){
        values.countL5 -= 1;
        values.countlureselections -=1;
        list.c32_2.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.countlureselections < values.setsize) {
        list.lures.appenditem(values.nextitem);
        list.stimuluspresentation.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.countlureselections >= values.setsize) {
        list.lures.appenditem(values.nextitem);
        list.stimuluspresentation.appenditem(values.nextitem);
        return trial.selecttargetsandfoils32;
    };
]
/recorddata = false
/trialduration = 0
</trial>


NOTES: trial.selecttargetsandfoils32
* assembles the target and foils list with the itemnumbers that have not been selected as lures yet.
* completes list.stimuluspresentation
<trial selecttargetsandfoils32>
/ontrialbegin = [
    if (values.set == "C" && parameters.nr_subsetImages == "32-1") {
        values.nextitem = list.c32_1.nextvalue;        
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-2") {
        values.nextitem = list.c32_2.nextvalue;        
    };    
    list.targets.appenditem(values.nextitem);
    list.stimuluspresentation.appenditem(values.nextitem);

    if (values.set == "C" && parameters.nr_subsetImages == "32-1") {
        values.nextitem = list.c32_1.nextvalue;        
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-2") {
        values.nextitem = list.c32_2.nextvalue;        
    };
    list.foils.appenditem(values.nextitem, 1);
]

/trialduration = 0
/branch = [
    if (list.stimuluspresentation.itemcount < (2 * values.setsize)) {
        return trial.selecttargetsandfoils32;        
    };
]
/recorddata = false
</trial>


**********************************
Set size = 20
**********************************

NOTES: trial.selectlures20
* randomly assembles list.lures with the constraint that each of the 5 lure types have at least values.setsize/5 lures
in the list
<trial selectlures20>
/ontrialbegin = [
    values.countlureselections += 1;

    if (values.set == "C" && parameters.nr_subsetImages == "20-1"){
        values.nextitem = list.c20_1.nextvalue;        
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-2") {
        values.nextitem = list.c20_2.nextvalue;        
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-3") {
        values.nextitem = list.c20_3.nextvalue;        
    };

    values.nextlurebin = item.lurebins.item(values.nextitem)        

    if (values.nextlurebin == "1") {
        values.countL1 += 1;
    } else if (values.nextlurebin == "2") {
        values.countL2 += 1;
    } else if (values.nextlurebin == "3") {
        values.countL3 += 1;
    } else if (values.nextlurebin == "4") {
        values.countL4 += 1;
    } else if (values.nextlurebin == "5") {
        values.countL5 += 1;
    };
]
/branch = [
    if (values.set == "C" && parameters.nr_subsetImages == "20-1" && values.nextlurebin == "1" && values.countL1 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL1 -= 1;
        values.countlureselections -=1;
        list.c20_1.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-2" && values.nextlurebin == "1" && values.countL1 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL1 -= 1;
        values.countlureselections -=1;
        list.c20_2.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-3" && values.nextlurebin == "1" && values.countL1 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL1 -= 1;
        values.countlureselections -=1;
        list.c20_3.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-1" && values.nextlurebin == "2" && values.countL2 > expressions.minlurefreq && (values.countL1 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL2 -= 1;
        values.countlureselections -=1;
        list.c20_1.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-2" && values.nextlurebin == "2" && values.countL2 > expressions.minlurefreq && (values.countL1 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL2 -= 1;
        values.countlureselections -=1;
        list.c20_2.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-3" && values.nextlurebin == "2" && values.countL2 > expressions.minlurefreq && (values.countL1 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL2 -= 1;
        values.countlureselections -=1;
        list.c20_3.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-1" && values.nextlurebin == "3" && values.countL3 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL3 -= 1;
        values.countlureselections -=1;
        list.c20_1.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-2" && values.nextlurebin == "3" && values.countL3 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL3 -= 1;
        values.countlureselections -=1;
        list.c20_2.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-3" && values.nextlurebin == "3" && values.countL3 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL3 -= 1;
        values.countlureselections -=1;
        list.c20_3.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-1" && values.nextlurebin == "4" && values.countL4 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL4 -= 1;
        values.countlureselections -=1;
        list.c20_1.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-2" && values.nextlurebin == "4" && values.countL4 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL4 -= 1;
        values.countlureselections -=1;
        list.c20_2.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-3" && values.nextlurebin == "4" && values.countL4 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL4 -= 1;
        values.countlureselections -=1;
        list.c20_3.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-1" && values.nextlurebin == "5" && values.countL5 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq)){
        values.countL5 -= 1;
        values.countlureselections -=1;
        list.c20_1.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-2" && values.nextlurebin == "5" && values.countL5 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq)){
        values.countL5 -= 1;
        values.countlureselections -=1;
        list.c20_2.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-3" && values.nextlurebin == "5" && values.countL5 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq)){
        values.countL5 -= 1;
        values.countlureselections -=1;
        list.c20_3.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.countlureselections < values.setsize) {
        list.lures.appenditem(values.nextitem);
        list.stimuluspresentation.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.countlureselections >= values.setsize) {
        list.lures.appenditem(values.nextitem);
        list.stimuluspresentation.appenditem(values.nextitem);
        return trial.selecttargetsandfoils20;
    };
]


        
/recorddata = false
/ trialduration = 0
</trial>

NOTES: trial.selecttargetsandfoils20
* assembles the target and foils list with the itemnumbers that have not been selected as lures yet.
* completes list.stimuluspresentation
<trial selecttargetsandfoils20>
/ontrialbegin = [
    if (values.set == "C" && parameters.nr_subsetImages == "20-1"){
        values.nextitem = list.c20_1.nextvalue;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-2"){
        values.nextitem = list.c20_2.nextvalue;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-3"){
        values.nextitem = list.c20_3.nextvalue;
    };
    list.targets.appenditem(values.nextitem);
    list.stimuluspresentation.appenditem(values.nextitem);


    if (values.set == "C" && parameters.nr_subsetImages == "20-1"){
        values.nextitem = list.c20_1.nextvalue;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-2"){
        values.nextitem = list.c20_2.nextvalue;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-3"){
        values.nextitem = list.c20_3.nextvalue;
    };
    list.foils.appenditem(values.nextitem);
]

/trialduration = 0
/branch = [
    if (list.stimuluspresentation.itemcount < (2 * values.setsize)){
        trial.selecttargetsandfoils20;        
    };
]
/recorddata = false
</trial>


*******************************************************************************************************************
*******************************************************************************************************************
    TRIALS: PART1
*******************************************************************************************************************
*******************************************************************************************************************

Notes:
* randomly selects a stimulusitemnumber from list.stimuluspresentation
* depending on chosen picture set (C or D, values.set) => selects the appropriate picture
* presents the picture for parameters.stimulusduration
* collects response during that time (as well as isi)
<trial stimuluspresentation>
/ontrialbegin = [
    values.count_trials += 1;
    values.stimulusselect = list.stimuluspresentation.nextvalue;
        
    trial.stimuluspresentation.insertstimulusframe(picture.target, 1);    
    trial.stimuluspresentation.insertstimulustime(clearscreen, parameters.stimulusduration);
]

/stimulusframes = [1 = responsekeys_part1]
/validresponse = (values.responsekey_indoor, values.responsekey_outdoor)
/beginresponseframe = 1
/responseinterrupt = frames

/ontrialend = [
    trial.stimuluspresentation.resetstimulusframes();
    if (trial.stimuluspresentation.responsetext == values.responsekey_outdoor) {
        values.responseCategory = "outdoor";
    } else if (trial.stimuluspresentation.responsetext == values.responsekey_indoor) {
        values.responseCategory = "indoor";        
    } else {
        values.responseCategory ="no response";        
    };

    values.stimulus = picture.target.currentitem;

]
/branch = [
    if (values.count_trials < (2* values.setsize)) {
        return trial.stimuluspresentation;        
    };
]
/trialduration = (parameters.stimulusduration + parameters.ISI)
/recorddata = true
</trial>


Notes:
* randomly selects a stimulusitemnumber from list.stimuluspresentation
* depending on chosen picture set (C or D, values.set) => selects the appropriate picture
* presents the picture for parameters.stimulusduration
* allows infinite time for response
<trial stimuluspresentation_selfpaced>
/ontrialbegin = [
    values.count_trials += 1;
    values.stimulusselect = list.stimuluspresentation.nextvalue;
    trial.stimuluspresentation_selfpaced.insertstimulusframe(picture.target, 1);        
    trial.stimuluspresentation_selfpaced.insertstimulustime(clearscreen, parameters.stimulusduration);
]

/stimulusframes = [1 = responsekeys_part1]
/validresponse = (values.responsekey_indoor, values.responsekey_outdoor)
/beginresponseframe = 1
/responseinterrupt = frames
/ontrialend = [
    trial.stimuluspresentation_selfpaced.resetstimulusframes();
    if (trial.stimuluspresentation_selfpaced.responsetext == values.responsekey_outdoor) {
        values.responseCategory = "outdoor";        
    } else if (trial.stimuluspresentation_selfpaced.responsetext == values.responsekey_indoor) {
        values.responseCategory = "indoor";        
    } else {
        values.responseCategory="no response";        
    };
        
    values.stimulus = picture.target.currentitem;

]
/branch = [
    if (values.count_trials < (2* values.setsize)) {
        trial.stimuluspresentation_selfpaced;        
    };
]
/recorddata = true
</trial>

*******************************************************************************************************************
*******************************************************************************************************************
    TRIALS: PART2
*******************************************************************************************************************
*******************************************************************************************************************

Notes:
* purpose of trial.part2 is to randomly select the next trial type (target, lure, or foil)
and to keep track of how many trials total have been run during part 2
<trial Part2>
/ontrialbegin = [
    values.count_trials += 1;
    values.trialtype = list.part2.nextvalue;
    values.lurebin = 0;
]
/branch = [
    if (values.trialtype == 1 && parameters.selfpaced == false){
        return trial.target;
    } else if (values.trialtype == 2 && parameters.selfpaced == false){
        return trial.foil;
    } else if (values.trialtype == 3 && parameters.selfpaced == false){
        return trial.lure;
    } else if (values.trialtype == 1 && parameters.selfpaced == true){
        return trial.target_selfpaced;
    } else if (values.trialtype == 2 && parameters.selfpaced == true){
        return trial.foil_selfpaced;
    } else if (values.trialtype == 3 && parameters.selfpaced == true){
        return trial.lure_selfpaced;
    };
]
/trialduration = 0
/recorddata = false
</trial>


Note:
* presents a target for parameters.stimulusduration
* collects response during that time
* updates summary variables
* calls trial.part2
<trial target>
/ontrialbegin = [
    values.stimulusselect = list.targets.nextvalue;
    trial.target.insertstimulusframe(picture.target, 1);
    trial.target.insertstimulustime(clearscreen, parameters.stimulusduration);
]

/stimulusframes = [1 = responsekeys_part2]
/validresponse = (values.responsekey_old, values.responsekey_similar, values.responsekey_new)
/ correctresponse = (values.responsekey_old)

/beginresponseframe = 1
/responseinterrupt = frames

/ontrialend = [
    trial.target.resetstimulusframes();
    if (trial.target.responsetext == values.responsekey_old) {
        values.responseCategory = "old";    
    } else if (trial.target.responsetext == values.responsekey_new) {
        values.responseCategory = "new";    
    } else if (trial.target.responsetext == values.responsekey_similar) {
        values.responseCategory = "similar";    
    } else if (trial.target.response == 0) {
        values.responseCategory = "";
        values.count_noresponses += 1;
    };

    values.stimulus = picture.target.currentitem;
    
    values.count_targets += 1;
    if (trial.target.response != 0) {
        values.count_targets_corr += 1;
        if (trial.target.correct) {
            values.count_oldtargets += 1;
        } else if (trial.target.responsetext == values.responsekey_similar) {
            values.count_simtargets += 1;    
        } else if (trial.target.responsetext == values.responsekey_new) {
            values.count_newtargets += 1        
        };    
    };

]
/trialduration = (parameters.stimulusduration + parameters.ISI)
/recorddata = true
/branch = [return trial.part2;]
</trial>

Note:
* presents a foil for parameters.stimulusduration
* collects response during that time
* updates summary variables
* calls trial.part2
<trial foil>
/ontrialbegin = [
    values.stimulusselect = list.foils.nextvalue;
    trial.foil.insertstimulusframe(picture.foil, 1);             
    trial.foil.insertstimulustime(clearscreen, parameters.stimulusduration);
]

/stimulusframes = [1 = responsekeys_part2]
/validresponse = (values.responsekey_old, values.responsekey_similar, values.responsekey_new)
/ correctresponse = (values.responsekey_new)
/beginresponseframe = 1
/responseinterrupt = frames
/ontrialend = [
    trial.foil.resetstimulusframes();
    
    if (trial.foil.responsetext == values.responsekey_old) {
        values.responseCategory = "old";        
    } else if (trial.foil.responsetext == values.responsekey_new) {
        values.responseCategory = "new";    
    } else if (trial.foil.responsetext == values.responsekey_similar) {
        values.responseCategory = "similar";    
    } else if (trial.foil.response == 0) {
        values.responseCategory = "";
        values.count_noresponses += 1;
    };
    
    values.stimulus = picture.foil.currentitem;
    
    values.count_foils += 1;
    if (trial.foil.response != 0) {
        values.count_foils_corr += 1;
        if (trial.foil.correct) {
            values.count_newfoils += 1;
        } else if (trial.foil.responsetext == values.responsekey_old) {
            values.count_oldfoils += 1            
        } else if (trial.foil.responsetext == values.responsekey_similar) {
            values.count_simfoils += 1;                
        };        
    };
]
/trialduration = (parameters.stimulusduration + parameters.ISI)
/recorddata = true
/branch = [return trial.part2;]
</trial>

Note:
* presents a lure for parameters.stimulusduration
* collects response during that time
* updates summary variables
* calls trial.part2
<trial lure>
/ontrialbegin = [
    values.stimulusselect = list.lures.nextvalue;    
    values.lurebin = item.lurebins.item(values.stimulusselect);    
    
    if (values.lurebin == 1) {
        values.L1 += 1;        
    } else if (values.lurebin == 2) {
        values.L2 += 1;        
    } else if (values.lurebin == 3) {
        values.L3 += 1;        
    } else if (values.lurebin == 4) {
        values.L4 += 1;        
    } else if (values.lurebin == 5) {
        values.L5 += 1;        
    } else {
        values.lurebin = "NA";        
    };

    trial.lure.insertstimulusframe(picture.lure, 1);        
    trial.lure.insertstimulustime(clearscreen, parameters.stimulusduration);
]

/stimulusframes = [1 = responsekeys_part2]
/validresponse = (values.responsekey_old, values.responsekey_similar, values.responsekey_new)
/beginresponseframe = 1
/ correctresponse = (values.responsekey_similar)
/responseinterrupt = frames

/ontrialend = [
    trial.lure.resetstimulusframes();
    
    if (trial.lure.responsetext == values.responsekey_old) {
        values.responseCategory = "old";        
    } else if (trial.lure.responsetext == values.responsekey_new) {
        values.responseCategory = "new";        
    } if (trial.lure.responsetext == values.responsekey_similar) {
        values.responseCategory = "similar";        
    } else if (trial.lure.response == 0) {
        values.responseCategory = "";
        values.count_noresponses += 1;
    };
    
    values.stimulus = picture.lure.currentitem;
    
    values.count_lures += 1;
    if (trial.lure.response != 0) {
        values.count_lures_corr += 1;
        if (trial.lure.correct) {
            values.count_simlures += 1;
        } else if (trial.lure.responsetext == values.responsekey_old) {
            values.count_oldlures += 1;            
        } else if (trial.lure.responsetext == values.responsekey_new) {
            values.count_newlures += 1;            
        };        
    };

    if (values.lurebin == "1"){
        if (trial.lure.responsetext == values.responsekey_old){
            values.L1O +=1;
        } else if (trial.lure.responsetext == values.responsekey_similar){
            values.L1S +=1;
        } else if (trial.lure.responsetext == values.responsekey_new){
            values.L1N +=1;            
        } else if ( trial.lure.response == 0){
            values.L1_NR += 1;
        };
    } else if (values.lurebin == "2"){
        if (trial.lure.responsetext == values.responsekey_old){
            values.L2O +=1;
        } else if (trial.lure.responsetext == values.responsekey_similar){
            values.L2S +=1;
        } else if (trial.lure.responsetext == values.responsekey_new){
            values.L2N +=1;            
        } else if ( trial.lure.response == 0){
            values.L2_NR += 1;
        };
    } else if (values.lurebin == "3"){
        if (trial.lure.responsetext == values.responsekey_old){
            values.L3O +=1;
        } else if (trial.lure.responsetext == values.responsekey_similar){
            values.L3S +=1;
        } else if (trial.lure.responsetext == values.responsekey_new){
            values.L3N +=1;            
        } else if ( trial.lure.response == 0){
            values.L3_NR += 1;
        };
    } else if (values.lurebin == "4"){
        if (trial.lure.responsetext == values.responsekey_old){
            values.L4O +=1;
        } else if (trial.lure.responsetext == values.responsekey_similar){
            values.L4S +=1;
        } else if (trial.lure.responsetext == values.responsekey_new){
            values.L4N +=1;            
        } else if ( trial.lure.response == 0){
            values.L4_NR += 1;
        };
    } else if (values.lurebin == "5"){
        if (trial.lure.responsetext == values.responsekey_old){
            values.L5O +=1;
        } else if (trial.lure.responsetext == values.responsekey_similar){
            values.L5S +=1;
        } else if (trial.lure.responsetext == values.responsekey_new){
            values.L5N +=1;            
        } else if ( trial.lure.response == 0){
            values.L5_NR += 1;
        };
    };
]
/trialduration = (parameters.stimulusduration + parameters.ISI)
/recorddata = true
/branch = [return trial.part2;]
</trial>

Note:
* presents a target for parameters.stimulusduration
* provides infinite time for response
* updates summary variables
* calls trial.part2
<trial target_selfpaced>
/ontrialbegin = [
    values.stimulusselect = list.targets.nextvalue;
    trial.target_selfpaced.insertstimulusframe(picture.target, 1);
    trial.target_selfpaced.insertstimulustime(clearscreen, parameters.stimulusduration);
]

/stimulusframes = [1 = responsekeys_part2]
/validresponse = (values.responsekey_old, values.responsekey_similar, values.responsekey_new)
/ correctresponse = (values.responsekey_old)
/beginresponseframe = 1
/responseinterrupt = frames

/ontrialend = [
    trial.target_selfpaced.resetstimulusframes();
    if (trial.target_selfpaced.responsetext == values.responsekey_old) {
        values.responseCategory = "old";    
    } else if (trial.target_selfpaced.responsetext == values.responsekey_new) {
        values.responseCategory = "new";    
    } else if (trial.target_selfpaced.responsetext == values.responsekey_similar) {
        values.responseCategory = "similar";    
    } else if (trial.target_selfpaced.response == 0) {
        values.responseCategory = "";
        values.count_noresponses += 1;
    };

    values.stimulus = picture.target.currentitem;
    
    values.count_targets += 1;
    if (trial.target_selfpaced.response != 0) {
        values.count_targets_corr += 1;
        if (trial.target_selfpaced.correct) {
            values.count_oldtargets += 1;
        } else if (trial.target_selfpaced.responsetext == values.responsekey_similar) {
            values.count_simtargets += 1;    
        } else if (trial.target_selfpaced.responsetext == values.responsekey_new) {
            values.count_newtargets += 1        
        };    
    };

]
/recorddata = true
/branch = [return trial.part2;]
</trial>

Note:
* presents a foil for parameters.stimulusduration
* provides infinite time for response
* updates summary variables
* calls trial.part2
<trial foil_selfpaced>
/ontrialbegin = [
    values.stimulusselect = list.foils.nextvalue;
    trial.foil_selfpaced.insertstimulusframe(picture.foil, 1);         
    trial.foil_selfpaced.insertstimulustime(clearscreen, parameters.stimulusduration);
]

/stimulusframes = [1 = responsekeys_part2]
/validresponse = (values.responsekey_old, values.responsekey_similar, values.responsekey_new)
/ correctresponse = (values.responsekey_new)
/beginresponseframe = 1
/responseinterrupt = frames
/ontrialend = [
    trial.foil_selfpaced.resetstimulusframes();
    
    if (trial.foil_selfpaced.responsetext == values.responsekey_old) {
        values.responseCategory = "old";        
    } else if (trial.foil_selfpaced.responsetext == values.responsekey_new) {
        values.responseCategory = "new";    
    } else if (trial.foil_selfpaced.responsetext == values.responsekey_similar) {
        values.responseCategory = "similar";    
    } else if (trial.foil_selfpaced.response == 0) {
        values.responseCategory = "";
        values.count_noresponses += 1;
    };
    
    values.stimulus = picture.foil.currentitem;
    
    values.count_foils += 1;
    if (trial.foil_selfpaced.response != 0) {
        values.count_foils_corr += 1;
        if (trial.foil_selfpaced.correct) {
            values.count_newfoils += 1;
        } else if (trial.foil_selfpaced.responsetext == values.responsekey_old) {
            values.count_oldfoils += 1            
        } else if (trial.foil_selfpaced.responsetext == values.responsekey_similar) {
            values.count_simfoils += 1;                
        };        
    };
]
/recorddata = true
/branch = [return trial.part2;]
</trial>

Note:
* presents a lure for parameters.stimulusduration
* provides infinite time for response
* updates summary variables
* calls trial.part2
<trial lure_selfpaced>
/ontrialbegin = [
    values.stimulusselect = list.lures.nextvalue;    
    values.lurebin = item.lurebins.item(values.stimulusselect);    
    
    if (values.lurebin == 1) {
        values.L1 += 1;        
    } else if (values.lurebin == 2) {
        values.L2 += 1;        
    } else if (values.lurebin == 3) {
        values.L3 += 1;        
    } else if (values.lurebin == 4) {
        values.L4 += 1;        
    } else if (values.lurebin == 5) {
        values.L5 += 1;        
    } else {
        values.lurebin = "NA";        
    };

    trial.lure_selfpaced.insertstimulusframe(picture.lure, 1);        
    trial.lure_selfpaced.insertstimulustime(clearscreen, parameters.stimulusduration);
]

/stimulusframes = [1 = responsekeys_part2]
/validresponse = (values.responsekey_old, values.responsekey_similar, values.responsekey_new)
/beginresponseframe = 1
/ correctresponse = (values.responsekey_similar)
/responseinterrupt = frames

/ontrialend = [
    trial.lure_selfpaced.resetstimulusframes();
    
    if (trial.lure_selfpaced.responsetext == values.responsekey_old) {
        values.responseCategory = "old";        
    } else if (trial.lure_selfpaced.responsetext == values.responsekey_new) {
        values.responseCategory = "new";        
    } if (trial.lure_selfpaced.responsetext == values.responsekey_similar) {
        values.responseCategory = "similar";        
    } else if (trial.lure_selfpaced.response == 0) {
        values.responseCategory = "";
        values.count_noresponses += 1;
    };
    
    values.stimulus = picture.lure.currentitem;
    
    values.count_lures += 1;
    if (trial.lure_selfpaced.response != 0) {
        values.count_lures_corr += 1;
        if (trial.lure_selfpaced.correct) {
            values.count_simlures += 1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_old) {
            values.count_oldlures += 1;            
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_new) {
            values.count_newlures += 1;            
        };        
    };

    if (values.lurebin == "1"){
        if (trial.lure_selfpaced.responsetext == values.responsekey_old){
            values.L1O +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_similar){
            values.L1S +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_new){
            values.L1N +=1;            
        } else if ( trial.lure_selfpaced.response == 0){
            values.L1_NR += 1;
        };
    } else if (values.lurebin == "2"){
        if (trial.lure_selfpaced.responsetext == values.responsekey_old){
            values.L2O +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_similar){
            values.L2S +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_new){
            values.L2N +=1;            
        } else if ( trial.lure_selfpaced.response == 0){
            values.L2_NR += 1;
        };
    } else if (values.lurebin == "3"){
        if (trial.lure_selfpaced.responsetext == values.responsekey_old){
            values.L3O +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_similar){
            values.L3S +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_new){
            values.L3N +=1;            
        } else if ( trial.lure_selfpaced.response == 0){
            values.L3_NR += 1;
        };
    } else if (values.lurebin == "4"){
        if (trial.lure_selfpaced.responsetext == values.responsekey_old){
            values.L4O +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_similar){
            values.L4S +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_new){
            values.L4N +=1;            
        } else if ( trial.lure_selfpaced.response == 0){
            values.L4_NR += 1;
        };
    } else if (values.lurebin == "5"){
        if (trial.lure_selfpaced.responsetext == values.responsekey_old){
            values.L5O +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_similar){
            values.L5S +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_new){
            values.L5N +=1;            
        } else if ( trial.lure_selfpaced.response == 0){
            values.L5_NR += 1;
        };
    };
]
/recorddata = true
/branch = [return trial.part2;]
</trial>

*******************************************************************************************************************
*******************************************************************************************************************
    BLOCKS
*******************************************************************************************************************
*******************************************************************************************************************

***********************************
List Generation Blocks
***********************************

<block Listgeneration>
/branch = [
    if (values.setsize == 64) {
        return block.listgeneration64;            
    } else if (values.setsize == 32) {
        return block.listgeneration32;        
    } else if (values.setsize == 20) {
        return block.listgeneration20;        
    } else {
        return block.listgeneration64;        
    };
]
</block>

<block Listgeneration64>
/trials = [1 = selectlures64]
</block>

<block Listgeneration32>
/trials = [1 = selectlures32]
</block>

<block Listgeneration20>
/trials = [1 = selectlures20]
</block>

***********************************
Part 1
***********************************

<block part1>
/skip = [parameters.selfpaced == true]
/preinstructions = (part1)
/onblockbegin = [values.count_trials = 0;]
/trials = [1= Stimuluspresentation]
</block>

<block part1_selfpaced>
/skip = [parameters.selfpaced == false]
/preinstructions = (part1_selfpaced)
/onblockbegin = [values.count_trials = 0;]
/trials = [1= Stimuluspresentation_selfpaced]
</block>

***********************************
Part 2
***********************************

<block part2>
/skip = [parameters.selfpaced == true]
/onblockbegin = [values.count_trials = 0;]
/stop = [values.count_trials > expressions.part2trialnumber]
/trials = [
    1 = instructions_part2;
    2 = Part2;
]
</block>

<block part2_selfpaced>
/skip = [parameters.selfpaced == false]
/onblockbegin = [values.count_trials = 0;]
/stop = [values.count_trials > expressions.part2trialnumber]
/trials = [
    1 = instructions_part2;
    2 = Part2;
]
</block>

*******************************************************************************************************************
*******************************************************************************************************************
    EXPERIMENT
*******************************************************************************************************************
*******************************************************************************************************************
Note: this exp element automatically runs part1 and part2 (either self-paced or not but not both at the same time -> depends on settings of parameters.selfpaced)

<expt>
/onexptbegin = [
    if (parameters.showresponsekeyreminder == true) {
        text.responsekeys_part1.skip = false;
        text.responsekeys_part2.skip = false;
    } else {
        text.responsekeys_part1.skip = true;
        text.responsekeys_part2.skip = true;
    };
    
    if (parameters.nr_subsetImages == "32-1" || parameters.nr_subsetImages == "32-2") {
        values.setsize = 32;    
    } else if (parameters.nr_subsetImages == "20-1" || parameters.nr_subsetImages == "20-2" || parameters.nr_subsetImages == "20-3") {
        values.setsize = 20;
    } else {
        values.setsize = 64;
    };
    
    list.part2.poolsize = expressions.part2trialnumber;
]
/postinstructions = (end)
/blocks = [
    1 = listgeneration;
    2 = part1;
    3 = part2;
    4 = part1_selfpaced;
    5 = part2_selfpaced;
]
</expt>

*******************************************************************************************************************
                                                End of File
*******************************************************************************************************************

Dave
Dave
Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)
Group: Administrators
Posts: 11K, Visits: 67K
Hasagu - 3/10/2021
Dave - 3/9/2021
Hasagu - 3/9/2021
Hasagu - 3/9/2021
Dave - 3/9/2021
Hasagu - 3/9/2021
Dave - 3/9/2021
Hasagu - 3/9/2021
Hi Inquisit users,

I'm wondering if someone can help me find the appopriate Inquisit test for my study.

I want to present 90 single images in a learning phase (with stimulus presentation and inter stimulus interval), and ask participants to categories each as an indoor or outdoor item (I for indoor and O for outdoor).

In a test phase, I will present 135 single images and ask participants to specify whether each image is a repeat, new, or similar image.

Does anyone know if there are any tests like this already? I've been searching the library but can't find anything yet.

TIA!

The first aspect of your task is a simple, two-choice categorisation task. These are trivial to implement, scripts like all the IATs, lexical decision tasks (word vs. nonword) are all two-choice categorisation tasks. These kinds of tasks are also covered extensively in the tutorials: https://www.millisecond.com/support/docs/v6/html/tutorials/tutorials.htm

The second aspect of your task is an old-new paradigm (with lures). These kinds of paradigms have been discussed here a number of times and you can find examples e.g. here https://www.millisecond.com/forums/Topic21813.aspx

The Lexical Decision Task is exactly what I need for the first part. Is there a way to substitute words for images?

Change the <text> elements to <picture> elements.
Thanks Dave.

I have changed the item category to pictures:
From:
<item category>
/ 1 = "category1"
/ 2 = "category2"
/ 3 = "category3"
/ 4 = "category4"
/ 5 = "category5"
/ 6 = "category6"
/ 7 = "category7"
/ 8 = "category8"
/ 9 = "category9"
/ 10 = "category10"
/ 11 = "category11"
/ 12 = "category12"
/ 13 = "category13"
</item>

to:
<item target1>
/1 = "Picture 1a.jpg"
/2 = "Picture 2a.jpg"
/3 = "Picture 3a.jpg"
/4 = "Picture 4a.jpg"
/5 = "Picture 5a.jpg"
/6 = "Picture 6a.jpg"
/7 = "Picture 7a.jpg"
/8 = "Picture 8a.jpg"
/9 = "Picture 9a.jpg"
/10 = "Picture 10a.jpg"

And the stimuli:
From:
<text category>
/ items = category
/ fontstyle = ("Arial", parameters.stimSize, false, false, false, false, 5, 0)
</text>

To:
<picture category>
/ items = target1
/select = values.stimulusselect
/position = (50%, 50%)
/ size = (40%, 40%)
</picture>

But, there is no folder to store my pictures, and I get a lot of errors, some of which are:
'text.nonword' Expression contains an invalid identifier.
'text.nonword.currentitem' Expression contains an invalid identifier.
Unable to load the picture '/Users/hannahgutmann/Downloads/Picture 4a.jpg'. Network Error: Error opening /Users/hannahgutmann/Downloads/Picture 4a.jpg: No such file or directory

This is the code the error is related to:

<trial ldtnonword>
/ ontrialbegin = [
    values.condition = "Non Word";
    trial.ldtnonword.insertstimulustime(text.nonword, parameters.fixationDuration);
    trial.ldtnonword.insertstimulustime(shape.blank, (parameters.fixationDuration + parameters.stimDuration));    
]
/ stimulustimes = [0=ready]
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/beginresponsetime = parameters.fixationDuration
/ ontrialend = [
    trial.ldtnonword.resetstimulusframes();
    
    list.nonwords.appenditem(trial.ldtnonword.correct);
    list.overallaccuracy.appenditem(trial.ldtnonword.correct);    
    if (trial.ldtnonword.correct) {
        list.nonwords_correctRT.appenditem(trial.ldtnonword.latency);
        list.overallRT.appenditem(trial.ldtnonword.latency);        
    };    
    
    values.presentedStim = text.nonword.currentitem;
]
</trial>

trial ldtneutralPractice>
/ ontrialbegin = [
    values.condition = "Neutral Word";
    trial.ldtneutralPractice.insertstimulustime(text.neutralPractice, parameters.fixationDuration);
    trial.ldtneutralPractice.insertstimulustime(shape.blank, (parameters.fixationDuration + parameters.stimDuration));    
]
/ stimulustimes = [0=ready]
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/beginresponsetime = parameters.fixationDuration
/ ontrialend = [
    trial.ldtneutralPractice.resetstimulusframes();
    values.presentedStim = text.neutralPractice.currentitem;
]
</trial>

<trial ldtnonwordPractice>
/ ontrialbegin = [
    values.Condition = "Non Word";
    trial.ldtnonwordPractice.insertstimulustime(text.nonwordPractice, parameters.fixationDuration);
    trial.ldtnonwordPractice.insertstimulustime(shape.blank, (parameters.fixationDuration + parameters.stimDuration));    
]
/ stimulustimes = [0=ready]
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/beginresponsetime = parameters.fixationDuration
/ ontrialend = [
    trial.ldtnonwordPractice.resetstimulusframes();
    values.presentedStim = text.nonwordPractice.currentitem;
]
</trial>

<trial instructions>
/ stimulustimes = [0=instructions]
/ validresponse = (" ")
/ recorddata = false
</trial>

(1) Image files ought to reside in the same folder where the script resides. Your system's "Downloads" folder is not a suitable place for this. Create a folder on your Desktop or in your personal files directory, and move the script and image files there.

(2) There is no text.nonword anymore.

<trial ldtnonword>
/ ontrialbegin = [
values.condition = "Non Word";
trial.ldtnonword.insertstimulustime(text.nonword, parameters.fixationDuration);
trial.ldtnonword.insertstimulustime(shape.blank, (parameters.fixationDuration + parameters.stimDuration));
]
/ stimulustimes = [0=ready]
...
</trial>

If you make changes, you need to adjust the rest of the code accordingly.

Thanks for all your help Dave.

In reference to the first part of my study,
1.    What does this error mean?  'values.stimulusselect' The expression contains an unknown property. (in ref to below code).

<picture neutralPractice>
/ items = neutralPractice
/select = values.stimulusselect
/position = (50%, 50%)
/ size = (40%, 40%)
</picture>



In reference to the second part of my study:
2.    How can I connect the two parts of this study into one piece of code? I want to bring the code for the recognition part of this study (from this test https://www.millisecond.com/download/library/bpso/), but I’m not sure what sections are relevant.

- Do I bring the editable parametres section over?
“EDITABLE PARAMETERS: change editable parameters here”

<parameters>
/showresponsekeyreminder = false
/nr_subsetImages = "64"
/selfpaced = false
/stimulusduration = 2000
/ISI = 500
</parameters>

- I have added the recognition stimuli (new and similar items) to the stimuli section. *I have no lure bins.
“EDITABLE STIMULI: originals from Stark et al (2013)”

- I will change the instructions as needed
“EDITABLE INSTRUCTIONS: change instructions here”

-    I’m not sure what to take from the remaining code.
!!!REMAINING CODE: Customize after careful consideration only!!!
**************************************************************************************************************

*******************************************************************************************************************
*******************************************************************************************************************
    DEFAULTS:
*******************************************************************************************************************
*******************************************************************************************************************
requires Inquisit 6.1.0.0

<defaults>
/minimumversion = "6.1.0.0"
/canvasaspectratio = (4,3)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txbgcolor = white
/ txcolor = black
</defaults>

*******************************************************************************************************************
*******************************************************************************************************************
    DATA: this section contains data file information
*******************************************************************************************************************
*******************************************************************************************************************

********************
raw data
********************
<data>
/ columns = (build, computer.platform, date, time, subject, group, script.sessionid,
values.set, values.setsize, parameters.nr_subsetImages,
blockcode, blocknum, trialcode, trialnum,
values.stimulus, values.stimulusselect, values.trialtype, values.lurebin,
response, values.responseCategory, correct, latency)
</data>

********************
summary data
********************

<summarydata>
/ columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid,
script.elapsedtime, script.completed,
parameters.showresponsekeyreminder,values.set, values.setsize, parameters.nr_subsetImages, parameters.selfpaced, parameters.stimulusduration, parameters.ISI,

values.countl1, values.countl2, values.countl3, values.countl4, values.countl5, expressions.minlurefreq,

values.count_oldtargets, values.count_simtargets, values.count_newtargets, values.count_targets, values.count_targets_corr,
values.count_oldlures, values.count_simlures, values.count_newlures, values.count_lures, values.count_lures_corr,
values.count_oldfoils, values.count_simfoils, values.count_newfoils, values.count_foils, values.count_foils_corr,

expressions.rawrate_oldtargets, expressions.rawrate_simtargets, expressions.rawrate_newtargets,
expressions.rawrate_oldlures, expressions.rawrate_simlures, expressions.rawrate_newlures,
expressions.rawrate_oldfoils, expressions.rawrate_simfoils, expressions.rawrate_newfoils,

expressions.corrrate_oldtargets, expressions.corrrate_simtargets, expressions.corrrate_newtargets,
expressions.corrrate_oldlures, expressions.corrrate_simlures, expressions.corrrate_newlures,
expressions.corrrate_oldfoils, expressions.corrrate_simfoils, expressions.corrrate_newfoils,

values.L1, values.L2, values.L3, values.L4, values.L5,
values.L1_NR, values.L2_NR, values.L3_NR, values.L4_NR, values.L5_NR,
values.L1O, values.L1S, values.L1N,
values.L2O, values.L2S, values.L2N,
values.L3O, values.L3S, values.L3N,
values.L4O, values.L4S, values.L4N,
values.L5O, values.L5S, values.L5N,

expressions.rawpercentcorrect, expressions.corrpercentcorrect,

expressions.BPS, expressions.TRS)
</summarydata>



*******************************************************************************************************************
*******************************************************************************************************************
    VALUES: automatically updated
*******************************************************************************************************************
*******************************************************************************************************************
/setsize:                                the number of items per condition in part 2 (default is 64 but can be automatically updated)
/nextitem:                                helper variable to fill target/lure/foil lists
/nextlurebin:                            helper variable to fill lure list (stores the lure bin of the next item that could be added to list.lures)
/countL1-
/countL5:                                helper variables that keep track of how many lures of each of the 5 categories have been sorted into list.lures
/countlureselections:                    helper variables to keep track of how many successful lures have been selected for list.lures
/count_trials:                            helper variable to keep track of trialnumbers
/stimulusselect:                        determines the currently presented picture
/stimulus:                                stores the currently presented picture
/trialtype:                                the current trial type
                                            1 = target
                                            2 = foil
                                            3 = lure
/response:                                part1; "indoor" vs. "outdoor"; part2: "old", "new", "similar"
/lurebin:                                the lure bin of current lure (1-5)

<values>
/set = "C"
/setsize = 64
/nextitem = 0
/nextlurebin = 0
/countL1 = 0
/countL2 = 0
/countL3 = 0
/countL4 = 0
/countL5 = 0
/countlureselections = 0
/count_trials = 0
/stimulusselect = 1
/stimulus = 0
/trialtype = 0
/responseCategory = ""
/lurebin = 0

/responsekey_indoor = "I"
/responsekey_outdoor = "O"
/responsekey_old = "V"
/responsekey_new = "N"
/responsekey_similar = "B"
</values>


Summary Variables
/count_noresponses:                counts all no responses
/count_targets:                    counts all target trials (same for foils, lures)
/count_targets_corr:            counts all target trials that were responded to (same for foils, lures)
/count_oldtargets:                counts all "old" responses to targets
/count_simtargets-
/count_newlures:                counts all responses for targets, lures, foils (depending on response)
                                e.g. count_simtargets: counts all targets classified as "similar"

<values>
/count_noresponses = 0
/count_targets = 0
/count_targets_corr = 0
/count_oldtargets = 0
/count_simtargets = 0
/count_newtargets = 0

/count_foils = 0
/count_foils_corr = 0
/count_newfoils = 0
/count_simfoils = 0
/count_oldfoils = 0

/count_lures = 0
/count_lures_corr = 0
/count_simlures = 0
/count_oldlures = 0
/count_newlures = 0
</values>


Lure Bins Summary Statistics:
/L1-L5:                    counts how often lures of category 1-5 were run

/L1_NR-
/L5_NR:                    counts no reponses (NR) to all 5 bin lure categories

/L1O - L5O:                counts how often lures of category 1-5 were categorized as "old"
/L1S - L5S:     counts how often lures of category 1-5 were categorized as "similar"
/L1N - L5N:                counts how often lures of category 1-5 were categorized as "new"

<values>
/L1 = 0
/L2 = 0
/L3 = 0
/L4 = 0
/L5 = 0

/L1_NR = 0
/L2_NR = 0
/L3_NR = 0
/L4_NR = 0
/L5_NR = 0

/L1O = 0
/L1S = 0
/L1N = 0
/L2O = 0
/L2S = 0
/L2N = 0
/L3O = 0
/L3S = 0
/L3N = 0
/L4O = 0
/L4S = 0
/L4N = 0
/L5O = 0
/L5S = 0
/L5N = 0
</values>

*******************************************************************************************************************
*******************************************************************************************************************
    EXPRESSIONS
*******************************************************************************************************************
*******************************************************************************************************************
/minlurefreq:                        the minimum number of lures of each lure bin
/part2TrialNumber:                    calculates the number of trials needed for part 3 based on values.setsize

/rawpercentcorrect:                    uncorrected overall percent correct rate (takes all trials into account)
/corrpercentcorrect:                corrected overall percent correct rate (takes only those trials with a response into account)

/rawrate_oldtargets:                uncorrected rate of "old" responses to all target trial
/rawrate_simtargets:                uncorrected rate of "similar" responses to all target trials
/rawrate_newtargets:                uncorrected rate of "new" responses to all target trials
/corrrate_oldtargets:                corrected rate of "old" responses to target trials that were responded to (no responses excluded)
/corrrate_simtargets:                corrected rate of "similar" responses to target trials that were responded to (no responses excluded)
/corrrate_newtargets:                corrected rate of "new" responses to target trials that were responded to (no responses excluded)

/rawrate_oldlures-
/corrrate_newfoils:                    same for lures and foils

/BPS:                                Behavioral Pattern Separation Score (BPS): rates corrected for no responses
                                        => "hit" rate for lures (=proportion of similar responses to lure objects) - "false alarm" rate for foils (=proportion of similar responses to foil objects)

/TRS:                                Traditional Recognition Score (TRS): rates corrected for no responses
                                        => hit rate for targets (=proportion of old responses to old objects) - false alarm rate for foils (=proportion of old responses to foil objects)

<expressions>
/minlurefreq = ipart(values.setsize/5)
/part2TrialNumber = 3 * values.setsize

/rawpercentcorrect = ((values.count_oldtargets + values.count_simlures + values.count_newfoils)/(values.count_targets + values.count_lures + values.count_foils)) * 100
/corrpercentcorrect = ((values.count_oldtargets + values.count_simlures + values.count_newfoils)/(values.count_targets_corr + values.count_lures_corr + values.count_foils_corr)) * 100

/rawrate_oldtargets = values.count_oldtargets/values.count_targets
/rawrate_simtargets = values.count_simtargets/values.count_targets
/rawrate_newtargets = values.count_newtargets/values.count_targets
/corrrate_oldtargets = values.count_oldtargets/values.count_targets_corr
/corrrate_simtargets = values.count_simtargets/values.count_targets_corr
/corrrate_newtargets = values.count_newtargets/values.count_targets_corr

/rawrate_oldlures = values.count_oldlures/values.count_lures
/rawrate_simlures = values.count_simlures/values.count_lures
/rawrate_newlures = values.count_newlures/values.count_lures
/corrrate_oldlures = values.count_oldlures/values.count_lures_corr
/corrrate_simlures = values.count_simlures/values.count_lures_corr
/corrrate_newlures = values.count_newlures/values.count_lures_corr

/rawrate_oldfoils = values.count_oldfoils/values.count_foils
/rawrate_simfoils = values.count_simfoils/values.count_foils
/rawrate_newfoils = values.count_newfoils/values.count_foils
/corrrate_oldfoils = values.count_oldfoils/values.count_foils_corr
/corrrate_simfoils = values.count_simfoils/values.count_foils_corr
/corrrate_newfoils = values.count_newfoils/values.count_foils_corr

/TRS = expressions.corrrate_oldtargets - expressions.corrrate_oldfoils
/BPS = expressions.corrrate_simlures - expressions.corrrate_simfoils
</expressions>

*******************************************************************************************************************
*******************************************************************************************************************
    INSTRUCTIONS
*******************************************************************************************************************
*******************************************************************************************************************

<video instructionvideo>
/ items = instructionvideo
/ size = (60%, 60%)
/ playthrough = true
</video>

<trial instructions_part2>
/ stimulusframes = [1 = instructionvideo]
/ trialduration = 106000
/ branch = [trial.spacebar]
</trial>

<trial spacebar>
/ stimulusframes = [1 = spacebar]
/ validresponse = (" ")
</trial>

<text Spacebar>
/ items = ("Press <SPACEBAR> to start")
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ position = (50%, 85%)
</text>

*******************************************************************************************************************
*******************************************************************************************************************
    STIMULI
*******************************************************************************************************************
*******************************************************************************************************************

<picture target>
/items = Stimuli
/select = values.stimulusselect
/position = (50%, 50%)
/ size = (40%, 40%)
</picture>

<picture foil>
/items = Stimuli
/select = values.stimulusselect
/position = (50%, 50%)
/ size = (40%, 40%)
</picture>

<picture lure>
/items = Stimuli_lures
/select = values.stimulusselect
/position = (50%, 50%)
/ size = (40%, 40%)
</picture>


*************************
optional -> parameters.showresponsekeyreminder
*************************

<text responsekeys_part1>
/items = ("INDOOR: <%values.responsekey_indoor%>                    OUTDOOR: <%values.responsekey_outdoor%>")
/position = (50%, 95%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = black
/erase = false
</text>

<text responsekeys_part2>
/items = ("OLD: <%values.responsekey_old%>        SIMILAR: <%values.responsekey_similar%>        NEW: <%values.responsekey_new%>")
/position = (50%, 95%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = black
/erase = false
</text>

*******************************************************************************************************************
*******************************************************************************************************************
    LISTS: Item lists used depending on parameters.nr_subsetImages
*******************************************************************************************************************
*******************************************************************************************************************

****************************************************************************
Itemnumber list for sets of 64 items (either set C or set D)
****************************************************************************

Note: list contains all the possible itemnumbers (1-192)
<list itemnumbers>
/items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
191, 192)
/replace = false
/selectionrate = always
</list>


****************************************************************************
Itemnumber lists for sets of 32 items from Set C
(the original list of 192 items was divided into two sets of 32)

-> lists were randomly assembled
(constraints: a minimum number of 13 lures had to be present for each
lure bin in each item list)
****************************************************************************

<list C32_1>
/items = (
3, 7, 8, 10, 11, 13, 14, 15, 17, 20, 24, 26, 28, 29, 31, 35, 39, 41, 42, 43,
46, 47, 52, 53, 54, 59, 60, 63, 66, 68, 70, 71, 72, 74, 77, 79, 81, 83, 84,
87, 88, 90, 91, 96, 97, 103, 106, 110, 111, 114, 115, 117, 119, 120, 121, 122,
123, 124, 125, 126, 128, 131, 132, 134, 136, 138, 141, 144, 145, 146, 148, 149,
150, 151, 153, 154, 155, 157, 158, 159, 160, 163, 164, 167, 168, 171, 173, 177,
178, 179, 180, 182, 184, 190, 191, 192)
/replace = false
/selectionrate = always
</list>

<list C32_2>
/items = (
1, 2, 4, 5, 6, 9, 12, 16, 18, 19, 21, 22, 23, 25, 27, 30, 32, 33, 34, 36, 37, 38, 40,
44, 45, 48, 49, 50, 51, 55, 56, 57, 58, 61, 62, 64, 65, 67, 69, 73, 75, 76, 78, 80, 82,
85, 86, 89, 92, 93, 94, 95, 98, 99, 100, 101, 102, 104, 105, 107, 108, 109, 112, 113, 116,
118, 127, 129, 130, 133, 135, 137, 139, 140, 142, 143, 147, 152, 156, 161, 162, 165, 166,
169, 170, 172, 174, 175, 176, 181, 183, 185, 186, 187, 188, 189)
/replace = false
/selectionrate = always
</list>

****************************************************************************
Itemnumber lists for sets of 20 items from Set C
(the original list of 192 items was divided into three sets of 20)

-> lists were randomly assembled
(constraints: a minimum number of 9 lures had to be present for each
lure bin in each item list)
****************************************************************************

<list C20_1>
/items = (
1, 3, 6, 10, 12, 16, 22, 27, 28, 29, 30, 32, 33, 42, 45, 48, 51, 52, 54, 55,
56, 57, 58, 59, 61, 66, 67, 68, 69, 70, 74, 79, 87, 94, 97, 101, 105, 114, 120, 122,
124, 125, 126, 127, 129, 130, 136, 137, 139, 143, 154, 155, 158, 160, 163, 164, 168, 174, 181, 187)
/replace = false
/selectionrate = always
</list>

<list C20_2>
/items = (
2, 4, 5, 7, 8, 9, 17, 18, 19, 24, 26, 34, 35, 36, 38, 40, 41, 43, 44, 46,
49, 50, 62, 63, 71, 77, 80, 85, 88, 90, 93, 100, 104, 106, 107, 108, 109, 112, 115, 116,
123, 131, 132, 138, 141, 144, 146, 149, 152, 156, 157, 165, 167, 169, 171, 173, 176, 178, 180, 188)
/replace = false
/selectionrate = always
</list>

<list C20_3>
/items = (
11, 13, 14, 15, 20, 21, 25, 31, 37, 39, 47, 53, 60, 65, 72, 73, 75, 76, 81, 82,
84, 86, 89, 91, 92, 95, 96, 99, 102, 103, 111, 113, 117, 118, 128, 133, 134, 140, 142, 145,
147, 148, 150, 153, 159, 161, 162, 166, 170, 172, 175, 177, 179, 183, 184, 186, 189, 190, 191, 192)
/replace = false
/selectionrate = always
</list>

*******************************************************************************************************************
*******************************************************************************************************************
    LISTS: targets/lures/foil lists that are filled during runtime
*******************************************************************************************************************
*******************************************************************************************************************

Note: the following lists are filled during runtime.

-> will contain all the stimulusitemnumbers that are presented during Part1
<list stimuluspresentation>
/replace = false
/resetinterval = 1
</list>

-> will contain all the stimulusitemnumbers of targets (presented during Part 1 and Part 2)
<list targets>
/replace = false
/resetinterval = 1
</list>

-> will contain all the stimulusitemnumbers of foils (only presented during Part 2)
<list foils>
/replace = false
/resetinterval = 1
</list>

-> will contain all the stimulusitemnumbers of lures (only presented Part 2 but very similar to items from Part 1)
<list lures>
/replace = false
/resetinterval = 1
</list>

Note: list.part2 specifies how many trials are run in part2 (based on values.setsize,
same frequency of target trials (1), foil trials (2), lure trials (3)
<list part2>
/items = (1, 2, 3)
/ poolsize = expressions.part2trialnumber
/replace = false
/resetinterval = 1
</list>

*******************************************************************************************************************
*******************************************************************************************************************
    TRIALS: Lure, Targets, Foil List Generation
*******************************************************************************************************************
*******************************************************************************************************************

**********************************
Set size = 64
**********************************

NOTES: trial.selectlures64
* randomly assembles list.lures with the constraint that each of the 5 lure types have at least values.setsize/5 lures
in the list
<trial selectlures64>
/ontrialbegin = [
    values.countlureselections += 1;
    values.nextitem = list.itemnumbers.nextvalue;
    values.nextlurebin = item.lurebins.item(values.nextitem);    

    if (values.nextlurebin == "1") {
        values.countL1 += 1;
    } else if (values.nextlurebin == "2") {
        values.countL2 += 1;
    } else if (values.nextlurebin == "3") {
        values.countL3 += 1;
    } else if (values.nextlurebin == "4") {
        values.countL4 += 1;
    } else if (values.nextlurebin == "5") {
        values.countL5 += 1;
    };
]
/branch = [
    if (values.nextlurebin == "1" && values.countL1 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
            values.countL1 -= 1;
            values.countlureselections -=1;
            list.itemnumbers.appenditem(values.nextitem);
            return trial.selectlures64;
    } else if (values.nextlurebin == "2" && values.countL2 > expressions.minlurefreq && (values.countL1 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
            values.countL2 -= 1;
            values.countlureselections -=1;
            list.itemnumbers.appenditem(values.nextitem);
            return trial.selectlures64;
    } else if (values.nextlurebin == "3" && values.countL3 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
            values.countL3 -= 1;
            values.countlureselections -=1;
            list.itemnumbers.appenditem(values.nextitem);
            return trial.selectlures64;            
    } else if (values.nextlurebin == "4" && values.countL4 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
            values.countL4 -= 1;
            values.countlureselections -=1;
            list.itemnumbers.appenditem(values.nextitem);
            return trial.selectlures64;        
    } else if (values.nextlurebin == "5" && values.countL5 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq)){
            values.countL5 -= 1;
            values.countlureselections -=1;
            list.itemnumbers.appenditem(values.nextitem);
            return trial.selectlures64;        
    } else if (values.countlureselections < values.setsize) {
        list.lures.appenditem(values.nextitem);
        list.stimuluspresentation.appenditem(values.nextitem);
        return trial.selectlures64;
    } else if (values.countlureselections >= values.setsize) {
        list.lures.appenditem(values.nextitem);
        list.stimuluspresentation.appenditem(values.nextitem);
        return trial.selecttargetsandfoils64;
    };
]
/recorddata = false
/trialduration = 0
</trial>

NOTES: trial.selecttargetsandfoils64
* assembles the target and foils list with the itemnumbers that have not been selected as lures yet.
* completes list.stimuluspresentation
<trial selecttargetsandfoils64>
/ontrialbegin = [
    values.nextitem = list.itemnumbers.nextvalue;
    list.targets.appenditem(values.nextitem);
    list.stimuluspresentation.appenditem(values.nextitem);
    values.nextitem = list.itemnumbers.nextvalue;
    list.foils.appenditem(values.nextitem);
]
/trialduration = 0
/branch = [
    if (list.stimuluspresentation.itemcount < (2 * values.setsize)) {
        return trial.selecttargetsandfoils64;
    };
]
/recorddata = false
</trial>

**********************************
Set size = 32
**********************************

NOTES: trial.selectlures32
* randomly assembles list.lures with the constraint that each of the 5 lure types have at least values.setsize/5 lures
in the list
<trial selectlures32>
/ontrialbegin = [
    values.countlureselections += 1;

    if (values.set == "C" && parameters.nr_subsetImages == "32-1") {
        values.nextitem = list.c32_1.nextvalue;        
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-2") {
        values.nextitem = list.c32_2.nextvalue;    
    };
    
    values.nextlurebin = item.lurebins.item(values.nextitem);        

    if (values.nextlurebin == "1") {
        values.countL1 += 1;
    } else if (values.nextlurebin == "2") {
        values.countL2 += 1;
    } else if (values.nextlurebin == "3") {
        values.countL3 += 1;
    } else if (values.nextlurebin == "4") {
        values.countL4 += 1;
    } else if (values.nextlurebin == "5") {
        values.countL5 += 1;
    };
]

/branch = [
    if (values.set == "C" && parameters.nr_subsetImages == "32-1" && values.nextlurebin == "1" && values.countL1 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL1 -= 1;
        values.countlureselections -=1;
        list.c32_1.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-2" && values.nextlurebin == "1" && values.countL1 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL1 -= 1;
        values.countlureselections -=1;
        list.c32_2.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-1" && values.nextlurebin == "2" && values.countL2 > expressions.minlurefreq && (values.countL1 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL2 -= 1;
        values.countlureselections -=1;
        list.c32_1.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-2" && values.nextlurebin == "2" && values.countL2 > expressions.minlurefreq && (values.countL1 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL2 -= 1;
        values.countlureselections -=1;
        list.c32_2.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-1" && values.nextlurebin == "3" && values.countL3 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL3 -= 1;
        values.countlureselections -=1;
        list.c32_1.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-2" && values.nextlurebin == "3" && values.countL3 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL3 -= 1;
        values.countlureselections -=1;
        list.c32_2.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-1" && values.nextlurebin == "4" && values.countL4 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL4 -= 1;
        values.countlureselections -=1;
        list.c32_1.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-2" && values.nextlurebin == "4" && values.countL4 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL4 -= 1;
        values.countlureselections -=1;
        list.c32_2.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-1" && values.nextlurebin == "5" && values.countL5 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq)){
        values.countL5 -= 1;
        values.countlureselections -=1;
        list.c32_1.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-2" && values.nextlurebin == "5" && values.countL5 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq)){
        values.countL5 -= 1;
        values.countlureselections -=1;
        list.c32_2.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.countlureselections < values.setsize) {
        list.lures.appenditem(values.nextitem);
        list.stimuluspresentation.appenditem(values.nextitem);
        return trial.selectlures32;
    } else if (values.countlureselections >= values.setsize) {
        list.lures.appenditem(values.nextitem);
        list.stimuluspresentation.appenditem(values.nextitem);
        return trial.selecttargetsandfoils32;
    };
]
/recorddata = false
/trialduration = 0
</trial>


NOTES: trial.selecttargetsandfoils32
* assembles the target and foils list with the itemnumbers that have not been selected as lures yet.
* completes list.stimuluspresentation
<trial selecttargetsandfoils32>
/ontrialbegin = [
    if (values.set == "C" && parameters.nr_subsetImages == "32-1") {
        values.nextitem = list.c32_1.nextvalue;        
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-2") {
        values.nextitem = list.c32_2.nextvalue;        
    };    
    list.targets.appenditem(values.nextitem);
    list.stimuluspresentation.appenditem(values.nextitem);

    if (values.set == "C" && parameters.nr_subsetImages == "32-1") {
        values.nextitem = list.c32_1.nextvalue;        
    } else if (values.set == "C" && parameters.nr_subsetImages == "32-2") {
        values.nextitem = list.c32_2.nextvalue;        
    };
    list.foils.appenditem(values.nextitem, 1);
]

/trialduration = 0
/branch = [
    if (list.stimuluspresentation.itemcount < (2 * values.setsize)) {
        return trial.selecttargetsandfoils32;        
    };
]
/recorddata = false
</trial>


**********************************
Set size = 20
**********************************

NOTES: trial.selectlures20
* randomly assembles list.lures with the constraint that each of the 5 lure types have at least values.setsize/5 lures
in the list
<trial selectlures20>
/ontrialbegin = [
    values.countlureselections += 1;

    if (values.set == "C" && parameters.nr_subsetImages == "20-1"){
        values.nextitem = list.c20_1.nextvalue;        
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-2") {
        values.nextitem = list.c20_2.nextvalue;        
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-3") {
        values.nextitem = list.c20_3.nextvalue;        
    };

    values.nextlurebin = item.lurebins.item(values.nextitem)        

    if (values.nextlurebin == "1") {
        values.countL1 += 1;
    } else if (values.nextlurebin == "2") {
        values.countL2 += 1;
    } else if (values.nextlurebin == "3") {
        values.countL3 += 1;
    } else if (values.nextlurebin == "4") {
        values.countL4 += 1;
    } else if (values.nextlurebin == "5") {
        values.countL5 += 1;
    };
]
/branch = [
    if (values.set == "C" && parameters.nr_subsetImages == "20-1" && values.nextlurebin == "1" && values.countL1 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL1 -= 1;
        values.countlureselections -=1;
        list.c20_1.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-2" && values.nextlurebin == "1" && values.countL1 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL1 -= 1;
        values.countlureselections -=1;
        list.c20_2.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-3" && values.nextlurebin == "1" && values.countL1 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL1 -= 1;
        values.countlureselections -=1;
        list.c20_3.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-1" && values.nextlurebin == "2" && values.countL2 > expressions.minlurefreq && (values.countL1 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL2 -= 1;
        values.countlureselections -=1;
        list.c20_1.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-2" && values.nextlurebin == "2" && values.countL2 > expressions.minlurefreq && (values.countL1 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL2 -= 1;
        values.countlureselections -=1;
        list.c20_2.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-3" && values.nextlurebin == "2" && values.countL2 > expressions.minlurefreq && (values.countL1 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL2 -= 1;
        values.countlureselections -=1;
        list.c20_3.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-1" && values.nextlurebin == "3" && values.countL3 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL3 -= 1;
        values.countlureselections -=1;
        list.c20_1.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-2" && values.nextlurebin == "3" && values.countL3 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL3 -= 1;
        values.countlureselections -=1;
        list.c20_2.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-3" && values.nextlurebin == "3" && values.countL3 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL3 -= 1;
        values.countlureselections -=1;
        list.c20_3.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-1" && values.nextlurebin == "4" && values.countL4 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL4 -= 1;
        values.countlureselections -=1;
        list.c20_1.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-2" && values.nextlurebin == "4" && values.countL4 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL4 -= 1;
        values.countlureselections -=1;
        list.c20_2.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-3" && values.nextlurebin == "4" && values.countL4 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq || values.countL5 < expressions.minlurefreq)){
        values.countL4 -= 1;
        values.countlureselections -=1;
        list.c20_3.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-1" && values.nextlurebin == "5" && values.countL5 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq)){
        values.countL5 -= 1;
        values.countlureselections -=1;
        list.c20_1.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-2" && values.nextlurebin == "5" && values.countL5 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq)){
        values.countL5 -= 1;
        values.countlureselections -=1;
        list.c20_2.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-3" && values.nextlurebin == "5" && values.countL5 > expressions.minlurefreq && (values.countL2 < expressions.minlurefreq || values.countL3 < expressions.minlurefreq || values.countL4 < expressions.minlurefreq || values.countL1 < expressions.minlurefreq)){
        values.countL5 -= 1;
        values.countlureselections -=1;
        list.c20_3.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.countlureselections < values.setsize) {
        list.lures.appenditem(values.nextitem);
        list.stimuluspresentation.appenditem(values.nextitem);
        return trial.selectlures20;
    } else if (values.countlureselections >= values.setsize) {
        list.lures.appenditem(values.nextitem);
        list.stimuluspresentation.appenditem(values.nextitem);
        return trial.selecttargetsandfoils20;
    };
]


        
/recorddata = false
/ trialduration = 0
</trial>

NOTES: trial.selecttargetsandfoils20
* assembles the target and foils list with the itemnumbers that have not been selected as lures yet.
* completes list.stimuluspresentation
<trial selecttargetsandfoils20>
/ontrialbegin = [
    if (values.set == "C" && parameters.nr_subsetImages == "20-1"){
        values.nextitem = list.c20_1.nextvalue;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-2"){
        values.nextitem = list.c20_2.nextvalue;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-3"){
        values.nextitem = list.c20_3.nextvalue;
    };
    list.targets.appenditem(values.nextitem);
    list.stimuluspresentation.appenditem(values.nextitem);


    if (values.set == "C" && parameters.nr_subsetImages == "20-1"){
        values.nextitem = list.c20_1.nextvalue;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-2"){
        values.nextitem = list.c20_2.nextvalue;
    } else if (values.set == "C" && parameters.nr_subsetImages == "20-3"){
        values.nextitem = list.c20_3.nextvalue;
    };
    list.foils.appenditem(values.nextitem);
]

/trialduration = 0
/branch = [
    if (list.stimuluspresentation.itemcount < (2 * values.setsize)){
        trial.selecttargetsandfoils20;        
    };
]
/recorddata = false
</trial>


*******************************************************************************************************************
*******************************************************************************************************************
    TRIALS: PART1
*******************************************************************************************************************
*******************************************************************************************************************

Notes:
* randomly selects a stimulusitemnumber from list.stimuluspresentation
* depending on chosen picture set (C or D, values.set) => selects the appropriate picture
* presents the picture for parameters.stimulusduration
* collects response during that time (as well as isi)
<trial stimuluspresentation>
/ontrialbegin = [
    values.count_trials += 1;
    values.stimulusselect = list.stimuluspresentation.nextvalue;
        
    trial.stimuluspresentation.insertstimulusframe(picture.target, 1);    
    trial.stimuluspresentation.insertstimulustime(clearscreen, parameters.stimulusduration);
]

/stimulusframes = [1 = responsekeys_part1]
/validresponse = (values.responsekey_indoor, values.responsekey_outdoor)
/beginresponseframe = 1
/responseinterrupt = frames

/ontrialend = [
    trial.stimuluspresentation.resetstimulusframes();
    if (trial.stimuluspresentation.responsetext == values.responsekey_outdoor) {
        values.responseCategory = "outdoor";
    } else if (trial.stimuluspresentation.responsetext == values.responsekey_indoor) {
        values.responseCategory = "indoor";        
    } else {
        values.responseCategory ="no response";        
    };

    values.stimulus = picture.target.currentitem;

]
/branch = [
    if (values.count_trials < (2* values.setsize)) {
        return trial.stimuluspresentation;        
    };
]
/trialduration = (parameters.stimulusduration + parameters.ISI)
/recorddata = true
</trial>


Notes:
* randomly selects a stimulusitemnumber from list.stimuluspresentation
* depending on chosen picture set (C or D, values.set) => selects the appropriate picture
* presents the picture for parameters.stimulusduration
* allows infinite time for response
<trial stimuluspresentation_selfpaced>
/ontrialbegin = [
    values.count_trials += 1;
    values.stimulusselect = list.stimuluspresentation.nextvalue;
    trial.stimuluspresentation_selfpaced.insertstimulusframe(picture.target, 1);        
    trial.stimuluspresentation_selfpaced.insertstimulustime(clearscreen, parameters.stimulusduration);
]

/stimulusframes = [1 = responsekeys_part1]
/validresponse = (values.responsekey_indoor, values.responsekey_outdoor)
/beginresponseframe = 1
/responseinterrupt = frames
/ontrialend = [
    trial.stimuluspresentation_selfpaced.resetstimulusframes();
    if (trial.stimuluspresentation_selfpaced.responsetext == values.responsekey_outdoor) {
        values.responseCategory = "outdoor";        
    } else if (trial.stimuluspresentation_selfpaced.responsetext == values.responsekey_indoor) {
        values.responseCategory = "indoor";        
    } else {
        values.responseCategory="no response";        
    };
        
    values.stimulus = picture.target.currentitem;

]
/branch = [
    if (values.count_trials < (2* values.setsize)) {
        trial.stimuluspresentation_selfpaced;        
    };
]
/recorddata = true
</trial>

*******************************************************************************************************************
*******************************************************************************************************************
    TRIALS: PART2
*******************************************************************************************************************
*******************************************************************************************************************

Notes:
* purpose of trial.part2 is to randomly select the next trial type (target, lure, or foil)
and to keep track of how many trials total have been run during part 2
<trial Part2>
/ontrialbegin = [
    values.count_trials += 1;
    values.trialtype = list.part2.nextvalue;
    values.lurebin = 0;
]
/branch = [
    if (values.trialtype == 1 && parameters.selfpaced == false){
        return trial.target;
    } else if (values.trialtype == 2 && parameters.selfpaced == false){
        return trial.foil;
    } else if (values.trialtype == 3 && parameters.selfpaced == false){
        return trial.lure;
    } else if (values.trialtype == 1 && parameters.selfpaced == true){
        return trial.target_selfpaced;
    } else if (values.trialtype == 2 && parameters.selfpaced == true){
        return trial.foil_selfpaced;
    } else if (values.trialtype == 3 && parameters.selfpaced == true){
        return trial.lure_selfpaced;
    };
]
/trialduration = 0
/recorddata = false
</trial>


Note:
* presents a target for parameters.stimulusduration
* collects response during that time
* updates summary variables
* calls trial.part2
<trial target>
/ontrialbegin = [
    values.stimulusselect = list.targets.nextvalue;
    trial.target.insertstimulusframe(picture.target, 1);
    trial.target.insertstimulustime(clearscreen, parameters.stimulusduration);
]

/stimulusframes = [1 = responsekeys_part2]
/validresponse = (values.responsekey_old, values.responsekey_similar, values.responsekey_new)
/ correctresponse = (values.responsekey_old)

/beginresponseframe = 1
/responseinterrupt = frames

/ontrialend = [
    trial.target.resetstimulusframes();
    if (trial.target.responsetext == values.responsekey_old) {
        values.responseCategory = "old";    
    } else if (trial.target.responsetext == values.responsekey_new) {
        values.responseCategory = "new";    
    } else if (trial.target.responsetext == values.responsekey_similar) {
        values.responseCategory = "similar";    
    } else if (trial.target.response == 0) {
        values.responseCategory = "";
        values.count_noresponses += 1;
    };

    values.stimulus = picture.target.currentitem;
    
    values.count_targets += 1;
    if (trial.target.response != 0) {
        values.count_targets_corr += 1;
        if (trial.target.correct) {
            values.count_oldtargets += 1;
        } else if (trial.target.responsetext == values.responsekey_similar) {
            values.count_simtargets += 1;    
        } else if (trial.target.responsetext == values.responsekey_new) {
            values.count_newtargets += 1        
        };    
    };

]
/trialduration = (parameters.stimulusduration + parameters.ISI)
/recorddata = true
/branch = [return trial.part2;]
</trial>

Note:
* presents a foil for parameters.stimulusduration
* collects response during that time
* updates summary variables
* calls trial.part2
<trial foil>
/ontrialbegin = [
    values.stimulusselect = list.foils.nextvalue;
    trial.foil.insertstimulusframe(picture.foil, 1);             
    trial.foil.insertstimulustime(clearscreen, parameters.stimulusduration);
]

/stimulusframes = [1 = responsekeys_part2]
/validresponse = (values.responsekey_old, values.responsekey_similar, values.responsekey_new)
/ correctresponse = (values.responsekey_new)
/beginresponseframe = 1
/responseinterrupt = frames
/ontrialend = [
    trial.foil.resetstimulusframes();
    
    if (trial.foil.responsetext == values.responsekey_old) {
        values.responseCategory = "old";        
    } else if (trial.foil.responsetext == values.responsekey_new) {
        values.responseCategory = "new";    
    } else if (trial.foil.responsetext == values.responsekey_similar) {
        values.responseCategory = "similar";    
    } else if (trial.foil.response == 0) {
        values.responseCategory = "";
        values.count_noresponses += 1;
    };
    
    values.stimulus = picture.foil.currentitem;
    
    values.count_foils += 1;
    if (trial.foil.response != 0) {
        values.count_foils_corr += 1;
        if (trial.foil.correct) {
            values.count_newfoils += 1;
        } else if (trial.foil.responsetext == values.responsekey_old) {
            values.count_oldfoils += 1            
        } else if (trial.foil.responsetext == values.responsekey_similar) {
            values.count_simfoils += 1;                
        };        
    };
]
/trialduration = (parameters.stimulusduration + parameters.ISI)
/recorddata = true
/branch = [return trial.part2;]
</trial>

Note:
* presents a lure for parameters.stimulusduration
* collects response during that time
* updates summary variables
* calls trial.part2
<trial lure>
/ontrialbegin = [
    values.stimulusselect = list.lures.nextvalue;    
    values.lurebin = item.lurebins.item(values.stimulusselect);    
    
    if (values.lurebin == 1) {
        values.L1 += 1;        
    } else if (values.lurebin == 2) {
        values.L2 += 1;        
    } else if (values.lurebin == 3) {
        values.L3 += 1;        
    } else if (values.lurebin == 4) {
        values.L4 += 1;        
    } else if (values.lurebin == 5) {
        values.L5 += 1;        
    } else {
        values.lurebin = "NA";        
    };

    trial.lure.insertstimulusframe(picture.lure, 1);        
    trial.lure.insertstimulustime(clearscreen, parameters.stimulusduration);
]

/stimulusframes = [1 = responsekeys_part2]
/validresponse = (values.responsekey_old, values.responsekey_similar, values.responsekey_new)
/beginresponseframe = 1
/ correctresponse = (values.responsekey_similar)
/responseinterrupt = frames

/ontrialend = [
    trial.lure.resetstimulusframes();
    
    if (trial.lure.responsetext == values.responsekey_old) {
        values.responseCategory = "old";        
    } else if (trial.lure.responsetext == values.responsekey_new) {
        values.responseCategory = "new";        
    } if (trial.lure.responsetext == values.responsekey_similar) {
        values.responseCategory = "similar";        
    } else if (trial.lure.response == 0) {
        values.responseCategory = "";
        values.count_noresponses += 1;
    };
    
    values.stimulus = picture.lure.currentitem;
    
    values.count_lures += 1;
    if (trial.lure.response != 0) {
        values.count_lures_corr += 1;
        if (trial.lure.correct) {
            values.count_simlures += 1;
        } else if (trial.lure.responsetext == values.responsekey_old) {
            values.count_oldlures += 1;            
        } else if (trial.lure.responsetext == values.responsekey_new) {
            values.count_newlures += 1;            
        };        
    };

    if (values.lurebin == "1"){
        if (trial.lure.responsetext == values.responsekey_old){
            values.L1O +=1;
        } else if (trial.lure.responsetext == values.responsekey_similar){
            values.L1S +=1;
        } else if (trial.lure.responsetext == values.responsekey_new){
            values.L1N +=1;            
        } else if ( trial.lure.response == 0){
            values.L1_NR += 1;
        };
    } else if (values.lurebin == "2"){
        if (trial.lure.responsetext == values.responsekey_old){
            values.L2O +=1;
        } else if (trial.lure.responsetext == values.responsekey_similar){
            values.L2S +=1;
        } else if (trial.lure.responsetext == values.responsekey_new){
            values.L2N +=1;            
        } else if ( trial.lure.response == 0){
            values.L2_NR += 1;
        };
    } else if (values.lurebin == "3"){
        if (trial.lure.responsetext == values.responsekey_old){
            values.L3O +=1;
        } else if (trial.lure.responsetext == values.responsekey_similar){
            values.L3S +=1;
        } else if (trial.lure.responsetext == values.responsekey_new){
            values.L3N +=1;            
        } else if ( trial.lure.response == 0){
            values.L3_NR += 1;
        };
    } else if (values.lurebin == "4"){
        if (trial.lure.responsetext == values.responsekey_old){
            values.L4O +=1;
        } else if (trial.lure.responsetext == values.responsekey_similar){
            values.L4S +=1;
        } else if (trial.lure.responsetext == values.responsekey_new){
            values.L4N +=1;            
        } else if ( trial.lure.response == 0){
            values.L4_NR += 1;
        };
    } else if (values.lurebin == "5"){
        if (trial.lure.responsetext == values.responsekey_old){
            values.L5O +=1;
        } else if (trial.lure.responsetext == values.responsekey_similar){
            values.L5S +=1;
        } else if (trial.lure.responsetext == values.responsekey_new){
            values.L5N +=1;            
        } else if ( trial.lure.response == 0){
            values.L5_NR += 1;
        };
    };
]
/trialduration = (parameters.stimulusduration + parameters.ISI)
/recorddata = true
/branch = [return trial.part2;]
</trial>

Note:
* presents a target for parameters.stimulusduration
* provides infinite time for response
* updates summary variables
* calls trial.part2
<trial target_selfpaced>
/ontrialbegin = [
    values.stimulusselect = list.targets.nextvalue;
    trial.target_selfpaced.insertstimulusframe(picture.target, 1);
    trial.target_selfpaced.insertstimulustime(clearscreen, parameters.stimulusduration);
]

/stimulusframes = [1 = responsekeys_part2]
/validresponse = (values.responsekey_old, values.responsekey_similar, values.responsekey_new)
/ correctresponse = (values.responsekey_old)
/beginresponseframe = 1
/responseinterrupt = frames

/ontrialend = [
    trial.target_selfpaced.resetstimulusframes();
    if (trial.target_selfpaced.responsetext == values.responsekey_old) {
        values.responseCategory = "old";    
    } else if (trial.target_selfpaced.responsetext == values.responsekey_new) {
        values.responseCategory = "new";    
    } else if (trial.target_selfpaced.responsetext == values.responsekey_similar) {
        values.responseCategory = "similar";    
    } else if (trial.target_selfpaced.response == 0) {
        values.responseCategory = "";
        values.count_noresponses += 1;
    };

    values.stimulus = picture.target.currentitem;
    
    values.count_targets += 1;
    if (trial.target_selfpaced.response != 0) {
        values.count_targets_corr += 1;
        if (trial.target_selfpaced.correct) {
            values.count_oldtargets += 1;
        } else if (trial.target_selfpaced.responsetext == values.responsekey_similar) {
            values.count_simtargets += 1;    
        } else if (trial.target_selfpaced.responsetext == values.responsekey_new) {
            values.count_newtargets += 1        
        };    
    };

]
/recorddata = true
/branch = [return trial.part2;]
</trial>

Note:
* presents a foil for parameters.stimulusduration
* provides infinite time for response
* updates summary variables
* calls trial.part2
<trial foil_selfpaced>
/ontrialbegin = [
    values.stimulusselect = list.foils.nextvalue;
    trial.foil_selfpaced.insertstimulusframe(picture.foil, 1);         
    trial.foil_selfpaced.insertstimulustime(clearscreen, parameters.stimulusduration);
]

/stimulusframes = [1 = responsekeys_part2]
/validresponse = (values.responsekey_old, values.responsekey_similar, values.responsekey_new)
/ correctresponse = (values.responsekey_new)
/beginresponseframe = 1
/responseinterrupt = frames
/ontrialend = [
    trial.foil_selfpaced.resetstimulusframes();
    
    if (trial.foil_selfpaced.responsetext == values.responsekey_old) {
        values.responseCategory = "old";        
    } else if (trial.foil_selfpaced.responsetext == values.responsekey_new) {
        values.responseCategory = "new";    
    } else if (trial.foil_selfpaced.responsetext == values.responsekey_similar) {
        values.responseCategory = "similar";    
    } else if (trial.foil_selfpaced.response == 0) {
        values.responseCategory = "";
        values.count_noresponses += 1;
    };
    
    values.stimulus = picture.foil.currentitem;
    
    values.count_foils += 1;
    if (trial.foil_selfpaced.response != 0) {
        values.count_foils_corr += 1;
        if (trial.foil_selfpaced.correct) {
            values.count_newfoils += 1;
        } else if (trial.foil_selfpaced.responsetext == values.responsekey_old) {
            values.count_oldfoils += 1            
        } else if (trial.foil_selfpaced.responsetext == values.responsekey_similar) {
            values.count_simfoils += 1;                
        };        
    };
]
/recorddata = true
/branch = [return trial.part2;]
</trial>

Note:
* presents a lure for parameters.stimulusduration
* provides infinite time for response
* updates summary variables
* calls trial.part2
<trial lure_selfpaced>
/ontrialbegin = [
    values.stimulusselect = list.lures.nextvalue;    
    values.lurebin = item.lurebins.item(values.stimulusselect);    
    
    if (values.lurebin == 1) {
        values.L1 += 1;        
    } else if (values.lurebin == 2) {
        values.L2 += 1;        
    } else if (values.lurebin == 3) {
        values.L3 += 1;        
    } else if (values.lurebin == 4) {
        values.L4 += 1;        
    } else if (values.lurebin == 5) {
        values.L5 += 1;        
    } else {
        values.lurebin = "NA";        
    };

    trial.lure_selfpaced.insertstimulusframe(picture.lure, 1);        
    trial.lure_selfpaced.insertstimulustime(clearscreen, parameters.stimulusduration);
]

/stimulusframes = [1 = responsekeys_part2]
/validresponse = (values.responsekey_old, values.responsekey_similar, values.responsekey_new)
/beginresponseframe = 1
/ correctresponse = (values.responsekey_similar)
/responseinterrupt = frames

/ontrialend = [
    trial.lure_selfpaced.resetstimulusframes();
    
    if (trial.lure_selfpaced.responsetext == values.responsekey_old) {
        values.responseCategory = "old";        
    } else if (trial.lure_selfpaced.responsetext == values.responsekey_new) {
        values.responseCategory = "new";        
    } if (trial.lure_selfpaced.responsetext == values.responsekey_similar) {
        values.responseCategory = "similar";        
    } else if (trial.lure_selfpaced.response == 0) {
        values.responseCategory = "";
        values.count_noresponses += 1;
    };
    
    values.stimulus = picture.lure.currentitem;
    
    values.count_lures += 1;
    if (trial.lure_selfpaced.response != 0) {
        values.count_lures_corr += 1;
        if (trial.lure_selfpaced.correct) {
            values.count_simlures += 1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_old) {
            values.count_oldlures += 1;            
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_new) {
            values.count_newlures += 1;            
        };        
    };

    if (values.lurebin == "1"){
        if (trial.lure_selfpaced.responsetext == values.responsekey_old){
            values.L1O +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_similar){
            values.L1S +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_new){
            values.L1N +=1;            
        } else if ( trial.lure_selfpaced.response == 0){
            values.L1_NR += 1;
        };
    } else if (values.lurebin == "2"){
        if (trial.lure_selfpaced.responsetext == values.responsekey_old){
            values.L2O +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_similar){
            values.L2S +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_new){
            values.L2N +=1;            
        } else if ( trial.lure_selfpaced.response == 0){
            values.L2_NR += 1;
        };
    } else if (values.lurebin == "3"){
        if (trial.lure_selfpaced.responsetext == values.responsekey_old){
            values.L3O +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_similar){
            values.L3S +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_new){
            values.L3N +=1;            
        } else if ( trial.lure_selfpaced.response == 0){
            values.L3_NR += 1;
        };
    } else if (values.lurebin == "4"){
        if (trial.lure_selfpaced.responsetext == values.responsekey_old){
            values.L4O +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_similar){
            values.L4S +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_new){
            values.L4N +=1;            
        } else if ( trial.lure_selfpaced.response == 0){
            values.L4_NR += 1;
        };
    } else if (values.lurebin == "5"){
        if (trial.lure_selfpaced.responsetext == values.responsekey_old){
            values.L5O +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_similar){
            values.L5S +=1;
        } else if (trial.lure_selfpaced.responsetext == values.responsekey_new){
            values.L5N +=1;            
        } else if ( trial.lure_selfpaced.response == 0){
            values.L5_NR += 1;
        };
    };
]
/recorddata = true
/branch = [return trial.part2;]
</trial>

*******************************************************************************************************************
*******************************************************************************************************************
    BLOCKS
*******************************************************************************************************************
*******************************************************************************************************************

***********************************
List Generation Blocks
***********************************

<block Listgeneration>
/branch = [
    if (values.setsize == 64) {
        return block.listgeneration64;            
    } else if (values.setsize == 32) {
        return block.listgeneration32;        
    } else if (values.setsize == 20) {
        return block.listgeneration20;        
    } else {
        return block.listgeneration64;        
    };
]
</block>

<block Listgeneration64>
/trials = [1 = selectlures64]
</block>

<block Listgeneration32>
/trials = [1 = selectlures32]
</block>

<block Listgeneration20>
/trials = [1 = selectlures20]
</block>

***********************************
Part 1
***********************************

<block part1>
/skip = [parameters.selfpaced == true]
/preinstructions = (part1)
/onblockbegin = [values.count_trials = 0;]
/trials = [1= Stimuluspresentation]
</block>

<block part1_selfpaced>
/skip = [parameters.selfpaced == false]
/preinstructions = (part1_selfpaced)
/onblockbegin = [values.count_trials = 0;]
/trials = [1= Stimuluspresentation_selfpaced]
</block>

***********************************
Part 2
***********************************

<block part2>
/skip = [parameters.selfpaced == true]
/onblockbegin = [values.count_trials = 0;]
/stop = [values.count_trials > expressions.part2trialnumber]
/trials = [
    1 = instructions_part2;
    2 = Part2;
]
</block>

<block part2_selfpaced>
/skip = [parameters.selfpaced == false]
/onblockbegin = [values.count_trials = 0;]
/stop = [values.count_trials > expressions.part2trialnumber]
/trials = [
    1 = instructions_part2;
    2 = Part2;
]
</block>

*******************************************************************************************************************
*******************************************************************************************************************
    EXPERIMENT
*******************************************************************************************************************
*******************************************************************************************************************
Note: this exp element automatically runs part1 and part2 (either self-paced or not but not both at the same time -> depends on settings of parameters.selfpaced)

<expt>
/onexptbegin = [
    if (parameters.showresponsekeyreminder == true) {
        text.responsekeys_part1.skip = false;
        text.responsekeys_part2.skip = false;
    } else {
        text.responsekeys_part1.skip = true;
        text.responsekeys_part2.skip = true;
    };
    
    if (parameters.nr_subsetImages == "32-1" || parameters.nr_subsetImages == "32-2") {
        values.setsize = 32;    
    } else if (parameters.nr_subsetImages == "20-1" || parameters.nr_subsetImages == "20-2" || parameters.nr_subsetImages == "20-3") {
        values.setsize = 20;
    } else {
        values.setsize = 64;
    };
    
    list.part2.poolsize = expressions.part2trialnumber;
]
/postinstructions = (end)
/blocks = [
    1 = listgeneration;
    2 = part1;
    3 = part2;
    4 = part1_selfpaced;
    5 = part2_selfpaced;
]
</expt>

*******************************************************************************************************************
                                                End of File
*******************************************************************************************************************

(1) Please do not paste entire scripts into post's body.
(2) If your code requires external files to run, you need to provide those files.
(3) You can attach files to a post per +Insert -> Add File... Put everything needed in a ZIP, attach the ZIP.
(4) I've pointed you to examples previously. Work through those and the tutorials first, please, until you fully understand how they work.
(5) It will often make little sense to rip parts from existing scripts and try to cobble them together, unless you really know what you are doing. The question "which parts do I have to bring over" is not answerable. My recommendation is to code the task you want from scratch, based on what you learned from looking at examples and existing scripts, as you want it.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search