Fixed circle size for picture presentation


Author
Message
Francis&m
Francis&m
New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)
Group: Forum Members
Posts: 7, Visits: 71
Hi,
I modified a script for a visual search paradigm where 6 pictures are displayed in a circle around the fixation cross. The size of the circle is now based on the height and width of the display (I think).
How can I choose  the size of the circle despite the monitor size? I'd like to try with a fixed size of the circle because the experiment will run online and I cannot control for the display of the participant. 

If there is a specific reason why I should NOT keep the circle size constant, please tell me.

This is a part of the code that should be relevant, more or less, I can provide more if needed.

Thanks,
Francesca

--some of the parameters--
<parameters>
/ trialnumber = 120
/ practicetrials = 12
/ fontsize = 10%
/ fontsize_fixation = 5%
/ pictureheight = 15%
/ radiusscreenproportion = 0.4
/ readyduration = 100
/ blankduration = 200
</parameters>

-- an example of picture selection  --
<picture target>
/ items = targets
/ selectionrate = always
/ select = values.target
/ size = (100%, parameters.pictureheight)
/ position = ( 1px * values.target_x, 1px * values.target_y)
</picture>

----------------------------------------------------
Calculate circle coordinates
----------------------------------------------------

<expressions>
/ xcenter = 0.5 * display.canvaswidth
/ ycenter = 0.5 * display.canvasheight

/ radius_Circle_px = parameters.radiusscreenproportion * display.canvasheight
/ Radians_Circle_angle0 = rad(0)
/ Radians_Circle_angle60 = rad(60)
/ Radians_Circle_angle120 = rad(120)


/ heightchange_Circle_angle0 = sin(expressions.Radians_Circle_angle0) * expressions.radius_Circle_px
/ widthchange_Circle_angle0 = cos(expressions.Radians_Circle_angle0) * expressions.radius_Circle_px
/ heightchange_Circle_angle60 = sin(expressions.Radians_Circle_angle60) * expressions.radius_Circle_px
/ widthchange_Circle_angle60 = cos(expressions.Radians_Circle_angle60) * expressions.radius_Circle_px
/ heightchange_Circle_angle120 = sin(expressions.Radians_Circle_angle120) * expressions.radius_Circle_px
/ widthchange_Circle_angle120 = cos(expressions.Radians_Circle_angle120) * expressions.radius_Circle_px
</expressions>


----------------------------------------------------
Circle coordinates positions
----------------------------------------------------

<list x_coordinates_pictures>
/ items = (expressions.widthchange_Circle_angle0,
expressions.widthchange_Circle_angle60,
expressions.widthchange_Circle_angle120,
-expressions.widthchange_Circle_angle0,
-expressions.widthchange_Circle_angle60,
-expressions.widthchange_Circle_angle120)
/ replace = false
/ selectionrate = always
</list>

<list y_coordinates_pictures>
/ items = (expressions.heightchange_Circle_angle0,
expressions.heightchange_Circle_angle60,
expressions.heightchange_Circle_angle120,
-expressions.heightchange_Circle_angle0,
-expressions.heightchange_Circle_angle60,
-expressions.heightchange_Circle_angle120)
/ selectionmode = list.x_coordinates_pictures.currentindex
/ selectionrate = always
</list>

Dave
Dave
Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)
Group: Administrators
Posts: 11K, Visits: 65K
Francesca Miti - 2/15/2021
Hi,
I modified a script for a visual search paradigm where 6 pictures are displayed in a circle around the fixation cross. The size of the circle is now based on the height and width of the display (I think).
How can I choose  the size of the circle despite the monitor size? I'd like to try with a fixed size of the circle because the experiment will run online and I cannot control for the display of the participant. 

If there is a specific reason why I should NOT keep the circle size constant, please tell me.

This is a part of the code that should be relevant, more or less, I can provide more if needed.

Thanks,
Francesca

--some of the parameters--
<parameters>
/ trialnumber = 120
/ practicetrials = 12
/ fontsize = 10%
/ fontsize_fixation = 5%
/ pictureheight = 15%
/ radiusscreenproportion = 0.4
/ readyduration = 100
/ blankduration = 200
</parameters>

-- an example of picture selection  --
<picture target>
/ items = targets
/ selectionrate = always
/ select = values.target
/ size = (100%, parameters.pictureheight)
/ position = ( 1px * values.target_x, 1px * values.target_y)
</picture>

----------------------------------------------------
Calculate circle coordinates
----------------------------------------------------

<expressions>
/ xcenter = 0.5 * display.canvaswidth
/ ycenter = 0.5 * display.canvasheight

