standardize the display size of images with different original dimensions


Author
Message
ttyelnv
ttyelnv
Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)
Group: Forum Members
Posts: 23, Visits: 64
Dear Dave,

I hope all is well. I was wondering if there is a way to standardize the display size of images that have different original dimensions. I attempted to use something like "/size (300px, 300px)," but the displayed size still varies for different images. If there is no method available, I will manually adjust the size of the images to achieve uniformity. Thank you in advance for your assistance.

Best regards,
M
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 101K
nuttymenkk - 10/31/2023
Dear Dave,

I hope all is well. I was wondering if there is a way to standardize the display size of images that have different original dimensions. I attempted to use something like "/size (300px, 300px)," but the displayed size still varies for different images. If there is no method available, I will manually adjust the size of the images to achieve uniformity. Thank you in advance for your assistance.

Best regards,
M

You will have to make sure that the images all have the same aspect ratio. Inquisit will never distort an image's inherent aspect ratio.
ttyelnv
ttyelnv
Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)
Group: Forum Members
Posts: 23, Visits: 64
I see, thank you very much Dave
ttyelnv
ttyelnv
Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)
Group: Forum Members
Posts: 23, Visits: 64
nuttymenkk - 11/7/2023
I see, thank you very much Dave

I have an additional question regarding the randomization of a set of pictures. Currently, I have two groups of pictures: one falls under the "true picture" category, while the other belongs to the "false picture" category. My objective is to record the correctness of subjects' answers based on these pictures.

To achieve this, I created two trials, one for the true category and another for the false category. I have developed the following script. However, it appears that there are repetitions in the displayed pictures. Upon further investigation, I found that Inquisit alternates between the "F_image" and "T_image" categories, ensuring no repetition within this alternation. However, my code does not account for the specific picture names.

<item F_pictureitems>
/1 = "F1.PNG"
/2 = "F2.PNG"
/3 = "F3.PNG"
/4 = "F4.PNG"
/5 = "F5.PNG"
/6 = "F6.PNG"
...
/90 = "F90.PNG"
</item>

<item T_pictureitems>
/1 = "T1.PNG"
/2 = "T2.PNG"
/3 = "T3.PNG"
/4 = "T4.PNG"
/5 = "T5.PNG"
/6 = "T6.PNG"
...
/90 = "T90.PNG"
</item>

<picture T_image>
/ items = T_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
</picture>

<picture F_image>
/ items = F_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
</picture>

<trial T_image>
/ stimulusframes = [1=T_image]
/ response = timeout(60000)
/ validresponse = ("e","i")
/ correctresponse = ("e")
</trial>

<trial F_image>
/ stimulusframes = [1=F_image]
/ response = timeout(60000)
/ validresponse = ("e","i")
/ correctresponse = ("i")
</trial>

<block visual>
/ screencolor = (128,128,128)
/ trials = [1-180 = noreplacenorepeat(F_image,T_image)]
</block>


To address this problem and avoid repetitions, I am considering implementing a <list> that specifies the pool size and selection rate. I intend to amend the code into something like this:

<picture T_image>
/ items = T_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
/ select = list.filleritems_T.nextindex
</picture>

<picture F_image>
/ items = F_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
/ select = list.filleritems_F.nextindex
</picture>

<list filleritems_F>
/ poolsize = 90
/ selectionrate = always
</list>

<list filleritems_T>
/ poolsize = 90
/ selectionrate = always
</list>


Would this be helpful in your opinion? Thank you so much!
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 101K
nuttymenkk - 11/7/2023
nuttymenkk - 11/7/2023
I see, thank you very much Dave

I have an additional question regarding the randomization of a set of pictures. Currently, I have two groups of pictures: one falls under the "true picture" category, while the other belongs to the "false picture" category. My objective is to record the correctness of subjects' answers based on these pictures.

