Control for different monitor sizes in inquisit web


Author
Message
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: 98K
Dave - 12/25/2020
marlonz - 12/25/2020
While the distance between the stimuli is consistent (4,4cm), their positioning still seems to be shifted towards the left on my 21" monitor

I defined the canvas according to the dimensions of my laptop screen (in inches)
/ canvasaspectratio = (13, 8)

The position of the stimuli is defined as
/ target_left_x = display.getmmx(display.canvaswidth/2, 1) - 68.5mm
/ target_right_x = display.getmmx(display.canvaswidth/2, 1) + 38.8mm

The same problem occured when i defined the positions in percentages
could you point out to where i'm getting stuck on the positioning?

I added the script I'm using as an attachment in case it's needed to see where I make the mistake
Note, so far i'm only working on my practice trial stimuli

Is the 21'' monitor connected to your laptop as a secondary display or is this an entirely different system?

If the former, you're using the getmmx function wrong. It requires you to specify the monitor and you're calculating distances based on the primary monitor, which would be the laptop's built-in 15.6'' display.

Further, sharing a script isn't terribly useful if you don't also share all files the respective script requires to run.

One more thing: It's best to set the parameters /onexptbegin. Otherwise, it's possible that the exact canvassize is not yet known at the time the <parameters> element is parsed and the parameters take on their respective values.

<shape center>
/ shape = rectangle
/ size = (25mm, 25mm)
/ color = blue
/ position = (50%, 50%)
</shape>

<shape left>
/ shape = rectangle
/ size = (60mm, 60mm)
/ color = green
/ hposition = parameters.left_x
/ vposition = 50%
</shape>

<shape right>
/ shape = rectangle
/ size = (60mm, 60mm)
/ color = red
/ hposition = parameters.right_x
/ vposition = 50%
</shape>

<shape linetop>
/ shape = rectangle
/ size = (160mm, 1mm)
/ hposition = 50%
/ vposition = parameters.top_y
</shape>

<text 16cm>
/ items = ("16cm")
/ hposition = 50%
/ vposition = parameters.top_y
/ txbgcolor = transparent
/ txcolor = magenta
</text>

<shape linebottom>
/ shape = rectangle
/ size = (40mm, 1mm)
/ hposition = 50%
/ vposition = parameters.bottom_y
</shape>

<text 4cm>
/ items = ("4cm")
/ hposition = 50%
/ vposition = parameters.bottom_y
/ txbgcolor = transparent
/ txcolor = magenta
</text>

<shape linecenter>
/ shape = rectangle
/ size = (100mm, 1mm)
/ hposition = 50%
/ vposition = 50%
</shape>

<text 10cm>
/ items = ("10cm")
/ hposition = 50%
/ vposition = 50%
/ txbgcolor = transparent
/ txcolor = magenta
</text>

<trial mytrial>
/ stimulusframes = [1=left, center, right, linetop, linecenter, linebottom, 16cm, 10cm, 4cm]
/ validresponse = (57)
</trial>

<block myblock>
/ trials = [1=mytrial]
</block>

<expt>
/ onexptbegin = [
    parameters.left_x = display.getmmx(display.canvaswidth/2, 1) - 50mm;
    parameters.right_x = display.getmmx(display.canvaswidth/2, 1) + 50mm;
    parameters.top_y = display.getmmy(display.canvasheight/2, 1) - 30mm;
    parameters.bottom_y = display.getmmy(display.canvasheight/2, 1) + 30mm;
]
/ blocks = [1=myblock]
</expt>

<defaults>
/ canvasaspectratio = (13,8)
/ screencolor = grey
</defaults>

<parameters>
/ left_x = 0
/ right_x = 0
/ top_y = 0
/ bottom_y = 0
</parameters>


Beyond that, I don't know how to make this any clearer, I'm afraid.
Edited 4 Years Ago by Dave
marlonz
marlonz
Associate Member (67 reputation)Associate Member (67 reputation)Associate Member (67 reputation)Associate Member (67 reputation)Associate Member (67 reputation)Associate Member (67 reputation)Associate Member (67 reputation)Associate Member (67 reputation)Associate Member (67 reputation)
Group: Forum Members
Posts: 5, Visits: 15
Thank you for your help, /onexptbegin has solved the issue!
ylyl27
ylyl27
Associate Member (86 reputation)Associate Member (86 reputation)Associate Member (86 reputation)Associate Member (86 reputation)Associate Member (86 reputation)Associate Member (86 reputation)Associate Member (86 reputation)Associate Member (86 reputation)Associate Member (86 reputation)
Group: Forum Members
Posts: 10, Visits: 84
Dave - 12/23/2020
marlonz - 12/23/2020
I've tried experimenting with the two element's you provided. Unfortunately this does not seem to solve the problem i'm running into.
If i understand the canvas elements correctly they will change the canvas size / aspect ratio relative to the user's monitor of the task.

