importing stim lists


importing stim lists

Author
Message
sdubrow
sdubrow
Distinguished Member
Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)

Group: Forum Members
Posts: 26, Visits: 143
Hello,

I was wondering if there is anyway to import a list of stimuli from a text file in some automated way to avoid manually entering each stimulus. I have over 200 stimuli with a different precise sequence for each subject. Any thoughts on how to go about automating this would be much appreciated. 

Thanks,
Sarah
Tags
Dave
Dave
Supreme Being
Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)

Group: Administrators
Posts: 9.8K, Visits: 47K
You can import stimulus lists from text files under the condition that the lists are in proper Inquisit syntax format via <include> elements. You can even import them based on e.g. the entered subject id to administer specific item sets to different subjects using the /precondition attribute. Quick example for two subjects 1 and 2:

--- iqx script file ---
<include>
/ precondition = [script.subjectid == 1]
/ file = "s_01_items.txt"
</include>

<include>
/ precondition = [script.subjectid == 2]
/ file = "s_02_items.txt"
</include>

<block myblock>
/ trials = [1-4 = mytrial]
</block>

<trial mytrial>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = myitems
/ select = sequence
</text>

--- file called s_01_items.txt with the following contents ---
<item myitems>
/1="A"
/1="B"
/1="C"
/1="D"
</item>

--- file called s_02_items.txt with the following contents ---
<item myitems>
/1="E"
/1="F"
/1="G"
/1="H"
</item>

As for getting you stimulus lists into proper Inquisit syntax to begin with, you should be able to make the application you generate(d) those lists with to output something along those lines. (Note that the numbering in the <item> element does not actually matter.)

Hope this helps.

Dave
Dave
Supreme Being
Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)

Group: Administrators
Posts: 9.8K, Visits: 47K
There are a couple of options here and the "best" approach would largely depend on the code you already have. It may be easiest to also put the varying <block> specification in the to be <include>d files. Building on the example in the previous response, you'd do:

--- iqx script file ---
<include>
/ precondition = [script.subjectid == 1]
/ file = "s_01_items.txt"
</include>

<include>
/ precondition = [script.subjectid == 2]
/ file = "s_02_items.txt"
</include>

<expt myexpt>
/ blocks = [1=myblock]
</expt>

<trial mytrial>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = myitems
/ select = sequence
</text>

--- file called s_01_items.txt with the following contents ---
<block myblock>
/ trials = [1-4 = mytrial]
</block>

<item myitems>
/1="A"
/1="B"
/1="C"
/1="D"
</item>

--- file called s_02_items.txt with the following contents ---
<block myblock>
/ trials = [1-8 = mytrial]
</block>

<item myitems>
/1="E"
/1="F"
/1="G"
/1="H"
/1="I"
/1="J"
/1="K"
/1="L"
</item>

which would run 4 trials for subject #1 and 8 trials for subject #2.

Dave
Dave
Supreme Being
Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)Supreme Being (708K reputation)

Group: Administrators
Posts: 9.8K, Visits: 47K
No, the /trials attribute has nothing to do with how stimuli are selected. That's controlled via the respective stimulus element's (<text>, <picture>, etc.) /select attribute. In the examples I gave,

<text mytext>
/ items = myitems
/ select = sequence
</text>

is what determines stimuli to be presented in the order given in the <item> element.

GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search