To achieve this, I created two trials, one for the true category and another for the false category. I have developed the following script. However, it appears that there are repetitions in the displayed pictures. Upon further investigation, I found that Inquisit alternates between the "F_image" and "T_image" categories, ensuring no repetition within this alternation. However, my code does not account for the specific picture names.

<item F_pictureitems>
/1 = "F1.PNG"
/2 = "F2.PNG"
/3 = "F3.PNG"
/4 = "F4.PNG"
/5 = "F5.PNG"
/6 = "F6.PNG"
...
/90 = "F90.PNG"
</item>

<item T_pictureitems>
/1 = "T1.PNG"
/2 = "T2.PNG"
/3 = "T3.PNG"
/4 = "T4.PNG"
/5 = "T5.PNG"
/6 = "T6.PNG"
...
/90 = "T90.PNG"
</item>

<picture T_image>
/ items = T_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
</picture>

<picture F_image>
/ items = F_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
</picture>

<trial T_image>
/ stimulusframes = [1=T_image]
/ response = timeout(60000)
/ validresponse = ("e","i")
/ correctresponse = ("e")
</trial>

<trial F_image>
/ stimulusframes = [1=F_image]
/ response = timeout(60000)
/ validresponse = ("e","i")
/ correctresponse = ("i")
</trial>

<block visual>
/ screencolor = (128,128,128)
/ trials = [1-180 = noreplacenorepeat(F_image,T_image)]
</block>


To address this problem and avoid repetitions, I am considering implementing a <list> that specifies the pool size and selection rate. I intend to amend the code into something like this:

<picture T_image>
/ items = T_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
/ select = list.filleritems_T.nextindex
</picture>

<picture F_image>
/ items = F_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
/ select = list.filleritems_F.nextindex
</picture>

<list filleritems_F>
/ poolsize = 90
/ selectionrate = always
</list>

<list filleritems_T>
/ poolsize = 90
/ selectionrate = always
</list>


Would this be helpful in your opinion? Thank you so much!

The alternation between F and T is because that is how you sample trials:

/ trials = [1-180 = noreplacenorepeat(F_image,T_image)]

You've told Inquisit to run 180 trials, F_image and T_image  in equal proportion (that's 90 each), sampling from those *trials* without replacement and without repeating the same *trial*; the only way to do that is to go F -> T -> F -> ... or T -> F -> T -> ....

If you simply want 90 F_image trials and 90 T_image trials in random order, then you ought to specify

/ trials = [1-180 = noreplace(F_image,T_image)]

Trial selection has nothing to do with item selection in your stimuli. Your picture elements sample from their items randomly without replacement by default.

You do not need any lists.

ttyelnv
ttyelnv
Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)
Group: Forum Members
Posts: 23, Visits: 64
Dave - 11/7/2023
nuttymenkk - 11/7/2023
nuttymenkk - 11/7/2023
I see, thank you very much Dave

I have an additional question regarding the randomization of a set of pictures. Currently, I have two groups of pictures: one falls under the "true picture" category, while the other belongs to the "false picture" category. My objective is to record the correctness of subjects' answers based on these pictures.

To achieve this, I created two trials, one for the true category and another for the false category. I have developed the following script. However, it appears that there are repetitions in the displayed pictures. Upon further investigation, I found that Inquisit alternates between the "F_image" and "T_image" categories, ensuring no repetition within this alternation. However, my code does not account for the specific picture names.

<item F_pictureitems>
/1 = "F1.PNG"
/2 = "F2.PNG"
/3 = "F3.PNG"
/4 = "F4.PNG"
/5 = "F5.PNG"
/6 = "F6.PNG"
...
/90 = "F90.PNG"
</item>

<item T_pictureitems>
/1 = "T1.PNG"
/2 = "T2.PNG"
/3 = "T3.PNG"
/4 = "T4.PNG"
/5 = "T5.PNG"
/6 = "T6.PNG"
...
/90 = "T90.PNG"
</item>

<picture T_image>
/ items = T_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
</picture>