/ radius_Circle_px = parameters.radiusscreenproportion * display.canvasheight
/ Radians_Circle_angle0 = rad(0)
/ Radians_Circle_angle60 = rad(60)
/ Radians_Circle_angle120 = rad(120)


/ heightchange_Circle_angle0 = sin(expressions.Radians_Circle_angle0) * expressions.radius_Circle_px
/ widthchange_Circle_angle0 = cos(expressions.Radians_Circle_angle0) * expressions.radius_Circle_px
/ heightchange_Circle_angle60 = sin(expressions.Radians_Circle_angle60) * expressions.radius_Circle_px
/ widthchange_Circle_angle60 = cos(expressions.Radians_Circle_angle60) * expressions.radius_Circle_px
/ heightchange_Circle_angle120 = sin(expressions.Radians_Circle_angle120) * expressions.radius_Circle_px
/ widthchange_Circle_angle120 = cos(expressions.Radians_Circle_angle120) * expressions.radius_Circle_px
</expressions>


----------------------------------------------------
Circle coordinates positions
----------------------------------------------------

<list x_coordinates_pictures>
/ items = (expressions.widthchange_Circle_angle0,
expressions.widthchange_Circle_angle60,
expressions.widthchange_Circle_angle120,
-expressions.widthchange_Circle_angle0,
-expressions.widthchange_Circle_angle60,
-expressions.widthchange_Circle_angle120)
/ replace = false
/ selectionrate = always
</list>

<list y_coordinates_pictures>
/ items = (expressions.heightchange_Circle_angle0,
expressions.heightchange_Circle_angle60,
expressions.heightchange_Circle_angle120,
-expressions.heightchange_Circle_angle0,
-expressions.heightchange_Circle_angle60,
-expressions.heightchange_Circle_angle120)
/ selectionmode = list.x_coordinates_pictures.currentindex
/ selectionrate = always
</list>

> If there is a specific reason why I should NOT keep the circle size constant, please tell me.

With a fixed (physical) size you run the risk that stimuli cannot be displayed properly if the fixed size is such that it exceeds the physical dimensions of the given display.

As for specifying a fixed circle size, that question is not answerable based on the code snippets you provided.

Edited Last Week by Dave
Dave
Dave
Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)
Group: Administrators
Posts: 11K, Visits: 65K
Dave - 2/15/2021
Francesca Miti - 2/15/2021
Hi,
I modified a script for a visual search paradigm where 6 pictures are displayed in a circle around the fixation cross. The size of the circle is now based on the height and width of the display (I think).
How can I choose  the size of the circle despite the monitor size? I'd like to try with a fixed size of the circle because the experiment will run online and I cannot control for the display of the participant. 

If there is a specific reason why I should NOT keep the circle size constant, please tell me.

This is a part of the code that should be relevant, more or less, I can provide more if needed.

Thanks,
Francesca

--some of the parameters--
<parameters>
/ trialnumber = 120
/ practicetrials = 12
/ fontsize = 10%
/ fontsize_fixation = 5%
/ pictureheight = 15%
/ radiusscreenproportion = 0.4
/ readyduration = 100
/ blankduration = 200
</parameters>

-- an example of picture selection  --
<picture target>
/ items = targets
/ selectionrate = always
/ select = values.target
/ size = (100%, parameters.pictureheight)
/ position = ( 1px * values.target_x, 1px * values.target_y)
</picture>

----------------------------------------------------
Calculate circle coordinates
----------------------------------------------------

<expressions>
/ xcenter = 0.5 * display.canvaswidth
/ ycenter = 0.5 * display.canvasheight

/ radius_Circle_px = parameters.radiusscreenproportion * display.canvasheight
/ Radians_Circle_angle0 = rad(0)
/ Radians_Circle_angle60 = rad(60)
/ Radians_Circle_angle120 = rad(120)


/ heightchange_Circle_angle0 = sin(expressions.Radians_Circle_angle0) * expressions.radius_Circle_px
/ widthchange_Circle_angle0 = cos(expressions.Radians_Circle_angle0) * expressions.radius_Circle_px
/ heightchange_Circle_angle60 = sin(expressions.Radians_Circle_angle60) * expressions.radius_Circle_px
/ widthchange_Circle_angle60 = cos(expressions.Radians_Circle_angle60) * expressions.radius_Circle_px
/ heightchange_Circle_angle120 = sin(expressions.Radians_Circle_angle120) * expressions.radius_Circle_px
/ widthchange_Circle_angle120 = cos(expressions.Radians_Circle_angle120) * expressions.radius_Circle_px
</expressions>


