[visionegg] Mask2D and SinGrating2D problem
- From: Constantin Buzduga <vv_tinu@xxxxxxxxx>
- To: visionegg@xxxxxxxxxxxxx
- Date: Sun, 4 Sep 2005 20:34:18 -0700 (PDT)
Hi everyone,
I'm a very new user of python and VisionEgg, I'm working on a
stimulus generator project right now and, due to a very limited
available time, I had to learn everything on the go. I have
programming experience in some other languages, including
object-oriented, and this helped a lot. So far it worked out pretty
well, but now I'm facing some problems that I think I can't just go
round them, I have to learn more about the language itself to be able
to understand why it works the way it works.
So my first question (not really related to the message title) would
be, how can I find the members and methods of the different classes?
I couldn't find all the information I needed on the visionegg.org
site, so I guess you must have learned some other way. Also, is there
any kind of help/detailed manual to know what every method does, and
maybe how it does it? I'm not very clear here, but the next problem I
have will probably help you understand what I mean:
I'm triyng to generate a moving stimulus, the stimulus properties are
set in a GUI window, then I use a presentation and some controllers
for the graphical part. What I'm triyng to do right now is a moving
circle, with or without a singrating on it (I use the same color1 and
color2 and temporal_freq_hz = 0 for the circle without the grating on
it). I'm using the singrating with a circle mask on it. The size of
the circle is one of the parameters set in the GUI window: using the
diameter of the circle, I set the singrating's size to
(diameter,diameter). Changing the mask isn't a solution, as it would
be way too slow, I already tried this. Below is the code with the
"original" parameters of the mask and grating, before the action of
the controllers, and the controller:
mask = Mask2D(function='circle',
radius_parameter=300,
num_samples=(512,512))
grating = SinGrating2D(mask = mask,
position = ( 400,300 ),
size = ( 600.0 , 600.0 ),
spatial_freq = 0.0125,
temporal_freq_hz = 0.0,
color1 = (0.0,0.0,0.0),
color2 = (1.0,1.0,1.0),
on = 1,
orientation = 45.0 )
p.add_controller(grating,'size',FunctionController(during_go_func=lambda
t: eval(gui_window.spot_diameter.get()),
eval(gui_window.spot_diameter.get()) ))
The problem is, when I set the size of the grating to (600,600), the
circle shown on the screen is not the same height as my my screen
(800x600 px), it's smaller less than 500px in diameter, I'd say!!!
Can you please help me with this?This is why I was saying, I must
understand what each parameter does, to be able to do this right. I
don't know what "num_samples" does, and the info in the visionegg.org
documentation didn't clear this out for me. I also don't know ho the
radius_parameter influences the circle mask, and how it is correlated
with num_samples.
I think the problem with the wrong dimensions of my circle must
originate somewhere in this piece of code, but I can't figure out
where. Thank you for your help and your time!
Constantin.
______________________________________________________
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
- Follow-Ups:
- [visionegg] Re: Mask2D and SinGrating2D problem
- From: Mark Halko
Other related posts:
- » [visionegg] Mask2D and SinGrating2D problem
- » [visionegg] Re: Mask2D and SinGrating2D problem
- » [visionegg] Re: Mask2D and SinGrating2D problem
- [visionegg] Re: Mask2D and SinGrating2D problem
- From: Mark Halko