Storing stimuli and its locations to show the same stimuli once again in the same locations and same...


Storing stimuli and its locations to show the same stimuli once again...
Author
Message
aarthiravi
aarthiravi
Associate Member (270 reputation)Associate Member (270 reputation)Associate Member (270 reputation)Associate Member (270 reputation)Associate Member (270 reputation)Associate Member (270 reputation)Associate Member (270 reputation)Associate Member (270 reputation)Associate Member (270 reputation)
Group: Forum Members
Posts: 15, Visits: 139
Hi,
I have just started using Inquisit for two weeks now.
I am trying to create an experiment where 3 images are shown one after the other in 3 different locations on the screen. 
I am randomly pairing 3 images together without replacement after which they will be presented in the sequence below. I would like to present the same sequence, the same pairings, same image locations once again to the same participant. 

The next participant will get a different pairing and so on.

So one block would be
Study trial :
1st presentation: Fixation cross -> image1 -> image2-> image3 -> Fixation cross -> image4 -> image5-> image6 -> Fixation cross -> image7 -> image8-> image9 -> Fixation cross -> image10 -> image11-> image12
Repeat presentation: Fixation cross -> image1 -> image2-> image3 -> Fixation cross -> image4 -> image5-> image6 -> Fixation cross -> image7 -> image8-> image9 -> Fixation cross -> image10 -> image11-> image12

Test Trial: ...

More blocks of the same type would follow with a study trial (fixation plus 12 images presented twice) and then a test trial immediately after.
 
So far, I have been successful in randomly pairing the images in groups of 3, presenting the images, storing their locations, and the name of the image presented.

Please help me code how to present the same sequence once more.
Thanks!

This is my code so far...
**************************************************************************************************************
**************************************************************************************************************
    PARAMETERS
**************************************************************************************************************
**************************************************************************************************************
<parameters>
/ stimsize = 17%
/ stimulusduration = 1000
</parameters>

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

<item oldstims>
/1="1.jpg"
/2="2.jpg"
/3="3.jpg"
/4="4.jpg"
/5="5.jpg"
/6="6.jpg"
/7="7.jpg"
/8="8.jpg"
/9="9.jpg"
/10="10.jpg"
/11="11.jpg"
/12="12.jpg"
</item>

<item fixationcross>
/1="fixation.png"
</item>

<picture fixation>
/ items = item.fixationcross
/ position = (50%, 50%)
/ size = (40%,40%)
/ valign = center
/ halign = center
</picture>

<picture tripletimage>
/ items = item.oldstims
/ select = values.tripletimage
/ size = (parameters.stimsize, parameters.stimsize)
</picture>

**************************************************************************************************************
**************************************************************************************************************
    VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************
<values>
/ index = 1
/ tripletimage = 1
</values>

**************************************************************************************************************
**************************************************************************************************************
    LISTS    
**************************************************************************************************************
**************************************************************************************************************
<defaults>
/ canvasaspectratio = (1,1)
/ minimumversion = "6.5.1.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txbgcolor = white
/ txcolor = black
/ screencolor = white
</defaults>

<list xpos>
/ items = (25%, 75%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list ypos>
/ items = (25%, 25%, 75%)
/ selectionmode = list.xpos.currentindex
/ selectionrate = always
</list>

<list imagenumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
/ selectionrate = always
</list>

<list tripletnumbers>
/ select = values.index
/ selectionrate = always
</list>

**************************************************************************************************************
**************************************************************************************************************
    DATA
**************************************************************************************************************
**************************************************************************************************************
***********************
raw data file
***********************
<data>
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum, stimulusnumber, stimulusitem, picture.tripletimage.hposition, picture.tripletimage.vposition,
parameters.stimulusduration, expressions.canvasRatio)
</data>

<expressions>
/canvasRatio = (display.canvasheight/display.height)*100
/locationx =
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS     
**************************************************************************************************************
**************************************************************************************************************
<trial pairings>
/ ontrialbegin = [

    if (parameters.randomPairings == 1){
        values.index = list.tripletnumbers.nextvalue;
        list.imagenumbers.insertitem(values.index, 1);    
    
    } else {
        values.index += 1;
        list.imagenumbers.insertitem(values.index, 1);    
    };

]
/ branch = [
    if (list.imagenumbers.itemcount < 3){
        return trial.pairings;
    };
]
/ recorddata = false
/ trialduration = 0
</trial>

<trial encodingfixation>
/ stimulustimes = [0=fixation]
/ timeout = parameters.stimulusduration
</trial>

<trial encodingimage>
/ ontrialbegin = [
    values.tripletimage = list.imagenumbers.nextindex;
    
    picture.tripletimage.hposition = list.xpos.nextvalue;
    picture.tripletimage.vposition = list.ypos.nextvalue;]
    / stimulustimes = [0=picture.tripletimage]
    / timeout = parameters.stimulusduration
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCKS
**************************************************************************************************************
**************************************************************************************************************
<block pairings>
/ onblockbegin = [
    list.imagenumbers.reset();
    values.index = 0;
]
/ trials = [1 = pairings]
</block>

<block encodingphase>
/ trials = [1 = encodingfixation; 2 = encodingimage; 3 = encodingimage; 4 = encodingimage;
5 = encodingfixation; 6 = encodingimage; 7 = encodingimage; 8 = encodingimage;
9 = encodingfixation; 10 = encodingimage; 11 = encodingimage; 12 = encodingimage;
13 = encodingfixation; 14 = encodingimage; 15 = encodingimage; 16 = encodingimage;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************

<expt>
/ blocks = [1= pairings; 2 = encodingphase]
</expt>
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
aarthiravi - 3 Years Ago
Dave - 3 Years Ago
Dave - 3 Years Ago
aarthiravi - 3 Years Ago
Dave - 3 Years Ago
aarthiravi - 3 Years Ago
Dave - 3 Years Ago
aarthiravi - 3 Years Ago
Dave - 3 Years Ago
aarthiravi - 3 Years Ago
                     Can you spot what's missing here?
Dave - 3 Years Ago
                         Oh! A semicolon! Oops. Thanks for pointing that out.
aarthiravi - 3 Years Ago
                         So, when I run the experiment, the messages window wouldn't point that...
aarthiravi - 3 Years Ago
                             I mean it's not a bug, it's a syntax error. How to check for syntax...
aarthiravi - 3 Years Ago
                                 The parser can catch a lot of syntax errors, but his one you just have...
Dave - 3 Years Ago
                                     Okay, got it! Thank you so much Dave!
aarthiravi - 3 Years Ago
aarthiravi - 3 Years Ago
Dave - 3 Years Ago
aarthiravi - 3 Years Ago
Dave - 3 Years Ago

Reading This Topic

Explore
Messages
Mentions
Search