----------------------------------------------------
Circle coordinates positions
----------------------------------------------------

<list x_coordinates_pictures>
/ items = (expressions.widthchange_Circle_angle0,
expressions.widthchange_Circle_angle60,
expressions.widthchange_Circle_angle120,
-expressions.widthchange_Circle_angle0,
-expressions.widthchange_Circle_angle60,
-expressions.widthchange_Circle_angle120)
/ replace = false
/ selectionrate = always
</list>

<list y_coordinates_pictures>
/ items = (expressions.heightchange_Circle_angle0,
expressions.heightchange_Circle_angle60,
expressions.heightchange_Circle_angle120,
-expressions.heightchange_Circle_angle0,
-expressions.heightchange_Circle_angle60,
-expressions.heightchange_Circle_angle120)
/ selectionmode = list.x_coordinates_pictures.currentindex
/ selectionrate = always
</list>

> If there is a specific reason why I should NOT keep the circle size constant, please tell me.

With a fixed (physical) size you run the risk that stimuli cannot be displayed properly if the fixed size is such that it exceeds the physical dimensions of the given display.

As for specifying a fixed circle size, that question is not answerable based on the code snippets you provided.

Assuming you've not modified any of the deeper guts of the visual search script that would affect sizing and positioning, the following should work to specify a fixed circle size.

Change

<expressions>
...
/ radius_Circle_px = parameters.radiusscreenproportion * display.canvasheight
...
</expressions>

to something along the lines of

<expressions>
...
/ radius_Circle_px = 55/display.getmmx(100,1)*100
...
</expressions>

What this does:
55 is the physical radius size in mm you want for the circle, so 11cm diameter in this case. Change the radius according to your preferences.
display.getmmx(100,1) just figures out how many mm 100 pixels equate to on the given display ( see https://www.millisecond.com/support/docs/v6/html/language/functions/getmmx.htm ), and then we just calculate how many pixels we need on that display to get (close to) our desired radius.

Francis&m
Francis&m
New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)
Group: Forum Members
Posts: 7, Visits: 71
Dave - 2/15/2021
Dave - 2/15/2021
Francesca Miti - 2/15/2021
Hi,
I modified a script for a visual search paradigm where 6 pictures are displayed in a circle around the fixation cross. The size of the circle is now based on the height and width of the display (I think).
How can I choose  the size of the circle despite the monitor size? I'd like to try with a fixed size of the circle because the experiment will run online and I cannot control for the display of the participant. 

If there is a specific reason why I should NOT keep the circle size constant, please tell me.

This is a part of the code that should be relevant, more or less, I can provide more if needed.

Thanks,
Francesca

--some of the parameters--
<parameters>
/ trialnumber = 120
/ practicetrials = 12
/ fontsize = 10%
/ fontsize_fixation = 5%
/ pictureheight = 15%
/ radiusscreenproportion = 0.4
/ readyduration = 100
/ blankduration = 200
</parameters>

-- an example of picture selection  --
<picture target>
/ items = targets
/ selectionrate = always
/ select = values.target
/ size = (100%, parameters.pictureheight)
/ position = ( 1px * values.target_x, 1px * values.target_y)
</picture>

----------------------------------------------------
Calculate circle coordinates
----------------------------------------------------

<expressions>
/ xcenter = 0.5 * display.canvaswidth
/ ycenter = 0.5 * display.canvasheight

/ radius_Circle_px = parameters.radiusscreenproportion * display.canvasheight
/ Radians_Circle_angle0 = rad(0)
/ Radians_Circle_angle60 = rad(60)
/ Radians_Circle_angle120 = rad(120)


/ heightchange_Circle_angle0 = sin(expressions.Radians_Circle_angle0) * expressions.radius_Circle_px
/ widthchange_Circle_angle0 = cos(expressions.Radians_Circle_angle0) * expressions.radius_Circle_px
/ heightchange_Circle_angle60 = sin(expressions.Radians_Circle_angle60) * expressions.radius_Circle_px
/ widthchange_Circle_angle60 = cos(expressions.Radians_Circle_angle60) * expressions.radius_Circle_px
/ heightchange_Circle_angle120 = sin(expressions.Radians_Circle_angle120) * expressions.radius_Circle_px
/ widthchange_Circle_angle120 = cos(expressions.Radians_Circle_angle120) * expressions.radius_Circle_px
</expressions>


----------------------------------------------------
Circle coordinates positions
----------------------------------------------------