<picture F_image>
/ items = F_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
</picture>

<trial T_image>
/ stimulusframes = [1=T_image]
/ response = timeout(60000)
/ validresponse = ("e","i")
/ correctresponse = ("e")
</trial>

<trial F_image>
/ stimulusframes = [1=F_image]
/ response = timeout(60000)
/ validresponse = ("e","i")
/ correctresponse = ("i")
</trial>

<block visual>
/ screencolor = (128,128,128)
/ trials = [1-180 = noreplacenorepeat(F_image,T_image)]
</block>


To address this problem and avoid repetitions, I am considering implementing a <list> that specifies the pool size and selection rate. I intend to amend the code into something like this:

<picture T_image>
/ items = T_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
/ select = list.filleritems_T.nextindex
</picture>

<picture F_image>
/ items = F_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
/ select = list.filleritems_F.nextindex
</picture>

<list filleritems_F>
/ poolsize = 90
/ selectionrate = always
</list>

<list filleritems_T>
/ poolsize = 90
/ selectionrate = always
</list>


Would this be helpful in your opinion? Thank you so much!

The alternation between F and T is because that is how you sample trials:

/ trials = [1-180 = noreplacenorepeat(F_image,T_image)]

You've told Inquisit to run 180 trials, F_image and T_image  in equal proportion (that's 90 each), sampling from those *trials* without replacement and without repeating the same *trial*; the only way to do that is to go F -> T -> F -> ... or T -> F -> T -> ....

If you simply want 90 F_image trials and 90 T_image trials in random order, then you ought to specify

/ trials = [1-180 = noreplace(F_image,T_image)]

Trial selection has nothing to do with item selection in your stimuli. Your picture elements sample from their items randomly without replacement by default.

You do not need any lists.

Thank you so much Dave for your reply. I have actually tried using /noreplace instead of /noreplacenorepeat before that post but I still noticed some repetitions in the pictures displayed on the screen. Some pictures from F_image and T_image trials are played more than once. 

I have also noticed that if I want to record correctness of participants' responses to pictures under F_image and T_image, inquisit does not return the correctness of a specific picture, but just correctness (in 0 or 1) of F_image and T_image trials. Are /responsemessage an appropriate function in this case?

Thank you so so much
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 101K
nuttymenkk - 11/8/2023
Dave - 11/7/2023
nuttymenkk - 11/7/2023
nuttymenkk - 11/7/2023
I see, thank you very much Dave

I have an additional question regarding the randomization of a set of pictures. Currently, I have two groups of pictures: one falls under the "true picture" category, while the other belongs to the "false picture" category. My objective is to record the correctness of subjects' answers based on these pictures.

To achieve this, I created two trials, one for the true category and another for the false category. I have developed the following script. However, it appears that there are repetitions in the displayed pictures. Upon further investigation, I found that Inquisit alternates between the "F_image" and "T_image" categories, ensuring no repetition within this alternation. However, my code does not account for the specific picture names.

<item F_pictureitems>
/1 = "F1.PNG"
/2 = "F2.PNG"
/3 = "F3.PNG"
/4 = "F4.PNG"
/5 = "F5.PNG"
/6 = "F6.PNG"
...
/90 = "F90.PNG"
</item>

<item T_pictureitems>
/1 = "T1.PNG"
/2 = "T2.PNG"
/3 = "T3.PNG"
/4 = "T4.PNG"
/5 = "T5.PNG"
/6 = "T6.PNG"
...
/90 = "T90.PNG"
</item>

<picture T_image>
/ items = T_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
</picture>

<picture F_image>
/ items = F_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
</picture>

<trial T_image>
/ stimulusframes = [1=T_image]
/ response = timeout(60000)
/ validresponse = ("e","i")
/ correctresponse = ("e")
</trial>

<trial F_image>
/ stimulusframes = [1=F_image]
/ response = timeout(60000)
/ validresponse = ("e","i")
/ correctresponse = ("i")
</trial>

