Mask std_dev question

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_size2, y_size2), yes?

Re: std_dev parameter: does mask have an actual standard dev on screen (in degrees) that is x_sizestd_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/2std_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

Hi Mark,

Size is the full length along one axis, correct? So the full stimulus square is x_size by y_size (not x_size2, y_size2), 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

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

Maybe this explanation is appropriate for the online docs?

Sure, I’ll add it.

Chris