<list x_coordinates_pictures>
/ items = (expressions.widthchange_Circle_angle0,
expressions.widthchange_Circle_angle60,
expressions.widthchange_Circle_angle120,
-expressions.widthchange_Circle_angle0,
-expressions.widthchange_Circle_angle60,
-expressions.widthchange_Circle_angle120)
/ replace = false
/ selectionrate = always
</list>

<list y_coordinates_pictures>
/ items = (expressions.heightchange_Circle_angle0,
expressions.heightchange_Circle_angle60,
expressions.heightchange_Circle_angle120,
-expressions.heightchange_Circle_angle0,
-expressions.heightchange_Circle_angle60,
-expressions.heightchange_Circle_angle120)
/ selectionmode = list.x_coordinates_pictures.currentindex
/ selectionrate = always
</list>

> If there is a specific reason why I should NOT keep the circle size constant, please tell me.

With a fixed (physical) size you run the risk that stimuli cannot be displayed properly if the fixed size is such that it exceeds the physical dimensions of the given display.

As for specifying a fixed circle size, that question is not answerable based on the code snippets you provided.

Assuming you've not modified any of the deeper guts of the visual search script that would affect sizing and positioning, the following should work to specify a fixed circle size.

Change

<expressions>
...
/ radius_Circle_px = parameters.radiusscreenproportion * display.canvasheight
...
</expressions>

to something along the lines of

<expressions>
...
/ radius_Circle_px = 55/display.getmmx(100,1)*100
...
</expressions>

What this does:
55 is the physical radius size in mm you want for the circle, so 11cm diameter in this case. Change the radius according to your preferences.
display.getmmx(100,1) just figures out how many mm 100 pixels equate to on the given display ( see https://www.millisecond.com/support/docs/v6/html/language/functions/getmmx.htm ), and then we just calculate how many pixels we need on that display to get (close to) our desired radius.

This is just what I needed, thank you very much.

Francesca
Francis&m
Francis&m
New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)
Group: Forum Members
Posts: 7, Visits: 71
Dave - 2/15/2021
Dave - 2/15/2021
Francesca Miti - 2/15/2021
Hi,
I modified a script for a visual search paradigm where 6 pictures are displayed in a circle around the fixation cross. The size of the circle is now based on the height and width of the display (I think).
How can I choose  the size of the circle despite the monitor size? I'd like to try with a fixed size of the circle because the experiment will run online and I cannot control for the display of the participant. 

If there is a specific reason why I should NOT keep the circle size constant, please tell me.

This is a part of the code that should be relevant, more or less, I can provide more if needed.

Thanks,
Francesca

--some of the parameters--
<parameters>
/ trialnumber = 120
/ practicetrials = 12
/ fontsize = 10%
/ fontsize_fixation = 5%
/ pictureheight = 15%
/ radiusscreenproportion = 0.4
/ readyduration = 100
/ blankduration = 200
</parameters>

-- an example of picture selection  --
<picture target>
/ items = targets
/ selectionrate = always
/ select = values.target
/ size = (100%, parameters.pictureheight)
/ position = ( 1px * values.target_x, 1px * values.target_y)
</picture>

----------------------------------------------------
Calculate circle coordinates
----------------------------------------------------

<expressions>
/ xcenter = 0.5 * display.canvaswidth
/ ycenter = 0.5 * display.canvasheight

/ radius_Circle_px = parameters.radiusscreenproportion * display.canvasheight
/ Radians_Circle_angle0 = rad(0)
/ Radians_Circle_angle60 = rad(60)
/ Radians_Circle_angle120 = rad(120)


/ heightchange_Circle_angle0 = sin(expressions.Radians_Circle_angle0) * expressions.radius_Circle_px
/ widthchange_Circle_angle0 = cos(expressions.Radians_Circle_angle0) * expressions.radius_Circle_px
/ heightchange_Circle_angle60 = sin(expressions.Radians_Circle_angle60) * expressions.radius_Circle_px
/ widthchange_Circle_angle60 = cos(expressions.Radians_Circle_angle60) * expressions.radius_Circle_px
/ heightchange_Circle_angle120 = sin(expressions.Radians_Circle_angle120) * expressions.radius_Circle_px
/ widthchange_Circle_angle120 = cos(expressions.Radians_Circle_angle120) * expressions.radius_Circle_px
</expressions>


----------------------------------------------------
Circle coordinates positions
----------------------------------------------------

