Random photo with text (without same selection)


Random photo with text (without same selection)

Author
Message
Musashi Jason
Musashi Jason
Partner Member
Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)

Group: Forum Members
Posts: 37, Visits: 72
Dear all,

I'm back here on the forum, after some self-study and time away, with what is likely a simple inquiry.

I'm trying to add a "training session" at the beginning of my experiment but am missing something. I have images with coinciding text to appear below each image that I want to present to subjects to make sure they are familiar with the image, text, and thus the lexical item I am associating with each image.

In the training phase, I want two images to appear (side by side) with text defining the image below. I think I've accomplished that without issue. Next, an audio file plays that matches one of the images. Participants are to select (using the keyboard...later an input device) the correct image/word. I think I've made the following mistakes but can't figure out how to correct them:

1. I'm not assigning the correct value to the item that is "correct" (thus recorded data is erroneous)
2. I don't have the script correctly written to always show two different images. (e.g. when I ran it once I got "banana" on both the left and right of the screen)...

I should probably just stare at it a bit longer to figure it out but I seem to be stuck so I thought I'd throw out a cry for help. Any assistance provided will be much appreciated. My script is attached.

Regards

Jason
Attachments
TestExperiment.iqx (11 views, 11.00 KB)
Musashi Jason
Musashi Jason
Partner Member
Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)

Group: Forum Members
Posts: 37, Visits: 72
Musashi Jason - Thursday, October 18, 2018
Dear all,

I'm back here on the forum, after some self-study and time away, with what is likely a simple inquiry.

I'm trying to add a "training session" at the beginning of my experiment but am missing something. I have images with coinciding text to appear below each image that I want to present to subjects to make sure they are familiar with the image, text, and thus the lexical item I am associating with each image.

In the training phase, I want two images to appear (side by side) with text defining the image below. I think I've accomplished that without issue. Next, an audio file plays that matches one of the images. Participants are to select (using the keyboard...later an input device) the correct image/word. I think I've made the following mistakes but can't figure out how to correct them:

1. I'm not assigning the correct value to the item that is "correct" (thus recorded data is erroneous)
2. I don't have the script correctly written to always show two different images. (e.g. when I ran it once I got "banana" on both the left and right of the screen)...

I should probably just stare at it a bit longer to figure it out but I seem to be stuck so I thought I'd throw out a cry for help. Any assistance provided will be much appreciated. My script is attached.

Regards

Jason

Well, as I suspected, I just needed a bit more time looking at my syntax. I had the wrong variable in my training trial which was my reason for erroneous data being recorded. I managed to fix that issue and now just need to make sure I have eliminated the possibility of the same item being selected...
Dave
Dave
Supreme Being
Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)

Group: Administrators
Posts: 9.2K, Visits: 39K

Musashi Jason - Thursday, October 18, 2018
Dear all,

I'm back here on the forum, after some self-study and time away, with what is likely a simple inquiry.

I'm trying to add a "training session" at the beginning of my experiment but am missing something. I have images with coinciding text to appear below each image that I want to present to subjects to make sure they are familiar with the image, text, and thus the lexical item I am associating with each image.

In the training phase, I want two images to appear (side by side) with text defining the image below. I think I've accomplished that without issue. Next, an audio file plays that matches one of the images. Participants are to select (using the keyboard...later an input device) the correct image/word. I think I've made the following mistakes but can't figure out how to correct them:

1. I'm not assigning the correct value to the item that is "correct" (thus recorded data is erroneous)
2. I don't have the script correctly written to always show two different images. (e.g. when I ran it once I got "banana" on both the left and right of the screen)...

I should probably just stare at it a bit longer to figure it out but I seem to be stuck so I thought I'd throw out a cry for help. Any assistance provided will be much appreciated. My script is attached.

Regards

Jason

Re. #1

<trial trainingsession>
/ ontrialbegin = [
values.correcttrain = list.hpos.nextvalue;
values.distractortrain = list.hpos.nextvalue;
]

