[visionegg] Re: doing matrix math on stimuli

  • From: Andrew Straw <astraw@xxxxxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Tue, 04 Aug 2009 17:01:31 +0200

Stanley Govenlock wrote:
Hello Vision Eggers,

I'm making the transition from Psychtoolbox+MatLab to VE. I'm being frustrated, though, by my inability to be able to actually put my hands on the stimuli.

Consider the following 1 line of code:

stimuli  = SinGrating2D(...stuff...)

Let's say I want to custom build some masking arrays (matrixes of numbers), and multiply those arrays by "stimuli" *(from above), as I'm used to doing with MatLab/Psychtoolbox. (I know of Mask2D, but I want to employ different masking functions). I can build those masking arrays, but I cannot just multiply them by "stimuli". ...I've been told this might have something to do with viewport...

(Bear in mind, if you will, that I'm not too familiar with Vision Egg's object-oriented programming. I'm more used to "linear" scripting in matlab...)


Dear Stan,

You may be more familiar with using the CPU to draw stimuli. (As opposed to the GPU, which the VE uses for the most part.) If so, I think you'll be best served by doing something like the visual_jitter.py demo and computing the frames yourself. You could pre-render them or render them on the fly (if your CPU is fast enough and your requirements are modest enough). This would have the side benefit that you'd be mostly using numpy arrays, which are more generally useful than low-level opengl programming that the VE stimuli are drawn with.

-Andrew

--
Andrew D. Straw, Ph.D.
California Institute of Technology
http://www.its.caltech.edu/~astraw/
======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: