Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment   Page 1 of 2      1   2   Next
dbarack

Junior Member
Registered:
Posts: 26
Reply with quote  #1 
Hi,
For monkeylogic v2:
In order to draw many stimuli on the screen, must there be an adapter for each individual stimulus? For example, if I wish to draw 10 squares on the screen, must each square receive its own adapter?
Thanks,
0
Jaewon

Administrator
Registered:
Posts: 953
Reply with quote  #2 
Take a look at the List property of the BoxGraphic adapter.
ftp://helix.nih.gov/lsn/monkeylogic/ML2_doc/runtimefunctions.html#BoxGraphic
0
dbarack

Junior Member
Registered:
Posts: 26
Reply with quote  #3 
Ah! Great! Thanks!
0
dbarack

Junior Member
Registered:
Posts: 26
Reply with quote  #4 
I have another question: suppose I have two target and the monkey needs to look at both to move to the next trial, but can look at them in any order, and after looking at one, that target disappears. Can I update a scene, such as by removing one of the targets, during a trial? Or must every scene be created before being run, and once created, cannot be updated/re-created?
0
Jaewon

Administrator
Registered:
Posts: 953
Reply with quote  #5 
Anything is possible, although you may need to make your own adapter. This document may help you get some idea what you can do.
http://forums.monkeylogic.org/post/nimh-monkeylogic-2-with-new-trialholder-v2-9444233?pid=1304242173

You may also want to check the manuals in the doc directory.
0
dbarack

Junior Member
Registered:
Posts: 26
Reply with quote  #6 
It appears there is some inflexibility, if I understand the way scenes work.

The manual states:
"All input properties of adapters must be assigned/adjusted before the create_scene function is called, because create_scene stores them to recreate the conditions later. In addition, all scenes need to be created before any run_scene is called so that there may not be any initialization delay once the task begins."

So, if there is a scene whose properties change during the trial, then how would this scene be programmed? Do I need a separate create_scene call before any run_scene calls for every possible outcome?

Perhaps I do not understand.
0
Jaewon

Administrator
Registered:
Posts: 953
Reply with quote  #7 
NIMH ML needs to store initial parameters of adapters, to replay trials later from data files, and it is done during create_scene(). So, if you don't call create_scene() again after adjusting properties, your data file won't be able to replay the trials correctly but the experiment should run fine.

If you need to change properties of a scene in the middle of trials, you had better create two scenes with different parameters from the beginning. Adjusting properties may take some time for some adapters and introduce a gap between scenes. For the same reason, ML creates all the stimuli in the conditions file before starting a trial, whether you actually use them or not. I don't understand how it is interpreted as inflexibility.
0
dbarack

Junior Member
Registered:
Posts: 26
Reply with quote  #8 
Just that once created, it is ill-advised to change and then re-create the scene.
I have a task with many targets, let's say 30 targets, chosen in any order, on the screen. That's 30! scenes, if I understand correctly.
0
dbarack

Junior Member
Registered:
Posts: 26
Reply with quote  #9 
It may be that I can figure out a way to treat the choice of each target as a 'trial'. Let me explore this option.
0
Jaewon

Administrator
Registered:
Posts: 953
Reply with quote  #10 
There is no built-in adapter that can effectively handle the situation you described. You should make a custom adapter.
0
dbarack

Junior Member
Registered:
Posts: 26
Reply with quote  #11 
Ah, ok. Thank you for the help!

For the situation I'm describing, stimuli would need to disappear as the animal selects them. Can an adapter do such a thing?

I had another idea as well. I can pass a new_trial_flag through to a userloop function; for example, TrialRecord.User.new_trial_flag. Each 'trial' the animal selects one target. Once the animal has selected all the available targets, the new_trial_flag can flip on. This will initiate a reset in all the stimuli through the userloop. In this fashion, while monkeylogic thinks each choice is a trial, I can keep track of where the animal is and which stimuli to draw. Would that work?
0
dbarack

Junior Member
Registered:
Posts: 26
Reply with quote  #12 
Given the complexity of my stimuli and the number of targets, my first attempt at passing variables back and forth with the help of a userloop function was a failure. The ITI, set at 500 ms, was routinely exceeded, sometimes as much as by 500 ms (for a > 1 s ITI). I assume this is because of the number of things that ML had to do during the ITI.
0
dbarack

