Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
castiel

Junior Member
Registered:
Posts: 27
Reply with quote  #1 
Hello, guys, I'm Castiel[biggrin], our behaviour task is the oculomotor delayed response task, we are trying to improve our program so that our monkey can perform better.  

Here we get stucked in a big problem:  

{In this task, when the delay period is over, and center off, the monkey should make response and saccade to the right oriention object. so, in the saccade period,  we want to use arrow or somthingelse  (like the picture i show you) to guide the monkey saccade to the right position, so i wonder how to make this happen?}

22-11-38 6-14-2018 32082.gif 
This GIF picture is taked in the saccade period, i know how to move my fixation point to the target point, but i can only move the fixation point one time, and one destination.  i can't match the reposition object together with the position of cue.

the code i used is : success = reposition_object(object_number, new_xpos, new_ypos)

So what should i do to be the same as the picture shows?

@Jaewon, Sorry for that i post this problem in the forum,

really expect for your helps[smile]

0
Jaewon

Administrator
Registered:
Posts: 627
Reply with quote  #2 
You need to describe what your task is supposed to do step by step. The picture you posted is not the ODR task. The sliding circle is making it as a pursuit task. If it is a task you made, you should just turn off the circle when the saccade period begins. Mks do not know the meaning of an arrow, so it won't be helpful.
0
castiel

Junior Member
Registered:
Posts: 27
Reply with quote  #3 
Quote:
Originally Posted by Jaewon
You need to describe what your task is supposed to do step by step. The picture you posted is not the ODR task. The sliding circle is making it as a pursuit task. If it is a task you made, you should just turn off the circle when the saccade period begins. Mks do not know the meaning of an arrow, so it won't be helpful.
Okay, Thank you ,Dear Jaewon, the arrow is not a good choice, so i send my task to your email, please check it, thank you so much
0
Jaewon

Administrator
Registered:
Posts: 627
Reply with quote  #4 
To present a guide to the target location, you can make another fix taskobject at the target location and turn it on when you turn off the fix point at the center.

If you use reposition_object, you need to put the moved fix point back to the center before the trial ends, so that it shows up at the center again in the next trial.

reposition_object(fixation_point, StimulusInfo(cue).Position);  % This moves the fp to the cue location
...
...
reposition_object(fixation_point, [0 0]);  % Move the fp to the center

I think your task is way too slow for a mk oculomotor task. I would make it 5 times faster. Also the targets seems a little close to the fix point. They can see a target 7-8 degrees away with no problem.
0
castiel

Junior Member
Registered:
Posts: 27
Reply with quote  #5 
Quote:
Originally Posted by Jaewon
To present a guide to the target location, you can make another fix taskobject at the target location and turn it on when you turn off the fix point at the center.

If you use reposition_object, you need to put the moved fix point back to the center before the trial ends, so that it shows up at the center again in the next trial.

reposition_object(fixation_point, StimulusInfo(cue).Position);  % This moves the fp to the cue location
...
...
reposition_object(fixation_point, [0 0]);  % Move the fp to the center

I think your task is way too slow for a mk oculomotor task. I would make it 5 times faster. Also the targets seems a little close to the fix point. They can see a target 7-8 degrees away with no problem.
  Haha, it works!! thank you so much, so i wander how can i change the move speed of the fixation point? maybe i need it can be a little slower, By the way, we gave the monkey 10 degrees and he performed well, Thanks for your advice[biggrin]
0
Jaewon

Administrator
Registered:
Posts: 627
Reply with quote  #6 
You can take a look at the set_object_path function and the example in the 'task\runtime v1\7 spotlight' directory, but, if showing a sliding circle is your training plan for the ODR, I don't think it is a good idea. Your mks will learn the task fine with the current version. If the sliding circle is there, mks do not need to memorize the target location and will be more confused when it is not shown.
0
castiel

Junior Member
Registered:
Posts: 27
Reply with quote  #7 
Quote:
Originally Posted by Jaewon
You can take a look at the set_object_path function and the example in the 'task\runtime v1\7 spotlight' directory, but, if showing a sliding circle is your training plan for the ODR, I don't think it is a good idea. Your mks will learn the task fine with the current version. If the sliding circle is there, mks do not need to memorize the target location and will be more confused when it is not shown.
Hello, can you explain this code for me?

xpath = [0:0.04:3 3:-0.04:-3 -3:0.04:0];
ypath = zeros(size(xpath));


I know the key is to set the path of cuePosition,but i don't understand this two codes
0
Jaewon

Administrator
Registered:
Posts: 627
Reply with quote  #8 
They are X & Y coordinates where the pic is supposed to move to. Type the code on the MATLAB command window and see the result. Since Y is all 0, the pic will move along the horizontal line.
0
castiel

Junior Member
Registered:
Posts: 27
Reply with quote  #9 
Quote:
Originally Posted by Jaewon
They are X & Y coordinates where the pic is supposed to move to. Type the code on the MATLAB command window and see the result. Since Y is all 0, the pic will move along the horizontal line.
sorry, Jaewon, i have tried many times, finally it works in the simulation mod, but when i run the task more times, it seems like get crashed again, it's probably the wrong set of my x,ypath....


pic = 1;
xpath = StimulusInfo(cue).Position;
ypath = StimulusInfo(cue).Position;
set_object_path(pic, xpath, ypath);
toggleobject(pic);
idle(1000);
toggleobject(pic);




0
Jaewon

Administrator
Registered:
Posts: 627
Reply with quote  #10 
I don't think you understand the point. The pic doesn't automatically slide to where you want. You have to give it a series of coordinates that it has to jump to frame by frame. Try this.

pic = 1;
cue = 2;
duration = 1000;   % msec
refreshrate = 60;  % Hz
nframe = duration / 1000 * refreshrate;
xpath = [linspace(0,StimulusInfo(cue).Position(1),nframe) repmat(StimulusInfo(cue).Position(1),1,10)];
ypath = [linspace(0,StimulusInfo(cue).Position(2),nframe) repmat(StimulusInfo(cue).Position(2),1,10)];
set_object_path(pic, xpath, ypath);
toggleobject(pic);
idle(duration);
toggleobject(pic);

0
castiel

Junior Member
Registered:
Posts: 27
Reply with quote  #11 
Quote:
Originally Posted by Jaewon
I don't think you understand the point. The pic doesn't automatically slide to where you want. You have to give it a series of coordinates that it has to jump to frame by frame. Try this.

pic = 1;
cue = 2;
duration = 1000;   % msec
refreshrate = 60;  % Hz
nframe = duration / 1000 * refreshrate;
xpath = [linspace(0,StimulusInfo(cue).Position(1),nframe) repmat(StimulusInfo(cue).Position(1),1,10)];
ypath = [linspace(0,StimulusInfo(cue).Position(2),nframe) repmat(StimulusInfo(cue).Position(2),1,10)];
set_object_path(pic, xpath, ypath);
toggleobject(pic);
idle(duration);
toggleobject(pic);

 haha,[tongue] Actually i totally don't understand many things about the programme, "linspace" and "repmat"...It's hard for me to understand what's their mean and function now. thanks, i will test it now
0
castiel

Junior Member
Registered:
Posts: 27
Reply with quote  #12 
Quote:
Originally Posted by Jaewon
I don't think you understand the point. The pic doesn't automatically slide to where you want. You have to give it a series of coordinates that it has to jump to frame by frame. Try this.

pic = 1;
cue = 2;
duration = 1000;   % msec
refreshrate = 60;  % Hz
nframe = duration / 1000 * refreshrate;
xpath = [linspace(0,StimulusInfo(cue).Position(1),nframe) repmat(StimulusInfo(cue).Position(1),1,10)];
ypath = [linspace(0,StimulusInfo(cue).Position(2),nframe) repmat(StimulusInfo(cue).Position(2),1,10)];
set_object_path(pic, xpath, ypath);
toggleobject(pic);
idle(duration);
toggleobject(pic);

hello, the matlab said :Input must be scalar (Linspace, line22)
0
castiel

Junior Member
Registered:
Posts: 27
Reply with quote  #13 
Quote:
Originally Posted by Jaewon
I don't think you understand the point. The pic doesn't automatically slide to where you want. You have to give it a series of coordinates that it has to jump to frame by frame. Try this.

pic = 1;
cue = 2;
duration = 1000;   % msec
refreshrate = 60;  % Hz
nframe = duration / 1000 * refreshrate;
xpath = [linspace(0,StimulusInfo(cue).Position(1),nframe) repmat(StimulusInfo(cue).Position(1),1,10)];
ypath = [linspace(0,StimulusInfo(cue).Position(2),nframe) repmat(StimulusInfo(cue).Position(2),1,10)];
set_object_path(pic, xpath, ypath);
toggleobject(pic);
idle(duration);
toggleobject(pic);


"linspace(0,StimulusInfo(cue).Position(1),nframe)" means 0 to cue Position is divided into the parts of nframe?  "repmat(StimulusInfo(cue).Position(1),1,10)" means  the cue Position is arranged in 1*10 matrix? 

0
Jaewon

Administrator
Registered:
Posts: 627
Reply with quote  #14 
Regarding to how to program with MATLAB, you are on your own. Type "doc linspace" on the MATLAB command window and start from there.
0
castiel

Junior Member
Registered:
Posts: 27
Reply with quote  #15 
Quote:
Originally Posted by Jaewon
Regarding to how to program with MATLAB, you are on your own. Type "doc linspace" on the MATLAB command window and start from there.
Okay, thank you so much:)
0
castiel

Junior Member
Registered:
Posts: 27
Reply with quote  #16 
Quote:
Originally Posted by Jaewon
Regarding to how to program with MATLAB, you are on your own. Type "doc linspace" on the MATLAB command window and start from there.
Hello, Jaewon, bother you again, i have solved the problem of behavioural codes and eventmarkers, and the monkeylogic have a good data connection with my neuronal recording system, but i still have question about this program, can you explain : StimulusInfo(cue).Position(1) ? i have learn a little about the functions of matlab, such as :linspace or repmat, but still can not resolve the error: Input must be scalar (Linspace, line22)..so i'm stuck in this step, and can't proceed my experiment... i don't understand why it's works well in reposition_object, but not in set_path _object? Whether should i add a judgement infront of this function? It will be very grateful for your last help in my programming.
0
Jaewon

Administrator
Registered:
Posts: 627
Reply with quote  #17 
I guess you didn't use the conditions file you sent me, but unfortunately I don't have time to debug your script now. Please try the files attached here.

 
Attached Files
txt test.txt (128 Bytes, 1 views)
m test.m (322 Bytes, 1 views)

0
castiel

Junior Member
Registered:
Posts: 27
Reply with quote  #18 
Quote:
Originally Posted by Jaewon
Regarding to how to program with MATLAB, you are on your own. Type "doc linspace" on the MATLAB command window and start from there.
Dear Jaewon, thank you so much, i tried to make cue_position=stimulusinfo(cue).position, and it works pretty good, maybe linspace just can recognise single number but not a combination of statistics, stimulusinfo means stimulus infomation, right? i found it in monkeylogic website, thanks!
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.