castiel
Junior Member
Registered:1509340715 Posts: 27
Posted 1529067933
Reply with quote
#1
Hello, guys, I'm Castiel , 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?} 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
Jaewon
Administrator
Registered:1435685587 Posts: 775
Posted 1529074186
· Edited
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.
castiel
Junior Member
Registered:1509340715 Posts: 27
Posted 1529079232
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
Jaewon
Administrator
Registered:1435685587 Posts: 775
Posted 1529143306
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.
castiel
Junior Member
Registered:1509340715 Posts: 27
Posted 1529144653
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
Jaewon
Administrator
Registered:1435685587 Posts: 775
Posted 1529150471
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.
castiel
Junior Member
Registered:1509340715 Posts: 27
Posted 1529158653
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
Jaewon
Administrator
Registered:1435685587 Posts: 775
Posted 1529167876
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.
castiel
Junior Member
Registered:1509340715 Posts: 27
Posted 1529234752
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);
Jaewon
Administrator
Registered:1435685587 Posts: 775
Posted 1529242777
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);
castiel
Junior Member
Registered:1509340715 Posts: 27
Posted 1529243236
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, 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
castiel
Junior Member
Registered:1509340715 Posts: 27
Posted 1529243808
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)
castiel
Junior Member
Registered:1509340715 Posts: 27
Posted 1529245119
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?
Jaewon
Administrator
Registered:1435685587 Posts: 775
Posted 1529246768
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.
castiel
Junior Member
Registered:1509340715 Posts: 27
Posted 1529247033
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:)
castiel
Junior Member
Registered:1509340715 Posts: 27
Posted 1531323558
· Edited
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.
Jaewon
Administrator
Registered:1435685587 Posts: 775
Posted 1531334240
· Edited
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
test.txt
(128 Bytes, 2 views)
test.m
(322 Bytes, 2 views)
castiel
Junior Member
Registered:1509340715 Posts: 27
Posted 1531395846
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!