Junior Member
Registered:
Posts: 26
Reply with quote  #13 
Hi again,
I am now considering the creation of a custom adapter. If I understand adapters correctly, analyze can read and store data, and draw can update what is being show. Together, these two functions of the custom adapter can respond to the animal's choices and e.g. draw fewer and fewer targets as they are selected on the screen. Is that right?
0
Jaewon

Administrator
Registered:
Posts: 953
Reply with quote  #14 
I made something for you. Try the attached task.

 
Attached Files
zip dbarack.zip (1.72 KB, 3 views)

0
dbarack

Junior Member
Registered:
Posts: 26
Reply with quote  #15 
This is fantastic!

I'll have to explore how to best use it. Looks promising!

Thank you so much!
0
Jaewon

Administrator
Registered:
Posts: 953
Reply with quote  #16 
I found a mistake in the adapter. I should have added a column vector to Time. Please download it again.
0
dbarack

Junior Member
Registered:
Posts: 26
Reply with quote  #17 
I love the adapter. It greatly increases the range of tasks! Beautiful.

Often times, we wish to control for saccade preparation, etc. We use fixation points to do this. I adapted your adapter to include fixations between the targets. I think it works correctly but I've probably made an error somewhere in the code! Feel free to check it out.

 
Attached Files
m MultiChoiceWithFixation.m (5.50 KB, 0 views)

0
Jaewon

Administrator
Registered:
Posts: 953
Reply with quote  #18 
Hi dbarack,

It was my mistake to use p.LastAcquisitionTime in the example code I showed you. I removed the field and updated both my code and yours. Please download them again or fix your code. Just change p.LastAcquisitionTime to p.scene_time(). Thanks.
0
dbarack

Junior Member
Registered:
Posts: 26
Reply with quote  #19 
Ok. I will make these changes.

Might I ask what the difference is between the two?
0
Jaewon

Administrator
Registered:
Posts: 953
Reply with quote  #20 
p.LastAcquisitionTime is a mislabeled, temporary variable that I made, but people think of it as the time that data acquisition occurred last time and use it. To prevent further confusion, I decided to remove it, which breaks the code posted here. The difference is negligible.
0
dbarack

Junior Member
Registered:
Posts: 26
Reply with quote  #21 
Thanks again for all your help on this, Jaewon. Very grateful.
I have a question about a note in the adapter you wrote: it mentions that the Time field is not very accurate. Can you say why? And, now that the code has been changed to use p.scene_time(), is this time field more accurate? If not, how can I assess when a target was chosen?
Thanks!
0
Jaewon

Administrator
Registered:
Posts: 953
Reply with quote  #22 
Give me an operational definition of the choice in your task. When can you say that the target is chosen?
0
dbarack

Junior Member
Registered:
Posts: 26
Reply with quote  #23 
The target is chosen when the animal is fixating on the target and the hold fixation time to register a choice has ended...
I'd like to get the best read out of that time as possible from ml.
There is another event I'm interested in: when the animal first acquires a target. So I'd like to record that time as well.
I have a third related question: my task involves many different choices within a trial and a variety of other events. I'd like to record all of the ml best-estimate timestamps of these events. In the past with other systems, I've just created a struct with a field for timestamps and a field for event codes (actually strings describing the events). can I do something similar in ml, albeit within an adapter?
0
Jaewon

Administrator
Registered:
Posts: 953
Reply with quote  #24 
What I meant was something more specific.

When exactly does the fixation begin in your definition? Is it when the eye crosses the threshold window around the target? If so, note that the eye is still moving toward the target, when it crosses the threshold window. In addition, the time of window crossing is different depending on the window size. If the window size is 5 degrees, the eye crosses the threshold line earlier than when it is 3 degrees.
0
dbarack

Junior Member
Registered:
Posts: 26
Reply with quote  #25 
Fixation begins after the end of the last saccade into the fixation window before exhausting the fixation time. So if the animal exhausts the fixation time, then I consider the true 'start' of the fixation time to be the time at which the animal's saccade into the fixation window ended.
In order to get a firm assessment of when the animal first fixates on the target, I would probably use the EyeLink data. However, I would like the best estimate of that time from ml.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.