KatrinaMcDonough
|
|
Group: Forum Members
Posts: 45,
Visits: 235
|
Hello, I am working on a task : https://mili2nd.eu/2n6bIn this task, you hear a person say something and then see their hand begin to reach or withdraw from an object. A line (with a segment missing) then appears on the screen. This line should be exactly in line with the tip of the persons fingers (most leftward position of their hand). Like this : The line seems to be aligned correctly when I run the task using a monitor with 1920x1080 resolution. When I run the task on a different resolution, the line is not aligned correctly, like this: I tried to resolve this using the canvas size settings but the problem currently persists. The task is programmed using image stimuli that are 1920x1080 and a list of the x and y coordinates (in pixels) of the tip of fingers that is used to position the line. Please could you help me resolve this issue so that the line is always shown in the correct position on all monitors. Thanks, Katrina
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+xHello, I am working on a task : https://mili2nd.eu/2n6bIn this task, you hear a person say something and then see their hand begin to reach or withdraw from an object. A line (with a segment missing) then appears on the screen. This line should be exactly in line with the tip of the persons fingers (most leftward position of their hand). Like this : The line seems to be aligned correctly when I run the task using a monitor with 1920x1080 resolution. When I run the task on a different resolution, the line is not aligned correctly, like this: I tried to resolve this using the canvas size settings but the problem currently persists. The task is programmed using image stimuli that are 1920x1080 and a list of the x and y coordinates (in pixels) of the tip of fingers that is used to position the line. Please could you help me resolve this issue so that the line is always shown in the correct position on all monitors. Thanks, Katrina Please show your math explain how exactly you implemented "The task is programmed using image stimuli that are 1920x1080 and a list of the x and y coordinates (in pixels) of the tip of fingers that is used to position the line."
|
|
|
KatrinaMcDonough
|
|
Group: Forum Members
Posts: 45,
Visits: 235
|
+x+xHello, I am working on a task : https://mili2nd.eu/2n6bIn this task, you hear a person say something and then see their hand begin to reach or withdraw from an object. A line (with a segment missing) then appears on the screen. This line should be exactly in line with the tip of the persons fingers (most leftward position of their hand). Like this : The line seems to be aligned correctly when I run the task using a monitor with 1920x1080 resolution. When I run the task on a different resolution, the line is not aligned correctly, like this: I tried to resolve this using the canvas size settings but the problem currently persists. The task is programmed using image stimuli that are 1920x1080 and a list of the x and y coordinates (in pixels) of the tip of fingers that is used to position the line. Please could you help me resolve this issue so that the line is always shown in the correct position on all monitors. Thanks, Katrina Please show your math explain how exactly you implemented "The task is programmed using image stimuli that are 1920x1080 and a list of the x and y coordinates (in pixels) of the tip of fingers that is used to position the line." Hello, Thanks for your response. I've simplified my script below (and in the link above) to illustrate my issue more clearly. My issue is that I want to display two stimuli simultaneously (hand and line) and I want to position these so that the line appears over the hand at specific x and y coordinates. When I run the task on my monitor (which is 1920x1080 resolution), the line appears exactly where I want it to appear, but when using different screen resolution, the line appears in a different position relative to the hand. I would like to know how I can program the position of the line so that it appears in the same position relative to the hand on all monitors. <defaults> / screencolor = black / canvasaspectratio = (1920, 1080) / canvasposition = (50%, 50%) / canvassize = (100%, 100%) </defaults> <picture Hand_pic> / erase = false / items = ("bon10.jpg") / position = (50%, 50%) / size = (50%, 50%) </picture> <picture Line_pic> / erase = false / items = ("probe_laser_3.png") / hposition = values.X_coord / halign = center / vposition = values.Y_coord / valign = center / size = (50%, 50%) </picture> <values> /X_coord = 0 /Y_coord = 0 </values> <trial Trial> / pretrialpause = 1000 / ontrialbegin = [values.X_coord = 1px * 1033; values.Y_coord = 1px * 660] / stimulustimes = [0 = Hand_pic, Line_pic] / trialduration = 10000 </trial> Thanks, Katrina
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+xHello, I am working on a task : https://mili2nd.eu/2n6bIn this task, you hear a person say something and then see their hand begin to reach or withdraw from an object. A line (with a segment missing) then appears on the screen. This line should be exactly in line with the tip of the persons fingers (most leftward position of their hand). Like this : The line seems to be aligned correctly when I run the task using a monitor with 1920x1080 resolution. When I run the task on a different resolution, the line is not aligned correctly, like this: I tried to resolve this using the canvas size settings but the problem currently persists. The task is programmed using image stimuli that are 1920x1080 and a list of the x and y coordinates (in pixels) of the tip of fingers that is used to position the line. Please could you help me resolve this issue so that the line is always shown in the correct position on all monitors. Thanks, Katrina Please show your math explain how exactly you implemented "The task is programmed using image stimuli that are 1920x1080 and a list of the x and y coordinates (in pixels) of the tip of fingers that is used to position the line." Hello, Thanks for your response. I've simplified my script below (and in the link above) to illustrate my issue more clearly. My issue is that I want to display two stimuli simultaneously (hand and line) and I want to position these so that the line appears over the hand at specific x and y coordinates. When I run the task on my monitor (which is 1920x1080 resolution), the line appears exactly where I want it to appear, but when using different screen resolution, the line appears in a different position relative to the hand. I would like to know how I can program the position of the line so that it appears in the same position relative to the hand on all monitors. <defaults> / screencolor = black / canvasaspectratio = (1920, 1080) / canvasposition = (50%, 50%) / canvassize = (100%, 100%) </defaults> <picture Hand_pic> / erase = false / items = ("bon10.jpg") / position = (50%, 50%) / size = (50%, 50%) </picture> <picture Line_pic> / erase = false / items = ("probe_laser_3.png") / hposition = values.X_coord / halign = center / vposition = values.Y_coord / valign = center / size = (50%, 50%) </picture> <values> /X_coord = 0 /Y_coord = 0 </values> <trial Trial> / pretrialpause = 1000 / ontrialbegin = [values.X_coord = 1px * 1033; values.Y_coord = 1px * 660] / stimulustimes = [0 = Hand_pic, Line_pic] / trialduration = 10000 </trial> Thanks, Katrina Well, obviously / ontrialbegin = [values.X_coord = 1px * 1033; values.Y_coord = 1px * 660] x = 1033px, y = 660px points to an entirely different position on a display that's 1920 * 1080 pixels compared to a display that's, say, 1600 * 900 pixels. Easy enough to see if you convert to percentages: 1033/1920 = 53.8% 660/1080 = 61.1% whereas 1033/1600 = 64.6% 660/900 = 73.3% Just work in percentages instead of absolute pixel values, which will necessarily differ between systems. <defaults> / screencolor = black / canvasaspectratio = (16, 9) // 1920 * 1080 is a 16:9 aspect ratio / canvasposition = (50%, 50%) / canvassize = (100%, 100%) </defaults> <picture Hand_pic> / erase = false / items = ("bon10.jpg") / position = (50%, 50%) / size = (50%, 50%) </picture> <picture Line_pic> / erase = false / items = ("probe_laser_3.png") / hposition = values.X_coord / halign = center / vposition = values.Y_coord / valign = center / size = (50%, 50%) </picture> <values> /X_coord = 0 /Y_coord = 0 </values> <trial Trial> / pretrialpause = 1000 / ontrialbegin = [values.X_coord = 1px * display.canvaswidth * (1033/1920); values.Y_coord = 1px * display.canvasheight * (660/1080)]/ stimulustimes = [0 = Hand_pic, Line_pic] / trialduration = 10000 </trial>
|
|
|
KatrinaMcDonough
|
|
Group: Forum Members
Posts: 45,
Visits: 235
|
+x+x+x+xHello, I am working on a task : https://mili2nd.eu/2n6bIn this task, you hear a person say something and then see their hand begin to reach or withdraw from an object. A line (with a segment missing) then appears on the screen. This line should be exactly in line with the tip of the persons fingers (most leftward position of their hand). Like this : The line seems to be aligned correctly when I run the task using a monitor with 1920x1080 resolution. When I run the task on a different resolution, the line is not aligned correctly, like this: I tried to resolve this using the canvas size settings but the problem currently persists. The task is programmed using image stimuli that are 1920x1080 and a list of the x and y coordinates (in pixels) of the tip of fingers that is used to position the line. Please could you help me resolve this issue so that the line is always shown in the correct position on all monitors. Thanks, Katrina Please show your math explain how exactly you implemented "The task is programmed using image stimuli that are 1920x1080 and a list of the x and y coordinates (in pixels) of the tip of fingers that is used to position the line." Hello, Thanks for your response. I've simplified my script below (and in the link above) to illustrate my issue more clearly. My issue is that I want to display two stimuli simultaneously (hand and line) and I want to position these so that the line appears over the hand at specific x and y coordinates. When I run the task on my monitor (which is 1920x1080 resolution), the line appears exactly where I want it to appear, but when using different screen resolution, the line appears in a different position relative to the hand. I would like to know how I can program the position of the line so that it appears in the same position relative to the hand on all monitors. <defaults> / screencolor = black / canvasaspectratio = (1920, 1080) / canvasposition = (50%, 50%) / canvassize = (100%, 100%) </defaults> <picture Hand_pic> / erase = false / items = ("bon10.jpg") / position = (50%, 50%) / size = (50%, 50%) </picture> <picture Line_pic> / erase = false / items = ("probe_laser_3.png") / hposition = values.X_coord / halign = center / vposition = values.Y_coord / valign = center / size = (50%, 50%) </picture> <values> /X_coord = 0 /Y_coord = 0 </values> <trial Trial> / pretrialpause = 1000 / ontrialbegin = [values.X_coord = 1px * 1033; values.Y_coord = 1px * 660] / stimulustimes = [0 = Hand_pic, Line_pic] / trialduration = 10000 </trial> Thanks, Katrina Well, obviously / ontrialbegin = [values.X_coord = 1px * 1033; values.Y_coord = 1px * 660] x = 1033px, y = 660px points to an entirely different position on a display that's 1920 * 1080 pixels compared to a display that's, say, 1600 * 900 pixels. Easy enough to see if you convert to percentages: 1033/1920 = 53.8% 660/1080 = 61.1% whereas 1033/1600 = 64.6% 660/900 = 73.3% Just work in percentages instead of absolute pixel values, which will necessarily differ between systems. <defaults> / screencolor = black / canvasaspectratio = (16, 9) // 1920 * 1080 is a 16:9 aspect ratio / canvasposition = (50%, 50%) / canvassize = (100%, 100%) </defaults> <picture Hand_pic> / erase = false / items = ("bon10.jpg") / position = (50%, 50%) / size = (50%, 50%) </picture> <picture Line_pic> / erase = false / items = ("probe_laser_3.png") / hposition = values.X_coord / halign = center / vposition = values.Y_coord / valign = center / size = (50%, 50%) </picture> <values> /X_coord = 0 /Y_coord = 0 </values> <trial Trial> / pretrialpause = 1000 / ontrialbegin = [values.X_coord = 1px * display.canvaswidth * (1033/1920); values.Y_coord = 1px * display.canvasheight * (660/1080)]/ stimulustimes = [0 = Hand_pic, Line_pic] / trialduration = 10000 </trial> Thanks for your response. In response to "x = 1033px, y = 660px...points to an entirely different position on a display that's 1920 * 1080 pixels compared to a display that's, say, 1600 * 900 pixels. " My thinking was that "/ canvasaspectratio = (1920, 1080)" would create a display
|
|
|
KatrinaMcDonough
|
|
Group: Forum Members
Posts: 45,
Visits: 235
|
Apologies, my last post was sent in error - I see now where I went wrong. Thanks for the help.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+x+x+xHello, I am working on a task : https://mili2nd.eu/2n6bIn this task, you hear a person say something and then see their hand begin to reach or withdraw from an object. A line (with a segment missing) then appears on the screen. This line should be exactly in line with the tip of the persons fingers (most leftward position of their hand). Like this : The line seems to be aligned correctly when I run the task using a monitor with 1920x1080 resolution. When I run the task on a different resolution, the line is not aligned correctly, like this: I tried to resolve this using the canvas size settings but the problem currently persists. The task is programmed using image stimuli that are 1920x1080 and a list of the x and y coordinates (in pixels) of the tip of fingers that is used to position the line. Please could you help me resolve this issue so that the line is always shown in the correct position on all monitors. Thanks, Katrina Please show your math explain how exactly you implemented "The task is programmed using image stimuli that are 1920x1080 and a list of the x and y coordinates (in pixels) of the tip of fingers that is used to position the line." Hello, Thanks for your response. I've simplified my script below (and in the link above) to illustrate my issue more clearly. My issue is that I want to display two stimuli simultaneously (hand and line) and I want to position these so that the line appears over the hand at specific x and y coordinates. When I run the task on my monitor (which is 1920x1080 resolution), the line appears exactly where I want it to appear, but when using different screen resolution, the line appears in a different position relative to the hand. I would like to know how I can program the position of the line so that it appears in the same position relative to the hand on all monitors. <defaults> / screencolor = black / canvasaspectratio = (1920, 1080) / canvasposition = (50%, 50%) / canvassize = (100%, 100%) </defaults> <picture Hand_pic> / erase = false / items = ("bon10.jpg") / position = (50%, 50%) / size = (50%, 50%) </picture> <picture Line_pic> / erase = false / items = ("probe_laser_3.png") / hposition = values.X_coord / halign = center / vposition = values.Y_coord / valign = center / size = (50%, 50%) </picture> <values> /X_coord = 0 /Y_coord = 0 </values> <trial Trial> / pretrialpause = 1000 / ontrialbegin = [values.X_coord = 1px * 1033; values.Y_coord = 1px * 660] / stimulustimes = [0 = Hand_pic, Line_pic] / trialduration = 10000 </trial> Thanks, Katrina Well, obviously / ontrialbegin = [values.X_coord = 1px * 1033; values.Y_coord = 1px * 660] x = 1033px, y = 660px points to an entirely different position on a display that's 1920 * 1080 pixels compared to a display that's, say, 1600 * 900 pixels. Easy enough to see if you convert to percentages: 1033/1920 = 53.8% 660/1080 = 61.1% whereas 1033/1600 = 64.6% 660/900 = 73.3% Just work in percentages instead of absolute pixel values, which will necessarily differ between systems. <defaults> / screencolor = black / canvasaspectratio = (16, 9) // 1920 * 1080 is a 16:9 aspect ratio / canvasposition = (50%, 50%) / canvassize = (100%, 100%) </defaults> <picture Hand_pic> / erase = false / items = ("bon10.jpg") / position = (50%, 50%) / size = (50%, 50%) </picture> <picture Line_pic> / erase = false / items = ("probe_laser_3.png") / hposition = values.X_coord / halign = center / vposition = values.Y_coord / valign = center / size = (50%, 50%) </picture> <values> /X_coord = 0 /Y_coord = 0 </values> <trial Trial> / pretrialpause = 1000 / ontrialbegin = [values.X_coord = 1px * display.canvaswidth * (1033/1920); values.Y_coord = 1px * display.canvasheight * (660/1080)]/ stimulustimes = [0 = Hand_pic, Line_pic] / trialduration = 10000 </trial> Thanks for your response. In response to "x = 1033px, y = 660px...points to an entirely different position on a display that's 1920 * 1080 pixels compared to a display that's, say, 1600 * 900 pixels. " My thinking was that "/ canvasaspectratio = (1920, 1080)" would create a display > My thinking was that "/ canvasaspectratio = (1920, 1080)" would create a display It defines an aspect ratio. Inquisit cannot make a display that only has 1600*900 pixels magically have 1920 * 1080 pixels. That's a physical impossibility.
|
|
|