Trying to present pictures in same actual size on every screen


Author
Message
leluxe
leluxe
Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)
Group: Forum Members
Posts: 18, Visits: 85
Hi there,
I am having some issues conducting a "find the mistakes"-search task for which it is important that the two images presented simultaneously are each presented in 10,1cm * 10,1cm on every screen.
Meaning: Regardless of the participant's monitor size and display resolution the images always have to be presented in the center of the screen, with a 0,5cm gap between them.
Thus I created a formula that allows me to do just this (which as it turned out wasn't at all trivial because Inquisit usually wants to present every image in relation to the screen resolution) by entering it in the /size attribute of the /picture element. Bear in mind that there will be a lot of images contained in the task so I want to avoid typing in different values for each picture.
Well this worked up to this point but now there's a problem with defining the position of the images, which of course is just as dependent from monitor size and resolution.

I'll quickly post my script, so you can imagine what I am talking about:

<expressions>
/ displaysize = abs(openended.enterdisplaysize.response)*2.54*0,87157552765421
/ factorsize = (display.width/600) * (10,1/expressions.displaysize)
/ vectorposition = (((10,1 + 0,5)/2)/expressions.displaysize)*display.width
</expressions> 
Those are the formulas I conducted. They work mathematically, I checked it by calculating by hand and then putting in the numbers in the attributes.
The /displaysize expression uses the response of the openended element defined below for calculating the width of your display in centimetres.

<picture boat>
/ items = ("bootaufland.png")
/ hposition = (display.width/2-expressions.vectorposition)px
/ vposition = (display.height/2)px
/ size = (600*expressions.factorsize, 600*expressions.factorsize)
</picture>

<picture boatmistake>
/ items = ("bootaufland F.png")
/ hposition = (display.width/2+expressions.vectorposition)px
/ vposition = (display.height/2)px
/ size = (600*expressions.factorsize, 600*expressions.factorsize)
</picture>

<openended enterdisplaysize>
/ position = (50, 50)
/ linelength = 5
/ numlines = 1
/ mouse = true
/ mask = decimal
/ inputdevice = keyboard
</openended>
Didn't write a textbox with the question yet. You have to enter your display diagonal in *inch* here. If you don't know it exactly, here's a website you can use:
http://www.piliapp.com/actual-size/what-is-my-monitor-size/
Later on I will write such a tool into the script directly. For now this has to do the deed.

<trial boats>
/ stimulusframes = [1=boat, boatmistake]
/ inputdevice = mouse
/ validresponse = (boat)
</trial>
That's not what it will be like later of course, but for now it's about the presentation of the images.

<block test>
/ trials = [1=enterdisplaysize; 2=boats]
</block>

Now if I run the script I see the openended element like I should but when I get to the next page I only see a blank screen. The /displaysize expression and the /factorsize expression seem to work because when pre-calculating the position values and entering them in the attribute the pictures get presented correctly. Furthermore the /vectorposition expression is quite similar syntactically to the /factorsize expression so I think the problem has to be something like the hposition/vposition attribute not accepting the expression or not being able to present it in pixels or something like this.
Possibly the mistake I made is something very basic to experienced Inquisit users but I am completely new to Inquisit and programming software in general so I am miserably struggling to find the problem myself.
Anyone got the answer? I know you do :-)

Thanks in advance for your help!
Best regards,
Pablo

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: 85K
The approach is the same as the one I've proposed previously. For details, see the attached file.

Also note that -- contrary to your instructions -- the clickable "sensitive areas" are defined on the *right* image, not the left.

Attachments
Search Task.iqx (647 views, 14.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search