<list x_coordinates_pictures>
/ items = (expressions.widthchange_Circle_angle0,
expressions.widthchange_Circle_angle60,
expressions.widthchange_Circle_angle120,
-expressions.widthchange_Circle_angle0,
-expressions.widthchange_Circle_angle60,
-expressions.widthchange_Circle_angle120)
/ replace = false
/ selectionrate = always
</list>

<list y_coordinates_pictures>
/ items = (expressions.heightchange_Circle_angle0,
expressions.heightchange_Circle_angle60,
expressions.heightchange_Circle_angle120,
-expressions.heightchange_Circle_angle0,
-expressions.heightchange_Circle_angle60,
-expressions.heightchange_Circle_angle120)
/ selectionmode = list.x_coordinates_pictures.currentindex
/ selectionrate = always
</list>

> If there is a specific reason why I should NOT keep the circle size constant, please tell me.

With a fixed (physical) size you run the risk that stimuli cannot be displayed properly if the fixed size is such that it exceeds the physical dimensions of the given display.

As for specifying a fixed circle size, that question is not answerable based on the code snippets you provided.

Assuming you've not modified any of the deeper guts of the visual search script that would affect sizing and positioning, the following should work to specify a fixed circle size.

Change

<expressions>
...
/ radius_Circle_px = parameters.radiusscreenproportion * display.canvasheight
...
</expressions>

to something along the lines of

<expressions>
...
/ radius_Circle_px = 55/display.getmmx(100,1)*100
...
</expressions>

What this does:
55 is the physical radius size in mm you want for the circle, so 11cm diameter in this case. Change the radius according to your preferences.
display.getmmx(100,1) just figures out how many mm 100 pixels equate to on the given display ( see https://www.millisecond.com/support/docs/v6/html/language/functions/getmmx.htm ), and then we just calculate how many pixels we need on that display to get (close to) our desired radius.

I'm sorry, I fixed the circle but I'm struggling with image size. I'd like to have my images presented 3X3 cm despite the monitor size, so I converted and specified 113X113 px.
It works on my big monitor, but on my laptop that is smaller, images are smaller too. How can I prevent this from happening?

<picture target>
/ items = targets
/ selectionrate = always
/ select = values.target
/ size = (113, 113)
/ position = ( 1px * values.target_x, 1px * values.target_y)
</picture>

Thank you
Dave
Dave
Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)
Group: Administrators
Posts: 11K, Visits: 65K
Francesca Miti - 2/16/2021
Dave - 2/15/2021
Dave - 2/15/2021
Francesca Miti - 2/15/2021
Hi,
I modified a script for a visual search paradigm where 6 pictures are displayed in a circle around the fixation cross. The size of the circle is now based on the height and width of the display (I think).
How can I choose  the size of the circle despite the monitor size? I'd like to try with a fixed size of the circle because the experiment will run online and I cannot control for the display of the participant. 

If there is a specific reason why I should NOT keep the circle size constant, please tell me.

This is a part of the code that should be relevant, more or less, I can provide more if needed.

Thanks,
Francesca

--some of the parameters--
<parameters>
/ trialnumber = 120
/ practicetrials = 12
/ fontsize = 10%
/ fontsize_fixation = 5%
/ pictureheight = 15%
/ radiusscreenproportion = 0.4
/ readyduration = 100
/ blankduration = 200
</parameters>

-- an example of picture selection  --
<picture target>
/ items = targets
/ selectionrate = always
/ select = values.target
/ size = (100%, parameters.pictureheight)
/ position = ( 1px * values.target_x, 1px * values.target_y)
</picture>

----------------------------------------------------
Calculate circle coordinates
----------------------------------------------------

<expressions>
/ xcenter = 0.5 * display.canvaswidth
/ ycenter = 0.5 * display.canvasheight

/ radius_Circle_px = parameters.radiusscreenproportion * display.canvasheight
/ Radians_Circle_angle0 = rad(0)
/ Radians_Circle_angle60 = rad(60)
/ Radians_Circle_angle120 = rad(120)


/ heightchange_Circle_angle0 = sin(expressions.Radians_Circle_angle0) * expressions.radius_Circle_px
/ widthchange_Circle_angle0 = cos(expressions.Radians_Circle_angle0) * expressions.radius_Circle_px
/ heightchange_Circle_angle60 = sin(expressions.Radians_Circle_angle60) * expressions.radius_Circle_px
/ widthchange_Circle_angle60 = cos(expressions.Radians_Circle_angle60) * expressions.radius_Circle_px
/ heightchange_Circle_angle120 = sin(expressions.Radians_Circle_angle120) * expressions.radius_Circle_px
/ widthchange_Circle_angle120 = cos(expressions.Radians_Circle_angle120) * expressions.radius_Circle_px
</expressions>


----------------------------------------------------
Circle coordinates positions
----------------------------------------------------

<list x_coordinates_pictures>
/ items = (expressions.widthchange_Circle_angle0,
expressions.widthchange_Circle_angle60,
expressions.widthchange_Circle_angle120,
-expressions.widthchange_Circle_angle0,
-expressions.widthchange_Circle_angle60,
-expressions.widthchange_Circle_angle120)
/ replace = false
/ selectionrate = always
</list>

<list y_coordinates_pictures>
/ items = (expressions.heightchange_Circle_angle0,
expressions.heightchange_Circle_angle60,
expressions.heightchange_Circle_angle120,
-expressions.heightchange_Circle_angle0,
-expressions.heightchange_Circle_angle60,
-expressions.heightchange_Circle_angle120)
/ selectionmode = list.x_coordinates_pictures.currentindex
/ selectionrate = always
</list>

> If there is a specific reason why I should NOT keep the circle size constant, please tell me.

With a fixed (physical) size you run the risk that stimuli cannot be displayed properly if the fixed size is such that it exceeds the physical dimensions of the given display.

As for specifying a fixed circle size, that question is not answerable based on the code snippets you provided.

Assuming you've not modified any of the deeper guts of the visual search script that would affect sizing and positioning, the following should work to specify a fixed circle size.

Change

<expressions>
...
/ radius_Circle_px = parameters.radiusscreenproportion * display.canvasheight
...
</expressions>

to something along the lines of

<expressions>
...
/ radius_Circle_px = 55/display.getmmx(100,1)*100
...
</expressions>

What this does:
55 is the physical radius size in mm you want for the circle, so 11cm diameter in this case. Change the radius according to your preferences.
display.getmmx(100,1) just figures out how many mm 100 pixels equate to on the given display ( see https://www.millisecond.com/support/docs/v6/html/language/functions/getmmx.htm ), and then we just calculate how many pixels we need on that display to get (close to) our desired radius.

I'm sorry, I fixed the circle but I'm struggling with image size. I'd like to have my images presented 3X3 cm despite the monitor size, so I converted and specified 113X113 px.
It works on my big monitor, but on my laptop that is smaller, images are smaller too. How can I prevent this from happening?

<picture target>
/ items = targets
/ selectionrate = always
/ select = values.target
/ size = (113, 113)
/ position = ( 1px * values.target_x, 1px * values.target_y)
</picture>

Thank you

Just specify the physical size you want directly

<picture target>
/ items = targets
/ selectionrate = always
/ select = values.target
/ size = (3cm, 3cm)
/ position = ( 1px * values.target_x, 1px * values.target_y)
</picture
Francis&m
Francis&m
New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)
Group: Forum Members
Posts: 7, Visits: 71
Dave - 2/16/2021
Francesca Miti - 2/16/2021
Dave - 2/15/2021
Dave - 2/15/2021
Francesca Miti - 2/15/2021
Hi,
I modified a script for a visual search paradigm where 6 pictures are displayed in a circle around the fixation cross. The size of the circle is now based on the height and width of the display (I think).
How can I choose  the size of the circle despite the monitor size? I'd like to try with a fixed size of the circle because the experiment will run online and I cannot control for the display of the participant. 

If there is a specific reason why I should NOT keep the circle size constant, please tell me.

This is a part of the code that should be relevant, more or less, I can provide more if needed.

Thanks,
Francesca

--some of the parameters--
<parameters>
/ trialnumber = 120
/ practicetrials = 12
/ fontsize = 10%
/ fontsize_fixation = 5%
/ pictureheight = 15%
/ radiusscreenproportion = 0.4
/ readyduration = 100
/ blankduration = 200
</parameters>

-- an example of picture selection  --
<picture target>
/ items = targets
/ selectionrate = always
/ select = values.target
/ size = (100%, parameters.pictureheight)
/ position = ( 1px * values.target_x, 1px * values.target_y)
</picture>

----------------------------------------------------
Calculate circle coordinates
----------------------------------------------------

<expressions>
/ xcenter = 0.5 * display.canvaswidth
/ ycenter = 0.5 * display.canvasheight

/ radius_Circle_px = parameters.radiusscreenproportion * display.canvasheight
/ Radians_Circle_angle0 = rad(0)
/ Radians_Circle_angle60 = rad(60)
/ Radians_Circle_angle120 = rad(120)


