Millisecond Forums

random assignment of pictures by participant


https://www.millisecond.com/forums/Topic2623.aspx

By RBalas - 3/24/2009

Hi there,

I've got an issue.
I have two sets of pictures: affective and neutral (4 pics in each class). What I have to do is to randomly assign affective to neutral pics. But, those once assigned pics must be kept constant for each participant, because I have to present each pair of pics multiple times (in random order) for each participant.

I assume that such random assignment should be done once only in the experiment (each new participant engages in a new experimental session). Am I right?

I do not have slightest idea how to do that. Can you help me out with this?

All the best,
Robert
By Dave - 3/24/2009

Hmm, maybe there's an easier way that I'm not seeing right now, but here's what I would do to pull this off. First, set up two picture elements and tie them together using the 'current' option in '/ select':

<picture affective_pics>
/ items = affective_pics
/ select = noreplace
[...]
</picture>

<picture neutral_pics>
/ items = neutral_pics
/ select = current(affective_pics)
[...]
</picture>

Next set up two corresponding <item> elements to draw from. The key here is to leave these *empty*:


<item affective_pics>
</item>

<item neutral_pics>
</item>

Then, define two <counter> elements that contain the actual *names* of the picture files you're going to use:

<counter setup_affective_pics>
/ items = ("affective_pic01.jpg", "affective_pic02.jpg", "affective_pic03.jpg", "affective_pic04.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

<counter setup_neutral_pics>
/ items = ("neutral_pic01.jpg", "neutral_pic02.jpg", "neutral_pic03.jpg", "neutral_pic04.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

Finally, define a dummy trial that draws from these counters and thus populates the empty <item> elements.

<trial setup_pairings>
/ ontrialbegin = [item.affective_pics.item=counter.setup_affective_pics.selectedvalue]
/ ontrialbegin = [item.neutral_pics.item=counter.setup_neutral_pics.selectedvalue]
/ trialduration = 0
</trial>

At the onset of the experiment, run the dummy trial four times. Lo and behold, you'll have randomly generated affective-neutral pairings that will be kept constant accross the entire experiment.

Check out the attached file for a working demonstration.

Best wishes from a fellow Inquisit user,
~Dave


By RBalas - 3/24/2009

Dave,

Works great! Thank you.

Best,
Robert
By Georg - 10/21/2012

Hi Dave, I have the same problem as RBalas. I tried the elements you described and at least I got them right in the sense that Inquisit does not complain. But I still have not solved the problem - the CS are still randomly assigned to the US withing the same participant. I probably did something wrong in one of the other elements. Unfortunately I could not open the script you attached. I guess that's what will solve my problem: I probably should only see an entire script that works so I can see what I did wrong within the other elements... Is your script still online? As I said I could not open it. Or is there anonther script that does the same?


Thank you and Greetings


Georg

By Dave - 10/21/2012

Unfortunately I do not have the script around anymore. However, the instructions in the original reply should be sufficient to get you going. I recommend you first reproduce those in a minimal test case script, then extend / apply to your own procedure.


Regards,


~Dave

By st2pa - 9/30/2013

Hello,


I was hoping someone could help me with a related problem to the one addressed in this post.  


In my study, I have 20 faces of White people and 20 faces of Black people.  Furthermore, I have 20 applications that should be 'accepted', and 20 that should be 'rejected'.  I would need to randomly generate pairings of 10 White/Accept, 10 White/Reject, 10 Black/Accept, 10 Black/Reject.


Furthermore, those pairings need to be created once at the beginning of the study so that participants can be shown them very quickly so as to see the full applicant pool, and then later those same pairings need to be shown again so the participant can make accept/reject decisions for each application/image pairing.  The code above was able to get me started, but I am pretty stumped.  Here is what I have.  Any suggestions would really help me out:


<picture face_pics>
/ items = face_pics
/ select = noreplace
[...]
</picture>

<picture application_pics>
/ items = application_pics
/ select = current(face_pics)
</picture>


<item face_pics>
</item>

<item application_pics>
</item>


Then, I made counters for each of the White, Black, Accept, Reject stimuli.


<counter setup_white_pics>


/ items = ("W1.bmp", "W2.bmp", "W3.bmp", "W4.bmp","W5.bmp","W6.bmp","W7.bmp","W8.bmp","W9.bmp","W10.bmp","W11.bmp", "W12.bmp", "W13.bmp", "W14.bmp","W15.bmp","W16.bmp","W17.bmp","W18.bmp",W19.bmp","W20.bmp")


/ select = noreplace


/ selectionrate = trial


</counter>


<counter setup_black_pics>


/ items = ("B1.bmp", "B2.bmp", "B3.bmp", "B4.bmp","B5.bmp","B6.bmp","B7.bmp","B8.bmp","B9.bmp","B10.bmp","B11.bmp", "B12.bmp", "B13.bmp", "B14.bmp","B15.bmp","B16.bmp","B17.bmp","B18.bmp",B19.bmp","B20.bmp")


/ select = noreplace


/ selectionrate = trial


</counter>


<counter setup_accept_pics>


/ items = ("Accept1.bmp", "Accept2.bmp", "Accept3.bmp", "Accept4.bmp","Accept5.bmp","Accept6.bmp","Accept7.bmp","Accept8.bmp","Accept9.bmp","Accept10.bmp","Accept11.bmp", "Accept12.bmp", "Accept13.bmp", "Accept14.bmp","Accept15.bmp","Accept16.bmp","Accept17.bmp","Accept18.bmp",Accept19.bmp","Accept20.bmp")


/ select = noreplace


/ selectionrate = trial


</counter>


<counter setup_reject_pics>


/ items = ("Reject1.bmp", "Reject2.bmp", "Reject3.bmp", "Reject4.bmp","Reject5.bmp","Reject6.bmp","Reject7.bmp","Reject8.bmp","Reject9.bmp","Reject10.bmp","Reject11.bmp", "Reject12.bmp", "Reject13.bmp", "Reject14.bmp","Reject15.bmp","Reject16.bmp","Reject17.bmp","Reject18.bmp",Reject19.bmp","Reject20.bmp")


/ select = noreplace


/ selectionrate = trial


</counter>


Then I made trial setup pairings for each of the four combinations


trial setup_pairingsaw>


/ ontrialbegin = [item.face_pics.item=counter.setup_white_pics.selectedvalue]


/ ontrialbegin = [item.application_pics.item=counter.setup_accept_pics.selectedvalue]


/ trialduration = 0


/ recorddata = false


</trial>


<trial setup_pairingsrw>


/ ontrialbegin = [item.face_pics.item=counter.setup_white_pics.selectedvalue]


/ ontrialbegin = [item.application_pics.item=counter.setup_reject_pics.selectedvalue]


/ trialduration = 0


/ recorddata = false


</trial>


<trial setup_pairingsab>


/ ontrialbegin = [item.face_pics.item=counter.setup_black_pics.selectedvalue]


/ ontrialbegin = [item.application_pics.item=counter.setup_accept_pics.selectedvalue]


/ trialduration = 0


/ recorddata = false


</trial>


<trial setup_pairingsrb>


/ ontrialbegin = [item.face_pics.item=counter.setup_black_pics.selectedvalue]


/ ontrialbegin = [item.application_pics.item=counter.setup_reject_pics.selectedvalue]


/ trialduration = 0


/ recorddata = false


</trial>


<block pairings>


/ trials = [1-40=noreplace(setup_pairingsaw, setup_pairingsrw, setup_pairingsab, setup_pairingsrb)]


</block>


Finally, I created trials and blocks for the initial 'Orientation' and the final 'Testing' session.


<trial orientaw>


/ stimulusframes = [1=app_pics,image_pics]


/timeout=500


</trial>


<trial orientrw>


/ stimulusframes = [1=app_pics,image_pics]


/timeout=500


</trial>


<trial orientab>


/ stimulusframes = [1=app_pics,image_pics]


/timeout=500


</trial>


<trial orientrb>


/ stimulusframes = [1=app_pics,image_pics]


/timeout=500


</trial>


<block orient>


/ trials = [1-40=noreplace(orientab,orientrb,orientaw,orientrw)]


</block>


<trial testab>


/ stimulusframes = [1=app_pics,AcceptButton,RejectButton,image_pics]


/ validresponse = (AcceptButton,RejectButton)


/timeout=100


</trial>


<trial testrb>


/ stimulusframes = [1=app_pics,AcceptButton,RejectButton,image_pics]


/ validresponse = (AcceptButton,RejectButton)


/timeout=100


</trial>


<trial testaw>


/ stimulusframes = [1=app_pics,AcceptButton,RejectButton,image_pics]


/ validresponse = (AcceptButton,RejectButton)


/timeout=100


</trial>


<trial testrw>


/ stimulusframes = [1=app_pics,AcceptButton,RejectButton,image_pics]


/ validresponse = (AcceptButton,RejectButton)


/timeout=100


</trial>


<block test>


/ trials = [1-40=noreplace(testab,testrb,testaw,testrw)]


</block>


<expt >


/blocks =  [1=pairings;2=orient; 3=test]


</expt>



This really isn't working and I am pretty stuck. Thanks for your help.




By Dave - 9/30/2013

This really isn't working


#1: It would be helpful if you actually could elaborate on what isn't working. A blanket statement doesn't give anyone anything to work with.


#2: There are inconsistencies in the code you posted which make it impossible to figure anything out. For example, you give


<picture face_pics>
/ items = face_pics
/ select = noreplace
[...]
</picture>

<picture application_pics>
/ items = application_pics
/ select = current(face_pics)
</picture


but then reference completely different <picture> elements in your code:



<trial testab>


/ stimulusframes = [1=app_pics,AcceptButton,RejectButton,image_pics]


/ validresponse = (AcceptButton,RejectButton)


/timeout=100


</trial>



#3: All your trials sample from those same <picture> elements:



<trial orientaw>


/ stimulusframes = [1=app_pics,image_pics]


/timeout=500


</trial>


<trial orientrw>


/ stimulusframes = [1=app_pics,image_pics]


/timeout=500


</trial>


<trial orientab>


/ stimulusframes = [1=app_pics,image_pics]


/timeout=500


</trial>


<trial orientrb>


/ stimulusframes = [1=app_pics,image_pics]


/timeout=500


</trial>



These contain *the complete set* of 40 pairings you set up. There is no reason why e.g <trial orientaw> should sample an 'accept/white' pairing from this pool of 40 pairings. If you want your trials to do this, you need to write stuff to separate elements and have the respecitve trial use the "correct" ones.

By st2pa - 9/30/2013

I apologize for my inconsistencies-- I was trying to reformat the code to make it easier to understand.  Below is my attempt to solve the problem by specifying different picture and trial types, but it is still not giving me exactly what I am looking for.  


Within both the orientation and the test blocks, each face and each application only appears once, which is good.  The error comes in these face-application pairings not repeating themselves across blocks.  Thanks for your help...



<picture AcceptButton>


/items = ("Accept.jpg")


/ position = (75%,80%)


/size = (16%,16%)


</picture>


<picture RejectButton>


/items = ("Reject.jpg")


/ position = (25%,80%)


/size = (16%,16%)


</picture>


<picture accept_pics>


/ items = accept_pics


/ select = noreplace


</picture>


<picture reject_pics>


/ items = reject_pics


/ select = noreplace


</picture>


<picture white_pics>


/ items = white_pics


/ select = noreplace


</picture>


<picture black_pics>


/ items = black_pics


/ select = noreplace


</picture>


<item white_pics>


</item>


<item accept_pics>


</item>


<item black_pics>


</item>


<item reject_pics>


</item>


<counter setup_white_pics>


/ items = ("W1S.bmp", "W2S.bmp", "W3S.bmp", "W4S.bmp",


"W5S.bmp", "W6S.bmp", "W8S.bmp", "W9S.bmp",


"W11S.bmp", "W13S.bmp", "W19S.bmp", "W20S.bmp",


"W21S.bmp", "W23S.bmp", "W25S.bmp", "W26S.bmp",


"W28S.bmp", "W30S.bmp", "W31S.bmp", "W37S.bmp")


/ select = noreplace


/ selectionrate = trial


</counter>


<counter setup_black_pics>


/ items = ("B1S.bmp", "B2S.bmp", "B3S.bmp", "B4S.bmp",


"B5S.bmp", "B6S.bmp", "B8S.bmp", "B9S.bmp",


"B10S.bmp", "B12S.bmp", "B984S.bmp", "B985S.bmp",


"B986S.bmp", "B987S.bmp", "B988S.bmp", "B990S.bmp",


"B991S.bmp", "B993S.bmp", "B994S.bmp", "B997S.bmp")


/ select = noreplace


/ selectionrate = trial


</counter>


<counter setup_accept_pics>


/ items = ("App14_1Template.jpg", "App14_2Template.jpg", "App14_3Template.jpg", "App14_4Template.jpg",


"App14_5Template.jpg", "App14_6Template.jpg", "App14_7Template.jpg", "App14_8Template.jpg",


"App14_9Template.jpg", "App14_10Template.jpg", "App14_11Template.jpg", "App14_12Template.jpg",


"App14_13Template.jpg", "App14_14Template.jpg", "App14_15Template.jpg", "App14_16Template.jpg",


"App14_17Template.jpg", "App14_18Template.jpg", "App14_19Template.jpg", "App14_20Template.jpg")


/ select = noreplace


/ selectionrate = trial


</counter>


<counter setup_reject_pics>


/ items = ("App13_1Template.jpg", "App13_2Template.jpg", "App13_3Template.jpg", "App13_4Template.jpg",


"App13_5Template.jpg", "App13_6Template.jpg", "App13_7Template.jpg", "App13_8Template.jpg",


"App13_9Template.jpg", "App13_10Template.jpg", "App13_11Template.jpg", "App13_12Template.jpg",


"App13_13Template.jpg", "App13_14Template.jpg", "App13_15Template.jpg", "App13_16Template.jpg",


"App13_17Template.jpg", "App13_18Template.jpg", "App13_19Template.jpg", "App13_20Template.jpg")


/ select = noreplace


/ selectionrate = trial


</counter>


<trial setup_pairingsaw>


/ ontrialbegin = [item.white_pics.item=counter.setup_white_pics.selectedvalue]


/ ontrialbegin = [item.accept_pics.item=counter.setup_accept_pics.selectedvalue]


/ trialduration = 0


/ recorddata = false


</trial>


<trial setup_pairingsrw>


/ ontrialbegin = [item.white_pics.item=counter.setup_white_pics.selectedvalue]


/ ontrialbegin = [item.reject_pics.item=counter.setup_reject_pics.selectedvalue]


/ trialduration = 0


/ recorddata = false


</trial>


<trial setup_pairingsab>


/ ontrialbegin = [item.black_pics.item=counter.setup_black_pics.selectedvalue]


/ ontrialbegin = [item.accept_pics.item=counter.setup_accept_pics.selectedvalue]


/ trialduration = 0


/ recorddata = false


</trial>


<trial setup_pairingsrb>


/ ontrialbegin = [item.black_pics.item=counter.setup_black_pics.selectedvalue]


/ ontrialbegin = [item.reject_pics.item=counter.setup_reject_pics.selectedvalue]


/ trialduration = 0


/ recorddata = false


</trial>


<trial orientaw>


/ stimulusframes = [1=accept_pics,white_pics]


/timeout=500


</trial>


<trial orientrw>


/ stimulusframes = [1=reject_pics,white_pics]


/timeout=500


</trial>


<trial orientab>


/ stimulusframes = [1=accept_pics,black_pics]


/timeout=500


</trial>


<trial orientrb>


/ stimulusframes = [1=reject_pics,black_pics]


/timeout=500


</trial>


<trial testaw>


/ stimulusframes = [1=accept_pics,AcceptButton,RejectButton,white_pics]


/ correctresponse = (AcceptButton)


/ validresponse = (AcceptButton,RejectButton)


</trial>


<trial testrw>


/ stimulusframes = [1=reject_pics,AcceptButton,RejectButton,white_pics]


/ correctresponse = (RejectButton)


/ validresponse = (AcceptButton,RejectButton)


</trial>


<trial testab>


/ stimulusframes = [1=accept_pics,AcceptButton,RejectButton,black_pics]


/ correctresponse = (AcceptButton)


/ validresponse = (AcceptButton,RejectButton)


</trial>


<trial testrb>


/ stimulusframes = [1=reject_pics,AcceptButton,RejectButton,black_pics]


/ correctresponse = (RejectButton)


/ validresponse = (AcceptButton,RejectButton)


</trial>


<block pairings>


/ trials = [1-40=noreplace(setup_pairingsaw,setup_pairingsrw,setup_pairingsab,setup_pairingsrb)]


</block>


<block orient>


/ trials = [1-40=noreplace(orientaw,orientrw,orientab,orientrb)]


</block>


<block test>


/ trials = [1-40=noreplace(testaw,testrw,testab,testrb)]


</block>

By Dave - 9/30/2013

The error comes in these face-application pairings not repeating themselves across blocks


If you want selection pools to be maintained across blocks, you need to make use of the /resetinterval attribute. Details can be found in the documentation.


However, given that you have 40 pairings *and* each block runs 40 trials (i.e. exhausts all of the pairings), how could they possibly *not* repeat???

By st2pa - 9/30/2013

I am sorry for not being clearer.  I would like the face-application pairings to repeat themselves across blocks.  That is, the combinations that occur during the orientation block (for example, the fifth White face and second Reject application) should also occur during the testing block.  Altering the resetinterval attribute does not appear to be maintaining the combinations.


By Dave - 9/30/2013

You do realize that none of your <picture> elements have dependencies defined, don't you? As such there are no pairs that could possibly be maintained -- all your elements sample randomly without replacement from the items you feed into them.


You had the dependency right in your original post, now you've removed it.

By st2pa - 9/30/2013

Yes, I have tried to institute some dependencies but none of them have been able to solve the problem. It only seems to increase repetitions of certain stimuli within blocks. I am likely just using them incorrectly.  Here is the current code I am working with...



<picture white_pics>


/ items = white_pics


/ select = noreplace


</picture>



<picture black_pics>


/ items = black_pics


/ select = noreplace


</picture>



<picture accept_pics>


/ items = accept_pics


/ select = current(white_pics)


</picture>



<picture reject_pics>


/ items = reject_pics


/ select = current(black_pics)


</picture>



By Dave - 9/30/2013


<picture accept_pics>


/ items = accept_pics


/ select = current(white_pics)


</picture>



This means the item chosen for the above element depends on the item chosen for <picture white_pics>. Now look at one relevant <trial>:


<trial testaw>




/ stimulusframes = [1=accept_pics,AcceptButton,RejectButton,white_pics]




/ correctresponse = (AcceptButton)




/ validresponse = (AcceptButton,RejectButton)




</trial>


Which element is used first? You've got the dependency the wrong way round.


Also:


<trial testab>




/ stimulusframes = [1=accept_pics,AcceptButton,RejectButton,black_pics]




/ correctresponse = (AcceptButton)




/ validresponse = (AcceptButton,RejectButton)




</trial>


We have already established above that the item used by <picture accept_pics> depends on <picture white_pics>. It has no relation whatsoever to <picture black_pics>, so the above <trial> definition does not make any sense.


I think you need to take a step back. Forget about setting up pairs randomly for the moment. Instead just take the 1st 10 white pics and pair them with the 1st 10 accept stims, take the next 10 white pics and pair them with the 1st 10 reject items (and so forth for the black pics). Once you've got that set up, adding in the random pair generation is easy.

By st2pa - 9/30/2013

Yes, the following code gives me what I want if I define subsets:


<picture accept_pics_white1>


/ items = accept_pics_white1


/select=noreplace


</picture>



<picture accept_pics_black1>


/ items = accept_pics_black1


/select=noreplace


</picture>



<picture reject_pics_white1>


/ items = reject_pics_white1


/select=noreplace


</picture>



<picture reject_pics_black1>


/ items = reject_pics_black1


/select=noreplace


</picture>



<picture white_pics_accept1>


/ items = white_pics_accept1


/ select = current(accept_pics_white1)


</picture>



<picture black_pics_accept1>


/ items = black_pics_accept1


/ select = current(accept_pics_black1)


</picture>



<picture white_pics_reject1>


/ items = white_pics_reject1


/ select = current(reject_pics_white1)


</picture>



<picture black_pics_reject1>


/ items = black_pics_reject1


/ select = current(reject_pics_black1)


</picture>



<item accept_pics_white1>


</item>



<item accept_pics_black1>


</item>



<item reject_pics_white1>


</item>



<item reject_pics_black1>


</item>



<item white_pics_accept1>


</item>



<item black_pics_accept1>


</item>



<item white_pics_reject1>


</item>



<item black_pics_reject1>


</item>



<counter setup_accept_pics_white1>


/ items = ("App14_1Template.jpg", "App14_2Template.jpg", "App14_3Template.jpg", "App14_4Template.jpg",


"App14_5Template.jpg", "App14_6Template.jpg", "App14_7Template.jpg", "App14_8Template.jpg",


"App14_9Template.jpg", "App14_10Template.jpg")


/ select = noreplace


/ selectionrate = trial


</counter>



<counter setup_accept_pics_black1>


/ items = ("App14_10Template.jpg", "App14_11Template.jpg", "App14_12Template.jpg",


"App14_13Template.jpg", "App14_14Template.jpg", "App14_15Template.jpg", "App14_16Template.jpg",


"App14_17Template.jpg", "App14_18Template.jpg", "App14_19Template.jpg", "App14_20Template.jpg")


/ select = noreplace


/ selectionrate = trial


</counter>



<counter setup_reject_pics_white1>


/ items = ("App13_1Template.jpg", "App13_2Template.jpg", "App13_3Template.jpg", "App13_4Template.jpg",


"App13_5Template.jpg", "App13_6Template.jpg", "App13_7Template.jpg", "App13_8Template.jpg",


"App13_9Template.jpg", "App13_10Template.jpg")


/ select = noreplace


/ selectionrate = trial


</counter>



<counter setup_reject_pics_black1>


/ items = ("App13_11Template.jpg", "App13_12Template.jpg",


"App13_13Template.jpg", "App13_14Template.jpg", "App13_15Template.jpg", "App13_16Template.jpg",


"App13_17Template.jpg", "App13_18Template.jpg", "App13_19Template.jpg", "App13_20Template.jpg")


/ select = noreplace


/ selectionrate = trial


</counter>



<counter setup_white_pics_accept1>


/ items = ("W1S.bmp", "W2S.bmp", "W3S.bmp", "W4S.bmp",


"W5S.bmp", "W6S.bmp", "W8S.bmp", "W9S.bmp",


"W11S.bmp", "W13S.bmp")


/ select = noreplace


/ selectionrate = trial


</counter>



<counter setup_white_pics_reject1>


/ items = ("W19S.bmp", "W20S.bmp",


"W21S.bmp", "W23S.bmp", "W25S.bmp", "W26S.bmp",


"W28S.bmp", "W30S.bmp", "W31S.bmp", "W37S.bmp")


/ select = noreplace


/ selectionrate = trial


</counter>



<counter setup_black_pics_accept1>


/ items = ("B1S.bmp", "B2S.bmp", "B3S.bmp", "B4S.bmp",


"B5S.bmp", "B6S.bmp", "B8S.bmp", "B9S.bmp",


"B10S.bmp", "B12S.bmp")


/ select = noreplace


/ selectionrate = trial


</counter>



<counter setup_black_pics_reject1>


/ items = ("B984S.bmp", "B985S.bmp",


"B986S.bmp", "B987S.bmp", "B988S.bmp", "B990S.bmp",


"B991S.bmp", "B993S.bmp", "B994S.bmp", "B997S.bmp")


/ select = noreplace


/ selectionrate = trial


</counter>



<trial setup_pairingsaw>


/ ontrialbegin = [item.accept_pics_white1.item=counter.setup_accept_pics_white1.selectedvalue]


/ ontrialbegin = [item.white_pics_accept1.item=counter.setup_white_pics_accept1.selectedvalue]


/ trialduration = 0


/ recorddata = false


</trial>



<trial setup_pairingsab>


/ ontrialbegin = [item.accept_pics_black1.item=counter.setup_accept_pics_black1.selectedvalue]


/ ontrialbegin = [item.black_pics_accept1.item=counter.setup_black_pics_accept1.selectedvalue]


/ trialduration = 0


/ recorddata = false


</trial>



<trial setup_pairingsrw>


/ ontrialbegin = [item.reject_pics_white1.item=counter.setup_reject_pics_white1.selectedvalue]


/ ontrialbegin = [item.white_pics_reject1.item=counter.setup_white_pics_reject1.selectedvalue]


/ trialduration = 0


/ recorddata = false


</trial>



<trial setup_pairingsrb>


/ ontrialbegin = [item.reject_pics_black1.item=counter.setup_reject_pics_black1.selectedvalue]


/ ontrialbegin = [item.black_pics_reject1.item=counter.setup_black_pics_reject1.selectedvalue]


/ trialduration = 0


/ recorddata = false


</trial>




<trial orientaw>


/ stimulusframes = [1=accept_pics_white1,white_pics_accept1]


/timeout=100


</trial>



<trial orientab>


/ stimulusframes = [1=accept_pics_black1,black_pics_accept1]


/timeout=100


</trial>



<trial orientrw>


/ stimulusframes = [1=reject_pics_white1,white_pics_reject1]


/timeout=100


</trial>



<trial orientrb>


/ stimulusframes = [1=reject_pics_black1,black_pics_reject1]


/timeout=100


</trial>



<trial testaw>


/ stimulusframes = [1=accept_pics_white1,AcceptButton,RejectButton,white_pics_accept1]


/ correctresponse = (AcceptButton)


/ validresponse = (AcceptButton,RejectButton)


/timeout=100


</trial>



<trial testab>


/ stimulusframes = [1=accept_pics_black1,AcceptButton,RejectButton,black_pics_accept1]


/ correctresponse = (AcceptButton)


/ validresponse = (AcceptButton,RejectButton)


/timeout=100


</trial>



<trial testrw>


/ stimulusframes = [1=reject_pics_white1,AcceptButton,RejectButton,white_pics_reject1]


/ correctresponse = (RejectButton)


/ validresponse = (AcceptButton,RejectButton)


/timeout=100


</trial>



<trial testrb>


/ stimulusframes = [1=reject_pics_black1,AcceptButton,RejectButton,black_pics_reject1]


/ correctresponse = (RejectButton)


/ validresponse = (AcceptButton,RejectButton)


/timeout=100


</trial>



<block pairings>


/ trials = [1-40=noreplace(setup_pairingsaw,setup_pairingsab,setup_pairingsrw,setup_pairingsrb)]


</block>



<block orient>


/ trials = [1-40=noreplace(orientaw,orientrw,orientab,orientrb)]


</block>



<block test>


/ trials = [1-40=noreplace(testaw,testrw,testab,testrb)]


</block>



But this still isn't random.  I could make more orders (pairing the first 10 White faces with the last 10 acceptance profiles, etc.) and then randomly assign participants to orders, so that each face is equally likely to be paired with any other application, but it is still not fully random.  If you don't have any other solution, that will work.  But please let me know if I am missing out on something here that could get fully random selection. Thanks for your help.

By Dave - 9/30/2013

Why all those <counter> elements now? You do not need more than you already had. What you needed more of are <picture> and <item> elements.


For the record: One counter for white pics, one for black, one for accept, one for reject. Your various trials in the pairings block will randomly distribute them across the proper <item> elements.

By st2pa - 9/30/2013

Yep, that worked.  Thanks for your help.

By Dominique - 10/7/2013

Hello,


I have another problem with the random presentation of pictures.



I defined a picture set as:


<picture Neg_1>


/items =  ("Neg001.jpg","Neg002.jpg","Neg003.jpg","Neg004.jpg","Neg005.jpg","Neg006.jpg")


/select = noreplace


</picture>



And a corresponding trial as:


<trial neg1>


/stimulusframes= [1=Neg_1, PORTneg_1; 4=cruz, PORTclean]


/numframes=63


</trial>



Presenting this trial six times, I would expect Inquisit to present each of my pictures once, without replacement. But there are always some images that appear twice and others that do not appear. What’s wrong?



On the other hand, I was wondering if there would be necessary any other line to define my trial, taking into account that there won’t be any response inputs (the participants will only be viewing the images).



Thank you very much,


Dominique


By Dave - 10/7/2013

Presenting this trial six times, I would expect Inquisit to present each of my pictures once, without replacement


This would be true under two conditions: (1) No other <trial> elements sample from <picture Neg_1> AND (2) all 6 <trial neg1> runs occur in the *same* <block>. By default, selection pools are reset between blocks, please see the documentation for /resetinterval for details.


I was wondering if there would be necessary any other line to define my trial


/ validresponse = (noresponse)

By Dominique - 10/8/2013

Thank you very much, Dave.


I think both of them are true..


The structure of my script is the following one:


<picture Neg50_1>


/items =  ("Neg001.jpg","Neg002.jpg","Neg003.jpg","Neg004.jpg","Neg005.jpg","Neg006.jpg")


/select = noreplace


</picture>


(defining another 74 picture sets like this..)


<trial neg50_1>


/stimulusframes= [1=Neg50_1, PORTneg50; 4=cruz, PORTlimpiar]


/numframes=63


/validresponse= (noresponse)


/timeout=1050


</trial>


(one trial for each picture defined before..)



<block bloque1> 

/screencolor=(0,0,0)

/preinstructions = (comienzobloque)

/trials = [1-90 = noreplace

(neg50_1, neg150_2, neg350_3, neg650_4, neg1050_5,

neu50_5, neu150_1, neu350_2, neu650_3, neu1050_4,

pos50_4, pos150_5, pos350_1, pos650_2, pos1050_3)]

/postinstructions = (finalbloque)

</block>


(defining like this 4 more blocks but without trial repetition, presenting different trials (i.e. different picture sets) for each block)




<expt> 

/preinstructions = (comienzoexperimento)

/blocks = [1-5 = noreplace

(bloque1, bloque2, bloque3, bloque4, bloque5)]

/postinstructions = (finalexperimento)

</expt>



Thank you!!!
By Dave - 10/8/2013

Your block will 6 x <trial neg50_1>. If you examine those six trials in your data file, I am sure you will find that each of the files defined in <picture Neg50_1> is displayed exactly once. That's what your script is set up to do.

By Dominique - 10/9/2013

That's what it would be supposed to, but it does not.. Sad  So the script is correct?! Could you imagine another reason for this error? (There are no repeating images in my data folder which could have been a reason..)


Nevertheless, thanks a lot for your help.

By Dave - 10/9/2013

The only reason I can think of is that your script contains a mistake. It is extremely unlikely that there is something wrong with 'noreplace' if applied as discussed previously in this thread.

By Dominique - 10/11/2013

Thank you, Dave.