mask std_dev question

mhisted's Avatar

mhisted

06 May, 2019 01:39 PM

Hi Chris,

I looked at the online doc but couldn't easily determine the answer to this:

For a gaussian mask stimulus, there is a size and a std dev parameter.

Size is the full length along one axis, correct? So the full stimulus square is x_size by y_size (not x_size*2, y_size*2), yes?

Re: std_dev parameter: does mask have an actual standard dev on screen (in degrees) that is x_size*std_dev? So if we set std_dev to 0.3, and size is 10, then mask std_dev_degrees is 3, and from the peak, there are about 1.8 std. devs visible to the nearest edge? (i.e., (size_x/2) * std_dev) I suspect this might not be correct because at std_dev==3, the pixel values are indistinguishable from the background which I'd suspect happens only around 3 std. devs from the peak. (So then is the actual on screen standard dev: size/2*std_dev, i.e. 1.5 in above example?)

Let me know if I can make this more clear. I'd look at the code but I also wanted to confirm your intention.

Thanks,
Mark

  1. Support Staff 1 Posted by Christopher Sta... on 06 May, 2019 06:10 PM

    Christopher Stawarz's Avatar

    Hi Mark,

    Size is the full length along one axis, correct? So the full stimulus square is x_size by y_size (not x_size*2, y_size*2), yes?

    Correct.

    So then is the actual on screen standard dev: size/2*std_dev, i.e. 1.5 in above example?

    Yes, that's right. The Gaussian mask is computed on a 2x2 square, centered at the origin, using the equation

    exp(-1.0 * (dist - mean) * (dist - mean) / (2.0 * stdDev * stdDev))
    

    where dist is distance from the center. The mask is then stretched to cover a rectangle of x_size by y_size degrees. If the x and y sizes are equal, then the mask is scaled by size/2 in both directions, so std_dev has units of size/2 degrees.

    Chris

  2. 2 Posted by mhisted on 06 May, 2019 07:14 PM

    mhisted's Avatar

    Thanks! Maybe this explanation is appropriate for the online docs? I'm sure I will forget this in the future and have to refer back to it.

    Mark

  3. Support Staff 3 Posted by Christopher Sta... on 07 May, 2019 02:05 PM

    Christopher Stawarz's Avatar

    Maybe this explanation is appropriate for the online docs?

    Sure, I'll add it.

    Chris

  4. Christopher Stawarz closed this discussion on 14 May, 2019 02:34 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac