Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
rogatijm

Junior Member
Registered:
Posts: 9
Reply with quote  #1 
Hello all,

I am wondering if anyone has had a similar issue:

I am trying to layer a sine wave drifting grating over a static background image. Regardless of the way in which I order the ImageGraphic and SineGrating adapters, the static background image always covers the sine gratings. Additionally, I have tried using the same image as .png, .bmp, and .jpg, but none of them make a difference. I'd appreciate if anyone has experience with this issue and can offer some advice.
0
daddaoua

Junior Member
Registered:
Posts: 5
Reply with quote  #2 
Try to put the image first in the condition file, say task object 2, then the gratings as task object 3
0
rogatijm

Junior Member
Registered:
Posts: 9
Reply with quote  #3 
Since I am using the NIMH version of MonkeyLogic, I didn't have to include these as task objects in the conditions file. Rather, they are adapters that can be coded directly into the timing file. But regardless of which order I put them in, the background still covers the gratings.

For reference, I am using the ImageGraphic adapter for the background, and the SineGrating adapter for the gratings. The code looks similar to the sample codes in the runtime V2 manual, like this:

...

img = ImageGraphic(null_);
img.List = { {'graybackground.bmp'}, [0 0] };

grat = SineGrating(img);
grat.Position = [0 0];
grat.Radius = 3;
grat.Direction = 45;
grat.SpatialFrequency = 1;
grat.TemporalFrequency = 2;
grat.WindowType = 'circular';

...

If anyone has suggestions, I'd appreciate it.
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #4 
You must be using an older version of the SineGrating. Please update.
0
rogatijm

Junior Member
Registered:
Posts: 9
Reply with quote  #5 
Hi Jaewon,

The updated code worked, thank you for the suggestion!

Additionally, is there a way to have the static image remain on the screen during the ITI? Thank you again.
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #6 
Please wait for the next update.
0
rogatijm

Junior Member
Registered:
Posts: 9
Reply with quote  #7 
Thank you Jaewon, I'll be looking out for the update.

Additionally, I am trying to vary the phase angle between two separate gratings on the screen at the same time. Is there a way to do this at the present moment, or will this be in a future update as well?
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #8 
Hi rogatijm,

If you don't clear the screen at the end of trials, visual stimuli stay on during ITI. Are you saying it is not the case?
0
rogatijm

Junior Member
Registered:
Posts: 9
Reply with quote  #9 
Hi Jaewon,

I am not using "idle" anywhere in the code. I only use "set_iti" at the end of the trial, but that shouldn't clear the screen, right?
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #10 
No, it shouldn't. Do you turn on the photodiode trigger?
0
rogatijm

Junior Member
Registered:
Posts: 9
Reply with quote  #11 
I am using the photodiode. I'm turning it on in the main menu screen.
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #12 
Thanks for the confirmation. To start every trial with the white square on, the photodiode trigger has to be turned off during ITI, which clears the screen. Let me see what I can do.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.