/ heightchange_Circle_angle0 = sin(expressions.Radians_Circle_angle0) * expressions.radius_Circle_px
/ widthchange_Circle_angle0 = cos(expressions.Radians_Circle_angle0) * expressions.radius_Circle_px
/ heightchange_Circle_angle60 = sin(expressions.Radians_Circle_angle60) * expressions.radius_Circle_px
/ widthchange_Circle_angle60 = cos(expressions.Radians_Circle_angle60) * expressions.radius_Circle_px
/ heightchange_Circle_angle120 = sin(expressions.Radians_Circle_angle120) * expressions.radius_Circle_px
/ widthchange_Circle_angle120 = cos(expressions.Radians_Circle_angle120) * expressions.radius_Circle_px
</expressions>


----------------------------------------------------
Circle coordinates positions
----------------------------------------------------

<list x_coordinates_pictures>
/ items = (expressions.widthchange_Circle_angle0,
expressions.widthchange_Circle_angle60,
expressions.widthchange_Circle_angle120,
-expressions.widthchange_Circle_angle0,
-expressions.widthchange_Circle_angle60,
-expressions.widthchange_Circle_angle120)
/ replace = false
/ selectionrate = always
</list>

<list y_coordinates_pictures>
/ items = (expressions.heightchange_Circle_angle0,
expressions.heightchange_Circle_angle60,
expressions.heightchange_Circle_angle120,
-expressions.heightchange_Circle_angle0,
-expressions.heightchange_Circle_angle60,
-expressions.heightchange_Circle_angle120)
/ selectionmode = list.x_coordinates_pictures.currentindex
/ selectionrate = always
</list>

> If there is a specific reason why I should NOT keep the circle size constant, please tell me.

With a fixed (physical) size you run the risk that stimuli cannot be displayed properly if the fixed size is such that it exceeds the physical dimensions of the given display.

As for specifying a fixed circle size, that question is not answerable based on the code snippets you provided.

Assuming you've not modified any of the deeper guts of the visual search script that would affect sizing and positioning, the following should work to specify a fixed circle size.

Change

<expressions>
...
/ radius_Circle_px = parameters.radiusscreenproportion * display.canvasheight
...
</expressions>

to something along the lines of

<expressions>
...
/ radius_Circle_px = 55/display.getmmx(100,1)*100
...
</expressions>

What this does:
55 is the physical radius size in mm you want for the circle, so 11cm diameter in this case. Change the radius according to your preferences.
display.getmmx(100,1) just figures out how many mm 100 pixels equate to on the given display ( see https://www.millisecond.com/support/docs/v6/html/language/functions/getmmx.htm ), and then we just calculate how many pixels we need on that display to get (close to) our desired radius.

I'm sorry, I fixed the circle but I'm struggling with image size. I'd like to have my images presented 3X3 cm despite the monitor size, so I converted and specified 113X113 px.
It works on my big monitor, but on my laptop that is smaller, images are smaller too. How can I prevent this from happening?

<picture target>
/ items = targets
/ selectionrate = always
/ select = values.target
/ size = (113, 113)
/ position = ( 1px * values.target_x, 1px * values.target_y)
</picture>

Thank you

Just specify the physical size you want directly

<picture target>
/ items = targets
/ selectionrate = always
/ select = values.target
/ size = (3cm, 3cm)
/ position = ( 1px * values.target_x, 1px * values.target_y)
</picture

I'm sorry but this is not working since I need to keep the absolut sizes of the images constant, despite the size of the monitor used.
Anyway I found this topic

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

I'll work on this.
Thank you!
Dave
Dave
Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)
Group: Administrators
Posts: 11K, Visits: 65K
Francesca Miti - 2/18/2021
Dave - 2/16/2021
Francesca Miti - 2/16/2021
Dave - 2/15/2021
Dave - 2/15/2021
Francesca Miti - 2/15/2021
Hi,
I modified a script for a visual search paradigm where 6 pictures are displayed in a circle around the fixation cross. The size of the circle is now based on the height and width of the display (I think).
How can I choose  the size of the circle despite the monitor size? I'd like to try with a fixed size of the circle because the experiment will run online and I cannot control for the display of the participant. 

If there is a specific reason why I should NOT keep the circle size constant, please tell me.

This is a part of the code that should be relevant, more or less, I can provide more if needed.

Thanks,
Francesca

--some of the parameters--
<parameters>
/ trialnumber = 120
/ practicetrials = 12
/ fontsize = 10%
/ fontsize_fixation = 5%
/ pictureheight = 15%
/ radiusscreenproportion = 0.4
/ readyduration = 100
/ blankduration = 200
</parameters>

