evilandrex
|
|
Group: Forum Members
Posts: 5,
Visits: 23
|
Thank you, I was worried that I'd have to code all coordinates in. You have been great help. I believe this is a workable solution.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+xThanks for the help. I slept on this and looked back and reread everything and tried a couple of things. Your first post is very helpful and I think I can do most of what I want to do with that. However, there is still one problem and I'll try to reduce the problem down to this one thing. I have an 11x11 grid of images and I would like to present as stimulus. Two coordinates are generated to dictate exactly which image is presented on a stimulus frame (X/Y): 4/2 and 5/4. The goal is use the values of the coordinates to present the images. Effectively: I first need to present an image in the fourth column, second row and then an image from the fifth column, fourth row. Extending from this one example, the script must be able to take any 2 coordinates and select the correct image from the grid to present. > Extending from this one example, the script must be able to take any 2 coordinates and select the correct image from the grid to present. Suppose you have generated your two coordinates x and y. You can then insert the corresponding <picture> element into the trial's stimulus presentation via conditional logic /ontrialbegin. <trial exampletrial> / ontrialbegin = [if (values.x == 1 && values.y == 1) trial.exampletrial.inserstimulusframe(picture.1_1, 1); ] / ontrialbegin = [if (values.x == 2 && values.y == 1) trial.exampletrial.inserstimulusframe(picture.2_1, 1); ] / ontrialbegin = [if (values.x == 3 && values.y == 1) trial.exampletrial.inserstimulusframe(picture.3_1, 1); ] ... / ontrialbegin = [if (values.x == 4 && values.y == 2) trial.exampletrial.inserstimulusframe(picture.4_2, 1); ] ... / ontrialbegin = [if (values.x == 5 && values.y == 4) trial.exampletrial.inserstimulusframe(picture.5_4, 1); ] ... </trial>
|
|
|
evilandrex
|
|
Group: Forum Members
Posts: 5,
Visits: 23
|
Thanks for the help. I slept on this and looked back and reread everything and tried a couple of things. Your first post is very helpful and I think I can do most of what I want to do with that. However, there is still one problem and I'll try to reduce the problem down to this one thing.
I have an 11x11 grid of images and I would like to present as stimulus. Two coordinates are generated to dictate exactly which image is presented on a stimulus frame (X/Y): 4/2 and 5/4. The goal is use the values of the coordinates to present the images. Effectively: I first need to present an image in the fourth column, second row and then an image from the fifth column, fourth row. Extending from this one example, the script must be able to take any 2 coordinates and select the correct image from the grid to present.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+xTo clarify: We have a stimulus set of 121 images (11x11) that was systematically generated in such a way that the images can be organized into a square plane with 2 axes. Essentially, it's an 11x11 grid of images. The goal is to be able to present one image after another wherein the second image is selected by a Guassian distribution. The link was helpful but I'm not sure how to set it up such that it could select from a set of images. What does "[selecting] image by a Gaussian distribution" mean, please? Give a concrete example. Suppose the 1st image selected is the one in grid position 4 (horizontal) / 1 (vertical). What constitutes a Gaussian distribution around this image, please? So for your example it would be more likely to select an image closer to it in grid position (ex: 4/2 or 5/1) than say 1/1 or 6/2. Sorry, this does not really answer the question. Please show me exactly how the Gaussian distribution would look like. Not only for this special case, but also for the general case. Draw me a few pictures if that makes it easier for you to explain. Also, is every subsequent selection supposed to be based on the position of the 1st stimulus, or is the 3rd stimulus to be selected based on the grid position of the 2nd stimulus and so forth? I'm not trying to be dense, but I cannot help you if you can't make me understand exactly what you're after. A broad, relatively vague description with lots of blank spots is not enough for me here.
|
|
|
evilandrex
|
|
Group: Forum Members
Posts: 5,
Visits: 23
|
+x+xTo clarify: We have a stimulus set of 121 images (11x11) that was systematically generated in such a way that the images can be organized into a square plane with 2 axes. Essentially, it's an 11x11 grid of images. The goal is to be able to present one image after another wherein the second image is selected by a Guassian distribution. The link was helpful but I'm not sure how to set it up such that it could select from a set of images. What does "[selecting] image by a Gaussian distribution" mean, please? Give a concrete example. Suppose the 1st image selected is the one in grid position 4 (horizontal) / 1 (vertical). What constitutes a Gaussian distribution around this image, please? So for your example it would be more likely to select an image closer to it in grid position (ex: 4/2 or 5/1) than say 1/1 or 6/2.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+xTo clarify: We have a stimulus set of 121 images (11x11) that was systematically generated in such a way that the images can be organized into a square plane with 2 axes. Essentially, it's an 11x11 grid of images. The goal is to be able to present one image after another wherein the second image is selected by a Guassian distribution. The link was helpful but I'm not sure how to set it up such that it could select from a set of images. What does "[selecting] image by a Gaussian distribution" mean, please? Give a concrete example. Suppose the 1st image selected is the one in grid position 4 (horizontal) / 1 (vertical). What constitutes a Gaussian distribution around this image, please?
|
|
|
evilandrex
|
|
Group: Forum Members
Posts: 5,
Visits: 23
|
To clarify: We have a stimulus set of 121 images (11x11) that was systematically generated in such a way that the images can be organized into a square plane with 2 axes. Essentially, it's an 11x11 grid of images. The goal is to be able to present one image after another wherein the second image is selected by a Guassian distribution.
The link was helpful but I'm not sure how to set it up such that it could select from a set of images.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+xHello, I'm trying to create an experiment that requires for two different stimuli from a 2D stimulus space. First a random stimulus is selected from the 11x11 matrix, this is not difficult. Afterwards, another stimulus needs to be selected from the space using a normal distribution centred upon the first stimulus. I can't figure out how to efficiently make this selection. Any advice would be greatly appreciated. > another stimulus needs to be selected from the space using a normal distribution centred upon the first stimulus Not sure what that's supposed to mean exactly -- i.e. do you want to select an x coordinate based on a normal distribution around the 1st stimulus' x coordinate, and a y coordinate based on a normal distribution around the y coordinate of the 1st stimulus, or something else? In what unit? This could be construed in many different ways. At any rate, if you need to generate values from a normal / Gaussian distribution with a specified mean and standard deviation, you can build an inverse transformation sampler: https://www.millisecond.com/forums/FindPost8437.aspxI.e., you would set values.mu to the x coordinate of the 1st stimulus and then generate a 2nd x coordinate sampled from the Gaussian, and then the same for the y coordinates. Perhaps this gives you some idea where to start.
|
|
|
evilandrex
|
|
Group: Forum Members
Posts: 5,
Visits: 23
|
Hello,
I'm trying to create an experiment that requires for two different stimuli from a 2D stimulus space. First a random stimulus is selected from the 11x11 matrix, this is not difficult. Afterwards, another stimulus needs to be selected from the space using a normal distribution centred upon the first stimulus. I can't figure out how to efficiently make this selection. Any advice would be greatly appreciated.
|
|
|