Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
dbarack

Junior Member
Registered:
Posts: 11
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: 824
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: 11
Reply with quote  #3 
Ah! Great! Thanks!
0
dbarack

Junior Member
Registered:
Posts: 11
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: 824
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: 11
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: 824
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: 11
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: 11
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: 824
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: 11
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: 11
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: 11
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: 824
Reply with quote  #14 
I made something for you. Try the attached task.

 
Attached Files
zip dbarack.zip (1.74 KB, 5 views)

0
dbarack

Junior Member
Registered:
Posts: 11
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: 824
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: 11
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.63 KB, 2 views)

0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.