-- an example of picture selection  --
<picture target>
/ items = targets
/ selectionrate = always
/ select = values.target
/ size = (100%, parameters.pictureheight)
/ position = ( 1px * values.target_x, 1px * values.target_y)
</picture>

----------------------------------------------------
Calculate circle coordinates
----------------------------------------------------

<expressions>
/ xcenter = 0.5 * display.canvaswidth
/ ycenter = 0.5 * display.canvasheight

/ radius_Circle_px = parameters.radiusscreenproportion * display.canvasheight
/ Radians_Circle_angle0 = rad(0)
/ Radians_Circle_angle60 = rad(60)
/ Radians_Circle_angle120 = rad(120)


/ heightchange_Circle_angle0 = sin(expressions.Radians_Circle_angle0) * expressions.radius_Circle_px
/ widthchange_Circle_angle0 = cos(expressions.Radians_Circle_angle0) * expressions.radius_Circle_px
/ heightchange_Circle_angle60 = sin(expressions.Radians_Circle_angle60) * expressions.radius_Circle_px
/ widthchange_Circle_angle60 = cos(expressions.Radians_Circle_angle60) * expressions.radius_Circle_px
/ heightchange_Circle_angle120 = sin(expressions.Radians_Circle_angle120) * expressions.radius_Circle_px
/ widthchange_Circle_angle120 = cos(expressions.Radians_Circle_angle120) * expressions.radius_Circle_px
</expressions>


----------------------------------------------------
Circle coordinates positions
----------------------------------------------------

<list x_coordinates_pictures>
/ items = (expressions.widthchange_Circle_angle0,
expressions.widthchange_Circle_angle60,
expressions.widthchange_Circle_angle120,
-expressions.widthchange_Circle_angle0,
-expressions.widthchange_Circle_angle60,
-expressions.widthchange_Circle_angle120)
/ replace = false
/ selectionrate = always
</list>

<list y_coordinates_pictures>
/ items = (expressions.heightchange_Circle_angle0,
expressions.heightchange_Circle_angle60,
expressions.heightchange_Circle_angle120,
-expressions.heightchange_Circle_angle0,
-expressions.heightchange_Circle_angle60,
-expressions.heightchange_Circle_angle120)
/ selectionmode = list.x_coordinates_pictures.currentindex
/ selectionrate = always
</list>

> If there is a specific reason why I should NOT keep the circle size constant, please tell me.

With a fixed (physical) size you run the risk that stimuli cannot be displayed properly if the fixed size is such that it exceeds the physical dimensions of the given display.

As for specifying a fixed circle size, that question is not answerable based on the code snippets you provided.

Assuming you've not modified any of the deeper guts of the visual search script that would affect sizing and positioning, the following should work to specify a fixed circle size.

Change

<expressions>
...
/ radius_Circle_px = parameters.radiusscreenproportion * display.canvasheight
...
</expressions>

to something along the lines of

<expressions>
...
/ radius_Circle_px = 55/display.getmmx(100,1)*100
...
</expressions>

What this does:
55 is the physical radius size in mm you want for the circle, so 11cm diameter in this case. Change the radius according to your preferences.
display.getmmx(100,1) just figures out how many mm 100 pixels equate to on the given display ( see https://www.millisecond.com/support/docs/v6/html/language/functions/getmmx.htm ), and then we just calculate how many pixels we need on that display to get (close to) our desired radius.

I'm sorry, I fixed the circle but I'm struggling with image size. I'd like to have my images presented 3X3 cm despite the monitor size, so I converted and specified 113X113 px.
It works on my big monitor, but on my laptop that is smaller, images are smaller too. How can I prevent this from happening?

<picture target>
/ items = targets
/ selectionrate = always
/ select = values.target
/ size = (113, 113)
/ position = ( 1px * values.target_x, 1px * values.target_y)
</picture>

Thank you

Just specify the physical size you want directly

<picture target>
/ items = targets
/ selectionrate = always
/ select = values.target
/ size = (3cm, 3cm)
/ position = ( 1px * values.target_x, 1px * values.target_y)
</picture

I'm sorry but this is not working since I need to keep the absolut sizes of the images constant, despite the size of the monitor used.
Anyway I found this topic

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

I'll work on this.
Thank you!

If you specify the physical size you want in your <picture> elements

<picture target>
/ items = targets
/ selectionrate = always
/ select = values.target
/ size = (3cm, 3cm)
/ position = ( 1px * values.target_x, 1px * values.target_y)
</picture

it should be constant across different monitor sizes.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search