[visionegg] Re: help with Mask2D
- From: Andrew Straw <astraw@xxxxxxxxxxx>
- To: visionegg@xxxxxxxxxxxxx
- Date: Tue, 22 Feb 2005 11:38:06 -0800
Kevin J. MacKenzie wrote:
Hi Everyone,
I have attached some code that creates a white noise patch, and
displays it drifting through a aperture on screen. I would like to
add either a gaussian or circular mask to the pattern, and I'm
wondering if there is a way to use the Mask2D class instead of
calculating a gaussian window myself?
I am creating a texture of this white noise pattern for display, but
I'm stuck in terms of how to add a mask to it - if it is even possible
using the VisionEgg mask class.
Any help is greatly appreciated,
Kevin MacKenzie
Dear Kevin,
The TextureStimulus class (which you're using) supports a mask defined
this way:
mask = Mask2D(function='gaussian', # also supports 'circle'
radius_parameter=25, # sigma for gaussian, radius for
circle (units: num_samples)
num_samples=(256,256)) # this many texture elements in
mask (covers whole size specified in TextureStimulus)
then, you need to modify your texture stimulus:
NoiseStim = TextureStimulus(texture = NoiseTexture,
mask=mask, ...
This works for me with your stimulus. You may want to double check the
math in the Mask2D gaussian path to make sure it's doing what you think
it's doing. (And let me know if you think it's doing something wrong.)
Cheers!
Andrew
--
Andrew D. Straw Post-doctoral scholar
,-. Dickinson Lab
\_/ California Institute of Technology
8||} Mailcode 138-78
/ \ Pasadena CA 91125, USA
`-^
email: astraw@xxxxxxxxxxx
office: +1 626 395 4396
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
- References:
- [visionegg] help with Mask2D
- From: Kevin J. MacKenzie
Other related posts:
- » [visionegg] help with Mask2D
- » [visionegg] Re: help with Mask2D
Hi Everyone,
I have attached some code that creates a white noise patch, and displays it drifting through a aperture on screen. I would like to add either a gaussian or circular mask to the pattern, and I'm wondering if there is a way to use the Mask2D class instead of calculating a gaussian window myself?
I am creating a texture of this white noise pattern for display, but I'm stuck in terms of how to add a mask to it - if it is even possible using the VisionEgg mask class.
Any help is greatly appreciated,
Kevin MacKenzie
====================================== The Vision Egg mailing list Archives: http://www.freelists.org/archives/visionegg Website: http://www.visionegg.org/mailinglist.html
- [visionegg] help with Mask2D
- From: Kevin J. MacKenzie