<block visual>
/ screencolor = (128,128,128)
/ trials = [1-180 = noreplacenorepeat(F_image,T_image)]
</block>


To address this problem and avoid repetitions, I am considering implementing a <list> that specifies the pool size and selection rate. I intend to amend the code into something like this:

<picture T_image>
/ items = T_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
/ select = list.filleritems_T.nextindex
</picture>

<picture F_image>
/ items = F_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
/ select = list.filleritems_F.nextindex
</picture>

<list filleritems_F>
/ poolsize = 90
/ selectionrate = always
</list>

<list filleritems_T>
/ poolsize = 90
/ selectionrate = always
</list>


Would this be helpful in your opinion? Thank you so much!

The alternation between F and T is because that is how you sample trials:

/ trials = [1-180 = noreplacenorepeat(F_image,T_image)]

You've told Inquisit to run 180 trials, F_image and T_image  in equal proportion (that's 90 each), sampling from those *trials* without replacement and without repeating the same *trial*; the only way to do that is to go F -> T -> F -> ... or T -> F -> T -> ....

If you simply want 90 F_image trials and 90 T_image trials in random order, then you ought to specify

/ trials = [1-180 = noreplace(F_image,T_image)]

Trial selection has nothing to do with item selection in your stimuli. Your picture elements sample from their items randomly without replacement by default.

You do not need any lists.

Thank you so much Dave for your reply. I have actually tried using /noreplace instead of /noreplacenorepeat before that post but I still noticed some repetitions in the pictures displayed on the screen. Some pictures from F_image and T_image trials are played more than once. 

I have also noticed that if I want to record correctness of participants' responses to pictures under F_image and T_image, inquisit does not return the correctness of a specific picture, but just correctness (in 0 or 1) of F_image and T_image trials. Are /responsemessage an appropriate function in this case?

Thank you so so much

No images will repeat if you have 90 unique items for either <picture> element and you aren't taking additional samples from these same <picture> elements elsewhere.

I do not understand what you mean by "correctness of a specifc picture". What image was displayed is logged to the data file by default, just like correctness of the response in the given trial, unless you opted not to record that information. /responsemessage has absolutely nothing to do with any of this
Edited 8 Months Ago by Dave
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 101K
Dave - 11/8/2023
nuttymenkk - 11/8/2023
Dave - 11/7/2023
nuttymenkk - 11/7/2023
nuttymenkk - 11/7/2023
I see, thank you very much Dave

I have an additional question regarding the randomization of a set of pictures. Currently, I have two groups of pictures: one falls under the "true picture" category, while the other belongs to the "false picture" category. My objective is to record the correctness of subjects' answers based on these pictures.

To achieve this, I created two trials, one for the true category and another for the false category. I have developed the following script. However, it appears that there are repetitions in the displayed pictures. Upon further investigation, I found that Inquisit alternates between the "F_image" and "T_image" categories, ensuring no repetition within this alternation. However, my code does not account for the specific picture names.

<item F_pictureitems>
/1 = "F1.PNG"
/2 = "F2.PNG"
/3 = "F3.PNG"
/4 = "F4.PNG"
/5 = "F5.PNG"
/6 = "F6.PNG"
...
/90 = "F90.PNG"
</item>

<item T_pictureitems>
/1 = "T1.PNG"
/2 = "T2.PNG"
/3 = "T3.PNG"
/4 = "T4.PNG"
/5 = "T5.PNG"
/6 = "T6.PNG"
...
/90 = "T90.PNG"
</item>

<picture T_image>
/ items = T_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
</picture>

<picture F_image>
/ items = F_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
</picture>

<trial T_image>
/ stimulusframes = [1=T_image]
/ response = timeout(60000)
/ validresponse = ("e","i")
/ correctresponse = ("e")
</trial>

<trial F_image>
/ stimulusframes = [1=F_image]
/ response = timeout(60000)
/ validresponse = ("e","i")
/ correctresponse = ("i")
</trial>

