Trying to present pictures in same actual size on every screen


Author
Message
leluxe
leluxe
Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K 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

leluxe
leluxe
Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)
Group: Forum Members
Posts: 18, Visits: 85
UPDATE: I uploaded the script with the two pictures.

Attachments
Search task.zip (722 views, 1.00 MB)
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: 13K, Visits: 104K
#1: Ultimately, displays work in pixels. Thus, you need to make sure that your sizes and positions are given in px as in

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

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

The *first* unit in a given expression is what matters and determines what unit it returns.

#2: The matter of calibrating stimuli such that they have specific physical dimensions on a given display has been addressed before, e.g. here: https://www.millisecond.com/forums/Topic14608.aspx
Another example of this at work can be found in the SDRT: https://www.millisecond.com/download/library/SpatialDelayedResponseTask/

Hope this helps.

leluxe
leluxe
Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)
Group: Forum Members
Posts: 18, Visits: 85
Hi Dave,
this helped a lot! See, it was just this little beginners-syntax problem for which the solution just didn't come to my mind. Well, Inquisit is in great parts learning by failing I guess.
Now it works perfectly fine on every gadget I tried it with, thank you!
I also had the idea of letting the participants measure a line on the screen (like in the approaches you indicated) but I wanted to avoid them having a measuring device of any form at their disposal which they could use for tricking the trials contained in the study.

Please allow me one further question though:
To collect the data of the mistake-search task in the script above I thought of the solution of creating small black rectangles which match the approximate size of the mistake area. Then I put the /transparentcolor attribute to (0,0,0) so that they are invisible and used these areas as sensitive areas for the /correctresponse in my trial. Now this works fine if you have one picture but if you have to create those rectangles for *every* mistake on *every* picture and then locate them properly on the picture whilst of course considering different monitor sizes and resolutions again this becomes a real hassle.
Do you maybe have any idea how this could be done in a more effective way? There would be two possible ways of conducting this task: Either we measure the time a participant takes to find all six mistakes on every image, or we do it the even better way and give the trials a timeout so we can measure *which* mistakes were found (e.g. background vs. focal) and when.
It woul be really great if you had a clever approach for this. My own solution is more of a workaround I came up with because I couldn't find a direct approach to this type of task.

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: 13K, Visits: 104K
> To collect the data of the mistake-search task in the script above I thought of the solution of creating small black rectangles
> which match the approximate size of the mistake area. Then I put the /transparentcolor attribute to (0,0,0) so that they are
> invisible and used these areas as sensitive areas for the /correctresponse in my trial. Now this works fine if you have one
> picture but if you have to create those rectangles for *every* mistake on *every* picture and then locate them properly on the
> picture whilst of course considering different monitor sizes and resolutions again this becomes a real hassle.

This is an apt approach and something *like* this is necessary: If you want the script to be able to tell whether a participant detected a given error area, the script *must* know the coordinates of the error areas for any given image in some fashion.

That does not mean that you have to set up six different *objects* per image. With six error areas per image, all you need is six objects in the script -- lets call them e1 to e6 -- and sets of their respective coordinates associated with each image (using e.g. <list> elements). Then position them dynamically in each trial according to the image that's been selected.

As for the two conceivable "modes" (time until *all* errors have been found vs. number of errors found within a given timeframe): Both are possible to implement. Decide on one and then go for it.

leluxe
leluxe
Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)
Group: Forum Members
Posts: 18, Visits: 85
Hi Dave,
i'd like to come back to this case once again, if I might.
I conducted a script that moves the sensitive areas for clicking (rectangles prdouced with Windows Paint) to their right places and furthermore counts how many clicks were made in total, how many on the mistake areas and when each click occured. So the most important things are done.
One point remains unsolved though: I need the program to show some kind of feedback for the participants when they click on one of the six mistakes. I'm thinking of a little red cross or maybe a point Or, if these aren't possible maybe even only removing the /transparentcolor attribute, so that the area turns black, would do. These feedback signals should remain in their place until the whole block is finished so that the participants know "Yep. I already found this one"
I tried to implement this by adapting a suggestion you made to another forum member: http://www.millisecond.com/forums/Topic17392.aspx
...with little or rather no success.
Do you have an idea what might be a good approach for my case? Given that there are already defined coordinates (areas) where the feedback is supposed to appear I hope that there is a rather straightforward solution.

You'll find a zip attached containing the stimuli and the script. Comments are in German. Relevant ist the lower half of the script, titled with "Fehlersuche". The first half is needed to secure the correct sizing and positioning of the stimuli.
Thanks in advance from a still-newbie in programming. Forgive me if I'm not seeing the obvious.

Best regards,
Pablo

Attachments
Search Task currentversion.zip (594 views, 1.00 MB)
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: 13K, Visits: 104K
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 (826 views, 14.00 KB)
leluxe
leluxe
Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)
Group: Forum Members
Posts: 18, Visits: 85
Thanks Dave, exactly what I needed. Didn't come up with the simple solution of responsemessage. Oh my, that was a lot easier than I thought.

Joel7
Joel7
New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)
Group: Forum Members
Posts: 1, Visits: 1
"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"

Well for that you need to know device pixel ratio (DPR) of the screen.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search