/ ontrialbegin = [
if (values.correcth == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= clearscreen; 400=mypicturetrainT, mypicturetrainF; 450=correctopiontrain, distractoroptiontrain; 1200=mysoundtrain]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

ought to read

<trial trainingsession>
/ ontrialbegin = [
values.correcttrain = list.hpos.nextvalue;
values.distractortrain = list.hpos.nextvalue;
]

/ ontrialbegin = [
if (values.correcttrain == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= clearscreen; 400=mypicturetrainT, mypicturetrainF; 450=correctopiontrain, distractoroptiontrain; 1200=mysoundtrain]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

if I'm understanding the intent correctly.

Re. #2: I don't understand why you ordered the items as you did.

I.e. why are the items flipped?

<item pictureitemstraintT>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
...
/ 9 = "tree.jpg"
/10 = "car.jpg"
</item>

<item pictureitemstrainF>
/ 1 = "cat.jpg"
/ 2 = "dog.jpg"
...
/ 9 = "car.jpg"
/10 = "tree.jpg"
</item>

Note that this achieves nothing of any consequence. The two <picture> elements are entirely *independent*, they both simply sample from their items randomly without replacement (the default behavior). Nothing prevents <picture mypicturetrainT> and <picture mypicturetrainF> from both randomly selecting the item "cat" in a given trial.

If you want to prevent that, you ought to make sure that the two <picture> elements are sampling from the same, single pool of items without replacement. The way to do this is via a <list>:

<values>
/ trainFitem = 1
/ trainTitem = 1
</values>

<trial trainingsession>
/ ontrialbegin = [
values.correcttrain = list.hpos.nextvalue;
values.distractortrain = list.hpos.nextvalue;
values.trainTitem = list.trainingitems.nextindex;
values.trainFitem = list.trainingitems.nextindex;

]

/ ontrialbegin = [
if (values.correcttrain == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= clearscreen; 400=mypicturetrainT, mypicturetrainF; 450=correctopiontrain, distractoroptiontrain; 1200=mysoundtrain]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

<list trainingitems>
/ poolsize = 10
/ selectionrate = always
</list>

<picture mypicturetrainT>
/ items = pictureitemstrain
/ hposition = values.correcttrain
/ select = values.trainTitem
</picture>

***********traning pictures false***********
<picture mypicturetrainF>
/ items = pictureitemstrain
/ hposition = values.distractortrain
/ select = values.trainFitem
</picture>

<item pictureitemstrain>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "car.jpg"
</item>

<text correctopiontrain>
/ items = correctitems
/ select = values.trainTitem
/ vposition = 75%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.correcttrain
</text>

<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>
<text distractoroptiontrain>
/ items = distractoritems
/ select = values.trainFitem
/ vposition = 75%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.distractortrain
</text>

<item distractoritems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>

<sound mysoundtrain>
/ items = sounditems
/ select = values.trainTitem
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

P.S.: In the future, if your script requires external files -- images, audio files, etc. -- please include those by putting the script and all the files in a ZIP archive and attaching the archive to your post.

Edited
Last Month by Dave
Musashi Jason
Musashi Jason
Partner Member
Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)

Group: Forum Members
Posts: 37, Visits: 72
Dave - Thursday, October 18, 2018

Musashi Jason - Thursday, October 18, 2018
Dear all,

I'm back here on the forum, after some self-study and time away, with what is likely a simple inquiry.

I'm trying to add a "training session" at the beginning of my experiment but am missing something. I have images with coinciding text to appear below each image that I want to present to subjects to make sure they are familiar with the image, text, and thus the lexical item I am associating with each image.

In the training phase, I want two images to appear (side by side) with text defining the image below. I think I've accomplished that without issue. Next, an audio file plays that matches one of the images. Participants are to select (using the keyboard...later an input device) the correct image/word. I think I've made the following mistakes but can't figure out how to correct them:

1. I'm not assigning the correct value to the item that is "correct" (thus recorded data is erroneous)
2. I don't have the script correctly written to always show two different images. (e.g. when I ran it once I got "banana" on both the left and right of the screen)...

I should probably just stare at it a bit longer to figure it out but I seem to be stuck so I thought I'd throw out a cry for help. Any assistance provided will be much appreciated. My script is attached.

Regards

Jason

Re. #1

<trial trainingsession>
/ ontrialbegin = [
values.correcttrain = list.hpos.nextvalue;
values.distractortrain = list.hpos.nextvalue;
]

/ ontrialbegin = [
if (values.correcth == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= clearscreen; 400=mypicturetrainT, mypicturetrainF; 450=correctopiontrain, distractoroptiontrain; 1200=mysoundtrain]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

ought to read

<trial trainingsession>
/ ontrialbegin = [
values.correcttrain = list.hpos.nextvalue;
values.distractortrain = list.hpos.nextvalue;
]

/ ontrialbegin = [
if (values.correcttrain == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= clearscreen; 400=mypicturetrainT, mypicturetrainF; 450=correctopiontrain, distractoroptiontrain; 1200=mysoundtrain]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

if I'm understanding the intent correctly.

Re. #2: I don't understand why you ordered the items as you did.

I.e. why are the items flipped?

<item pictureitemstraintT>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
...
/ 9 = "tree.jpg"
/10 = "car.jpg"
</item>

<item pictureitemstrainF>
/ 1 = "cat.jpg"
/ 2 = "dog.jpg"
...
/ 9 = "car.jpg"
/10 = "tree.jpg"
</item>

Note that this achieves nothing of any consequence. The two <picture> elements are entirely *independent*, they both simply sample from their items randomly without replacement (the default behavior). Nothing prevents <picture mypicturetrainT> and <picture mypicturetrainF> from both randomly selecting the item "cat" in a given trial.

If you want to prevent that, you ought to make sure that the two <picture> elements are sampling from the same, single pool of items without replacement. The way to do this is via a <list>:

<values>
/ trainFitem = 1
/ trainTitem = 1
</values>

<trial trainingsession>
/ ontrialbegin = [
values.correcttrain = list.hpos.nextvalue;
values.distractortrain = list.hpos.nextvalue;
values.trainTitem = list.trainingitems.nextindex;
values.trainFitem = list.trainingitems.nextindex;

]

/ ontrialbegin = [
if (values.correcttrain == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= clearscreen; 400=mypicturetrainT, mypicturetrainF; 450=correctopiontrain, distractoroptiontrain; 1200=mysoundtrain]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

<list trainingitems>
/ poolsize = 10
/ selectionrate = always
</list>

<picture mypicturetrainT>
/ items = pictureitemstrain
/ hposition = values.correcttrain
/ select = values.trainTitem
</picture>

***********traning pictures false***********
<picture mypicturetrainF>
/ items = pictureitemstrain
/ hposition = values.distractortrain
/ select = values.trainFitem
</picture>

<item pictureitemstrain>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "car.jpg"
</item>

<text correctopiontrain>
/ items = correctitems
/ select = values.trainTitem
/ vposition = 75%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.correcttrain
</text>

<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>
<text distractoroptiontrain>
/ items = distractoritems
/ select = values.trainFitem
/ vposition = 75%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.distractortrain
</text>

<item distractoritems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>

<sound mysoundtrain>
/ items = sounditems
/ select = values.trainTitem
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

P.S.: In the future, if your script requires external files -- images, audio files, etc. -- please include those by putting the script and all the files in a ZIP archive and attaching the archive to your post.

Dave,
Thank you for your help and direction. Regarding the second issue, I was clearly mistaken about how to select two items for my training session and make sure the two were not the same. I've implemented the changes you provided here but I still have a problem...the flow I desire is:

10 items are presented with each audio file (and subsequent matching image/text) being presented once.
I want each audio file to play once (preferably in random order) during the training session with the matching picture and text for it being the correct response and a random photo with text as the incorrect response...with of course the incorrect response being incorrect (not the same image/text as the correct response)

Right now, ten items are presented but some are presented twice or more times with others not being presented at all. I've fiddled around adding "replace = false" in multiple locations but the behavior does not change. I also added "values.mysoundtrain = list.trainingitems.nextindex" thinking this would ensure each sound is only presented once...but clearly I'm not understanding something correctly. Any help you can provide will be appreciated.

Regards

Jason
Musashi Jason
Musashi Jason
Partner Member
Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)

Group: Forum Members
Posts: 37, Visits: 72
Musashi Jason - Thursday, October 25, 2018
Dave - Thursday, October 18, 2018

Musashi Jason - Thursday, October 18, 2018
Dear all,

I'm back here on the forum, after some self-study and time away, with what is likely a simple inquiry.

I'm trying to add a "training session" at the beginning of my experiment but am missing something. I have images with coinciding text to appear below each image that I want to present to subjects to make sure they are familiar with the image, text, and thus the lexical item I am associating with each image.

In the training phase, I want two images to appear (side by side) with text defining the image below. I think I've accomplished that without issue. Next, an audio file plays that matches one of the images. Participants are to select (using the keyboard...later an input device) the correct image/word. I think I've made the following mistakes but can't figure out how to correct them:

1. I'm not assigning the correct value to the item that is "correct" (thus recorded data is erroneous)
2. I don't have the script correctly written to always show two different images. (e.g. when I ran it once I got "banana" on both the left and right of the screen)...

I should probably just stare at it a bit longer to figure it out but I seem to be stuck so I thought I'd throw out a cry for help. Any assistance provided will be much appreciated. My script is attached.

Regards

Jason

Re. #1

<trial trainingsession>
/ ontrialbegin = [
values.correcttrain = list.hpos.nextvalue;
values.distractortrain = list.hpos.nextvalue;
]

/ ontrialbegin = [
if (values.correcth == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= clearscreen; 400=mypicturetrainT, mypicturetrainF; 450=correctopiontrain, distractoroptiontrain; 1200=mysoundtrain]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

ought to read

<trial trainingsession>
/ ontrialbegin = [
values.correcttrain = list.hpos.nextvalue;
values.distractortrain = list.hpos.nextvalue;
]

/ ontrialbegin = [
if (values.correcttrain == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= clearscreen; 400=mypicturetrainT, mypicturetrainF; 450=correctopiontrain, distractoroptiontrain; 1200=mysoundtrain]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

if I'm understanding the intent correctly.

Re. #2: I don't understand why you ordered the items as you did.

I.e. why are the items flipped?

<item pictureitemstraintT>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
...
/ 9 = "tree.jpg"
/10 = "car.jpg"
</item>

<item pictureitemstrainF>
/ 1 = "cat.jpg"
/ 2 = "dog.jpg"
...
/ 9 = "car.jpg"
/10 = "tree.jpg"
</item>

Note that this achieves nothing of any consequence. The two <picture> elements are entirely *independent*, they both simply sample from their items randomly without replacement (the default behavior). Nothing prevents <picture mypicturetrainT> and <picture mypicturetrainF> from both randomly selecting the item "cat" in a given trial.

If you want to prevent that, you ought to make sure that the two <picture> elements are sampling from the same, single pool of items without replacement. The way to do this is via a <list>:

<values>
/ trainFitem = 1
/ trainTitem = 1
</values>

<trial trainingsession>
/ ontrialbegin = [
values.correcttrain = list.hpos.nextvalue;
values.distractortrain = list.hpos.nextvalue;
values.trainTitem = list.trainingitems.nextindex;
values.trainFitem = list.trainingitems.nextindex;

]

/ ontrialbegin = [
if (values.correcttrain == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= clearscreen; 400=mypicturetrainT, mypicturetrainF; 450=correctopiontrain, distractoroptiontrain; 1200=mysoundtrain]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

<list trainingitems>
/ poolsize = 10
/ selectionrate = always
</list>

<picture mypicturetrainT>
/ items = pictureitemstrain
/ hposition = values.correcttrain
/ select = values.trainTitem
</picture>

***********traning pictures false***********
<picture mypicturetrainF>
/ items = pictureitemstrain
/ hposition = values.distractortrain
/ select = values.trainFitem
</picture>

<item pictureitemstrain>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "car.jpg"
</item>

<text correctopiontrain>
/ items = correctitems
/ select = values.trainTitem
/ vposition = 75%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.correcttrain
</text>

<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>
<text distractoroptiontrain>
/ items = distractoritems
/ select = values.trainFitem
/ vposition = 75%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.distractortrain
</text>

<item distractoritems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>

<sound mysoundtrain>
/ items = sounditems
/ select = values.trainTitem
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

P.S.: In the future, if your script requires external files -- images, audio files, etc. -- please include those by putting the script and all the files in a ZIP archive and attaching the archive to your post.

Dave,
Thank you for your help and direction. Regarding the second issue, I was clearly mistaken about how to select two items for my training session and make sure the two were not the same. I've implemented the changes you provided here but I still have a problem...the flow I desire is:

10 items are presented with each audio file (and subsequent matching image/text) being presented once.
I want each audio file to play once (preferably in random order) during the training session with the matching picture and text for it being the correct response and a random photo with text as the incorrect response...with of course the incorrect response being incorrect (not the same image/text as the correct response)

Right now, ten items are presented but some are presented twice or more times with others not being presented at all. I've fiddled around adding "replace = false" in multiple locations but the behavior does not change. I also added "values.mysoundtrain = list.trainingitems.nextindex" thinking this would ensure each sound is only presented once...but clearly I'm not understanding something correctly. Any help you can provide will be appreciated.

Regards

Jason

Dave, 
Sorry, I tried to attach my zipped directory but it seems it didn't upload. I'll try again here.

Ah....I'm getting a message stating that I've exceeded my upload capacity...it is 2.3MB...

Jason


Musashi Jason
Musashi Jason
Partner Member
Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)

Group: Forum Members
Posts: 37, Visits: 72
Musashi Jason - Thursday, October 25, 2018
Musashi Jason - Thursday, October 25, 2018
Dave - Thursday, October 18, 2018

Musashi Jason - Thursday, October 18, 2018
Dear all,

I'm back here on the forum, after some self-study and time away, with what is likely a simple inquiry.

I'm trying to add a "training session" at the beginning of my experiment but am missing something. I have images with coinciding text to appear below each image that I want to present to subjects to make sure they are familiar with the image, text, and thus the lexical item I am associating with each image.

In the training phase, I want two images to appear (side by side) with text defining the image below. I think I've accomplished that without issue. Next, an audio file plays that matches one of the images. Participants are to select (using the keyboard...later an input device) the correct image/word. I think I've made the following mistakes but can't figure out how to correct them:

1. I'm not assigning the correct value to the item that is "correct" (thus recorded data is erroneous)
2. I don't have the script correctly written to always show two different images. (e.g. when I ran it once I got "banana" on both the left and right of the screen)...

I should probably just stare at it a bit longer to figure it out but I seem to be stuck so I thought I'd throw out a cry for help. Any assistance provided will be much appreciated. My script is attached.

Regards

Jason

Re. #1

<trial trainingsession>
/ ontrialbegin = [
values.correcttrain = list.hpos.nextvalue;
values.distractortrain = list.hpos.nextvalue;
]

/ ontrialbegin = [
if (values.correcth == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= clearscreen; 400=mypicturetrainT, mypicturetrainF; 450=correctopiontrain, distractoroptiontrain; 1200=mysoundtrain]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

ought to read

<trial trainingsession>
/ ontrialbegin = [
values.correcttrain = list.hpos.nextvalue;
values.distractortrain = list.hpos.nextvalue;
]

/ ontrialbegin = [
if (values.correcttrain == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= clearscreen; 400=mypicturetrainT, mypicturetrainF; 450=correctopiontrain, distractoroptiontrain; 1200=mysoundtrain]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

if I'm understanding the intent correctly.

Re. #2: I don't understand why you ordered the items as you did.

I.e. why are the items flipped?

<item pictureitemstraintT>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
...
/ 9 = "tree.jpg"
/10 = "car.jpg"
</item>

<item pictureitemstrainF>
/ 1 = "cat.jpg"
/ 2 = "dog.jpg"
...
/ 9 = "car.jpg"
/10 = "tree.jpg"
</item>

Note that this achieves nothing of any consequence. The two <picture> elements are entirely *independent*, they both simply sample from their items randomly without replacement (the default behavior). Nothing prevents <picture mypicturetrainT> and <picture mypicturetrainF> from both randomly selecting the item "cat" in a given trial.

If you want to prevent that, you ought to make sure that the two <picture> elements are sampling from the same, single pool of items without replacement. The way to do this is via a <list>:

<values>
/ trainFitem = 1
/ trainTitem = 1
</values>

<trial trainingsession>
/ ontrialbegin = [
values.correcttrain = list.hpos.nextvalue;
values.distractortrain = list.hpos.nextvalue;
values.trainTitem = list.trainingitems.nextindex;
values.trainFitem = list.trainingitems.nextindex;

]

/ ontrialbegin = [
if (values.correcttrain == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= clearscreen; 400=mypicturetrainT, mypicturetrainF; 450=correctopiontrain, distractoroptiontrain; 1200=mysoundtrain]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

<list trainingitems>
/ poolsize = 10
/ selectionrate = always
</list>

<picture mypicturetrainT>
/ items = pictureitemstrain
/ hposition = values.correcttrain
/ select = values.trainTitem
</picture>

***********traning pictures false***********
<picture mypicturetrainF>
/ items = pictureitemstrain
/ hposition = values.distractortrain
/ select = values.trainFitem
</picture>

<item pictureitemstrain>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "car.jpg"
</item>

<text correctopiontrain>
/ items = correctitems
/ select = values.trainTitem
/ vposition = 75%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.correcttrain
</text>

<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>
<text distractoroptiontrain>
/ items = distractoritems
/ select = values.trainFitem
/ vposition = 75%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.distractortrain
</text>

<item distractoritems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>

<sound mysoundtrain>
/ items = sounditems
/ select = values.trainTitem
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

P.S.: In the future, if your script requires external files -- images, audio files, etc. -- please include those by putting the script and all the files in a ZIP archive and attaching the archive to your post.

Dave,
Thank you for your help and direction. Regarding the second issue, I was clearly mistaken about how to select two items for my training session and make sure the two were not the same. I've implemented the changes you provided here but I still have a problem...the flow I desire is:

10 items are presented with each audio file (and subsequent matching image/text) being presented once.
I want each audio file to play once (preferably in random order) during the training session with the matching picture and text for it being the correct response and a random photo with text as the incorrect response...with of course the incorrect response being incorrect (not the same image/text as the correct response)

Right now, ten items are presented but some are presented twice or more times with others not being presented at all. I've fiddled around adding "replace = false" in multiple locations but the behavior does not change. I also added "values.mysoundtrain = list.trainingitems.nextindex" thinking this would ensure each sound is only presented once...but clearly I'm not understanding something correctly. Any help you can provide will be appreciated.

Regards

Jason

Dave, 
Sorry, I tried to attach my zipped directory but it seems it didn't upload. I'll try again here.

Ah....I'm getting a message stating that I've exceeded my upload capacity...it is 2.3MB...

Jason


Here is a Dropbox link to the zipped package:
https://www.dropbox.com/s/hxfy658u3k7dc4h/TestDesign-1%2810-16-18%29.zip?dl=0



Dave
Dave
Supreme Being
Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)

Group: Administrators
Posts: 9.2K, Visits: 39K
> 10 items are presented with each audio file (and subsequent matching image/text) being presented once.
> I want each audio file to play once (preferably in random order) during the training session with the matching picture and text for it being the correct response
> and a random photo with text as the incorrect response...with of course the incorrect response being incorrect (not the same image/text as the correct response).

I am unable to parse this description. Could you please spell it out fully, including exhaustive examples of what you want combined with what in which way?

Musashi Jason
Musashi Jason
Partner Member
Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)

Group: Forum Members
Posts: 37, Visits: 72
Dave - Friday, October 26, 2018
> 10 items are presented with each audio file (and subsequent matching image/text) being presented once.
> I want each audio file to play once (preferably in random order) during the training session with the matching picture and text for it being the correct response
> and a random photo with text as the incorrect response...with of course the incorrect response being incorrect (not the same image/text as the correct response).

I am unable to parse this description. Could you please spell it out fully, including exhaustive examples of what you want combined with what in which way?

Dave,
Sorry, combined with my messy script, the explanation was too cryptic. There are 20 audio files that I want each participant to hear during the training session. There is also an image and text that matches each audio file. So, one potential run through the training session might look like this:

1st Image          2nd Image            Audio File
dog.jpg              apple.jpg              dog.wav
cat.jpg               house.jpg             cat.wav
apple.jpg.          ball.jpg                 apple.wav
house.jpg          banana.jpg           house.wav
ball.jpg              boat.jpg                ball.wav
banana.jpg       snail.jpg                banana.wav
boat.jpg            tree.jpg                 boat.wav
snail.jpg           dog.jpg                  snail.wav
tree.jpg            cat.jpg                   tree.wav

The correct selection for each pass through this training trial is the image that is associated with the audio file. As it is right now, for some reason, some audio files play more than once and some don't play at all. My goal is to make sure that each one plays once.

Regards

Jason


Musashi Jason
Musashi Jason
Partner Member
Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)

Group: Forum Members
Posts: 37, Visits: 72
Musashi Jason - Friday, October 26, 2018
Dave - Friday, October 26, 2018
> 10 items are presented with each audio file (and subsequent matching image/text) being presented once.
> I want each audio file to play once (preferably in random order) during the training session with the matching picture and text for it being the correct response
> and a random photo with text as the incorrect response...with of course the incorrect response being incorrect (not the same image/text as the correct response).

I am unable to parse this description. Could you please spell it out fully, including exhaustive examples of what you want combined with what in which way?

Dave,
Sorry, combined with my messy script, the explanation was too cryptic. There are 20 audio files that I want each participant to hear during the training session. There is also an image and text that matches each audio file. So, one potential run through the training session might look like this:

1st Image          2nd Image            Audio File
dog.jpg              apple.jpg              dog.wav
cat.jpg               house.jpg             cat.wav
apple.jpg.          ball.jpg                 apple.wav
house.jpg          banana.jpg           house.wav
ball.jpg              boat.jpg                ball.wav
banana.jpg       snail.jpg                banana.wav
boat.jpg            tree.jpg                 boat.wav
snail.jpg           dog.jpg                  snail.wav
tree.jpg            cat.jpg                   tree.wav

The correct selection for each pass through this training trial is the image that is associated with the audio file. As it is right now, for some reason, some audio files play more than once and some don't play at all. My goal is to make sure that each one plays once.

Regards

Jason


Oops sorry, there are not 20...that was a typo....there are 10 audio files.
Dave
Dave
Supreme Being
Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)Supreme Being (512K reputation)

Group: Administrators
Posts: 9.2K, Visits: 39K
<trial trainingsession>
/ ontrialbegin = [
values.correcttrain = list.hpos.nextvalue;
values.distractortrain = list.hpos.nextvalue;
values.trainTitem = list.trainingitemsT.nextvalue;
values.trainFitem = list.trainingitemsF.nextvalue;

]

/ ontrialbegin = [
if (values.correcttrain == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= clearscreen; 400=mypicturetrainT, mypicturetrainF; 450=correctopiontrain, distractoroptiontrain; 1200=mysoundtrain]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ response = correct
/ errormessage = true(errortxt, 500)
/ correctmessage = true(traincorrect, 800)
/ recorddata = true
</trial>

<list trainingitemsT>
/ items = (1,2,3,4,5,6,7,8,9,10)
/ replace = false
</list>

<list trainingitemsF>
/ items = (1,2,3,4,5,6,7,8,9,10)
/ replace = true
/ selectionrate = always
/ not = (values.trainTitem)
</list>


Attachments
TestExperiment_rev.iqx (5 views, 13.00 KB)
GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search