<block visual>
/ screencolor = (128,128,128)
/ trials = [1-180 = noreplacenorepeat(F_image,T_image)]
</block>


To address this problem and avoid repetitions, I am considering implementing a <list> that specifies the pool size and selection rate. I intend to amend the code into something like this:

<picture T_image>
/ items = T_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
/ select = list.filleritems_T.nextindex
</picture>

<picture F_image>
/ items = F_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
/ select = list.filleritems_F.nextindex
</picture>

<list filleritems_F>
/ poolsize = 90
/ selectionrate = always
</list>

<list filleritems_T>
/ poolsize = 90
/ selectionrate = always
</list>


Would this be helpful in your opinion? Thank you so much!

The alternation between F and T is because that is how you sample trials:

/ trials = [1-180 = noreplacenorepeat(F_image,T_image)]

You've told Inquisit to run 180 trials, F_image and T_image  in equal proportion (that's 90 each), sampling from those *trials* without replacement and without repeating the same *trial*; the only way to do that is to go F -> T -> F -> ... or T -> F -> T -> ....

If you simply want 90 F_image trials and 90 T_image trials in random order, then you ought to specify

/ trials = [1-180 = noreplace(F_image,T_image)]

Trial selection has nothing to do with item selection in your stimuli. Your picture elements sample from their items randomly without replacement by default.

You do not need any lists.

Thank you so much Dave for your reply. I have actually tried using /noreplace instead of /noreplacenorepeat before that post but I still noticed some repetitions in the pictures displayed on the screen. Some pictures from F_image and T_image trials are played more than once. 

I have also noticed that if I want to record correctness of participants' responses to pictures under F_image and T_image, inquisit does not return the correctness of a specific picture, but just correctness (in 0 or 1) of F_image and T_image trials. Are /responsemessage an appropriate function in this case?

Thank you so so much

No images will repeat if you have 90 unique items for either <picture> element and you aren't taking additional samples from these same <picture> elements elsewhere.

I do not understand what you mean by "correctness of a specifc picture". What image was displayed is logged to the data file by default, just like correctness of the response in the given trial, unless you opted not to record that information. /responsemessage has absolutely nothing to do with any of this

Here's a downscaled example, using only 9 (not 90) items per <picture>. If you run this, the result will be that across the 18 trials (9  F_image trials, 9 T_image trials, in random order), you'll see each image item exactly once.

<item F_pictureitems>
/1 = "F1.PNG"
/2 = "F2.PNG"
/3 = "F3.PNG"
/4 = "F4.PNG"
/5 = "F5.PNG"
/6 = "F6.PNG"
/7 = "F7.PNG"
/8 = "F8.PNG"
/9 = "F9.PNG"
</item>

<item T_pictureitems>
/1 = "T1.PNG"
/2 = "T2.PNG"
/3 = "T3.PNG"
/4 = "T4.PNG"
/5 = "T5.PNG"
/6 = "T6.PNG"
/7 = "T7.PNG"
/8 = "T8.PNG"
/9 = "T9.PNG"
</item>

<picture T_image>
/ items = T_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
</picture>

<picture F_image>
/ items = F_pictureitems
/ position = (50%, 50%)
/ halign = center
/ size = (40%, 40%)
</picture>

<trial T_image>
/ stimulusframes = [1=T_image]
/ response = timeout(60000)
/ validresponse = ("e","i")
/ correctresponse = ("e")
</trial>

<trial F_image>
/ stimulusframes = [1=F_image]
/ response = timeout(60000)
/ validresponse = ("e","i")
/ correctresponse = ("i")
</trial>

<block visual>
/ screencolor = (128,128,128)
/ trials = [1-18 = noreplace(F_image,T_image)]
</block>


Here's the data output of the above, sorted by trial type and stimulus item displayed: The data file is also attached below.



Attachments
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search