Im trying to achieve that different screen sizes and resolutions have no influence on the physical dimensions of a stimulus. For example, currently i am using my 15,6" monitor, the dimensions of the stimuli are 6,5cm (width) x 4,6cm (height). If i would now connect my pc to for example a screen of 23" and i would open the task, i would need the stimuli to again be 6,5cm x 4,6cm.

Thank you for your help

> If i understand the canvas elements correctly they will change the canvas size / aspect ratio relative to the user's monitor of the task.

No. You can define a physical canvassize as explained in my response. I.e. on a 23'' monitor, the task would then only use a physical area equivalent to that of a 15.6'' display.

You can, of course, define your stimuli's sizes in physical dimensions as well.

<shape example>
/ shape = rectangle
/ size = (100mm, 20mm)
/ color = red
</shape>

will be 10cm width and 2cm height on any display.

Hi! I have a similar problem. I want to present some pictures (see below for an example) to participants. When I set the height and width of the picture as 28.8cm, the diameter of the circle was 18cm, which is what I wanted. When I ran the program on my laptop (13.3-inch), everything was correct, and the diameter of the circle was 18cm. But when I ran it with a 27'' monitor, the diameter became 17.5cm. And when I ran it with a 29'' ultrawide monitor, the diameter was 15.4cm. I don't know why the size is different on different monitors. Could you help with this? Thanks!!

I'm using Inquisit 5, and here is my script:
<picture pic>
/ items = pic
/ position = (50%,50%)
/ size = (28.8cm,28.8cm)
/ select = values.picindex
</picture>



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: 98K
ylyl27 - 10/26/2022
Dave - 12/23/2020
marlonz - 12/23/2020
I've tried experimenting with the two element's you provided. Unfortunately this does not seem to solve the problem i'm running into.
If i understand the canvas elements correctly they will change the canvas size / aspect ratio relative to the user's monitor of the task.

Im trying to achieve that different screen sizes and resolutions have no influence on the physical dimensions of a stimulus. For example, currently i am using my 15,6" monitor, the dimensions of the stimuli are 6,5cm (width) x 4,6cm (height). If i would now connect my pc to for example a screen of 23" and i would open the task, i would need the stimuli to again be 6,5cm x 4,6cm.

Thank you for your help

> If i understand the canvas elements correctly they will change the canvas size / aspect ratio relative to the user's monitor of the task.

No. You can define a physical canvassize as explained in my response. I.e. on a 23'' monitor, the task would then only use a physical area equivalent to that of a 15.6'' display.

You can, of course, define your stimuli's sizes in physical dimensions as well.

<shape example>
/ shape = rectangle
/ size = (100mm, 20mm)
/ color = red
</shape>

will be 10cm width and 2cm height on any display.

Hi! I have a similar problem. I want to present some pictures (see below for an example) to participants. When I set the height and width of the picture as 28.8cm, the diameter of the circle was 18cm, which is what I wanted. When I ran the program on my laptop (13.3-inch), everything was correct, and the diameter of the circle was 18cm. But when I ran it with a 27'' monitor, the diameter became 17.5cm. And when I ran it with a 29'' ultrawide monitor, the diameter was 15.4cm. I don't know why the size is different on different monitors. Could you help with this? Thanks!!

I'm using Inquisit 5, and here is my script:
<picture pic>
/ items = pic
/ position = (50%,50%)
/ size = (28.8cm,28.8cm)
/ select = values.picindex
</picture>



> When I ran the program on my laptop (13.3-inch), everything was correct, and the diameter of the circle was 18cm.
> But when I ran it with a 27'' monitor, the diameter became 17.5cm.
> And when I ran it with a 29'' ultrawide monitor, the diameter was 15.4cm. I don't know why the size is different on different monitors. [...]

If you need exact physical dimensions under Inquisit 5 or below, you will need to have your participants go through a calibration procedure. See e.g. https://forums.millisecond.com/Topic21340.aspx

There are a number of factors that can throw off the calculations based on the monitor's reported PPI (pixels per inch) otherwise, such as the display running at a non-native resolution or various tricks used by some very high-definiton displays (where multiple physical pixels together form one logical pixel).

In the future, please post questions pertaining to Inquisit 5 in the Inquisit 5 section of the forums to avoid confusion: https://forums.millisecond.com/Forum101.aspx

ylyl27
ylyl27
Associate Member (86 reputation)Associate Member (86 reputation)Associate Member (86 reputation)Associate Member (86 reputation)Associate Member (86 reputation)Associate Member (86 reputation)Associate Member (86 reputation)Associate Member (86 reputation)Associate Member (86 reputation)
Group: Forum Members
Posts: 10, Visits: 84
Thank you for the reply!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search