Forum
Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment   Page 1 of 3      1   2   3   Next
Jaewon

Senior Member
Registered:
Posts: 312
Reply with quote  #1 
I am starting a new thread for the distribution of NIMH MonkeyLogic 2. The link to the latest release will be posted here.


0
Jaewon

Senior Member
Registered:
Posts: 312
Reply with quote  #2 
In R2012b or later, you can install NIMH ML 2 as a MATLAB app. Download the *.mlappinstall file and double-click it. A dialog will pop up and ask if you want to install. It creates an icon on the MATLAB menu that runs ML with one click. No other setting is necessary.

The installation directory is either of the following directories, depending on your MATLAB version.
\your user directory\Documents\MATLAB\Add-Ons\Apps (R2015b or later)
\your user directory\Documents\MATLAB\Apps (R2015a or earlier)
NIMH ML 2.png

0
ryklin

Administrator
Registered:
Posts: 230
Reply with quote  #3 
Sometimes double clicking on the installer opens Matlab but doesn't install Monkey Logic. In this case, simply click on the "Install App" button (seen above), and select the installer file.
0
crponce

Junior Member
Registered:
Posts: 12
Reply with quote  #4 
This is very exciting, thank you, Jaewon!

I tried to run it, and I got an error "Attempt to add "ml" to a static workspace". Google suggests it may be related to a GUI issue?
0
Jaewon

Senior Member
Registered:
Posts: 312
Reply with quote  #5 
Why don't you tell me what you tried? You don't see that message unless you set a break point somewhere and try to add something.
0
crponce

Junior Member
Registered:
Posts: 12
Reply with quote  #6 
Sure!

I downloaded the *.mlappinstall file and it added to my 2015a Matlab.
Then I clicked on the app. 
I loaded one of my MonkeyLogic task timing/conditions file.
Then I clicked 'run'.

I did not mess with the internal code at all.

However, I just downloaded the example 'dms' task from the website and that runs ok on ML2. Must be some incompatibility with my timing or conditions file. Interesting error.
0
Jaewon

Senior Member
Registered:
Posts: 312
Reply with quote  #7 
Unless you show me your timing/conditions files, I don't know what to fix. Can you send them to me by email or as a private message?
0
Jaewon

Senior Member
Registered:
Posts: 312
Reply with quote  #8 
* Changes in NIMH MonkeyLogic 2 (Mar 17, 2017)

 + Improved support for the userloop function (see the 'dms with userloop'
   example in the task directory for further details)
 
 + Made the sizes of all circle-shaped objects represented in radius
   irrespective of their units. This makes the fixation point and the
   eye/joystick/touch tracers almost twice bigger when you change their shape
   from Square to Circle without adjusting their sizes. However, it is
   consistent with the fact that the CRC objects in the conditions file and the
   window threshold of eyejoytrack() are also in radius and therefore less
   confusing.
0
Jaewon

Senior Member
Registered:
Posts: 312
Reply with quote  #9 
* Changes in NIMH MonkeyLogic 2 (Mar 20, 2017)

 + Due to the just-in-time compilation of MATLAB, the timestamps of eventmarker
   were off by a few milliseconds from the actual flip times of toggleobject
   for the first few trials, until all the codes were compiled and cached. Now
   stimulus presentation (Stimulations, TTLs, and audio sounds) and timestamp-
   marking are processed at the DLL level without going through MATLAB scripts
   so that there is no such delay any longer.

 ~ An error made in the previous release is fixed. It prevented the changes of
   timing files from being applied immediately.
0
neo3dot1415

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

If I'm not wrong, in NIMH MonkeyLogic 1 we had an option to go through the X_runtime file to take a look at to our errors that we were getting through Matlab command's line. But, now I'm not sure how can I get access to that file in MonkeyLogic 2.

For example:

I've an error like this:

<<< MonkeyLogic >>> Too many output arguments. (FastSaccade_runtime, Line 1221) 

and I cannot have access to FastSaccade_runtime to see which line of code causes the error. 

I think it would useful to have an access!

Thanks.


0
crponce

Junior Member
Registered:
Posts: 12
Reply with quote  #11 
Hi Neo3dot1415, I found my X_runtime file using the 'locate' button in the lower left corner of the GUI, next to 'run'. Does that help?
0
Jaewon

Senior Member
Registered:
Posts: 312
Reply with quote  #12 
It is not an option of ML and you can open the runtime folder in the way crponce described (it is Windows's temp folder), but I understand what you meant. Please overwrite monkeylogic.m with the file attached below. Then you will see the error message on the MATLAB command window as well.

The packages are updated for this, so new downloaders do not have to do this.
0
crponce

Junior Member
Registered:
Posts: 12
Reply with quote  #13 

Another ML2 issue - some "Gen" taskObject outputs absent during runtime...

Background: I use the Gen taskObject to generate my stimuli. My Gen function returns four outputs: the image, Xpos, YPos and a fourth output – a structure with text fields. I use the data in these text fields during each trial, reading it from

TrialRecord.CurrentConditionStimulusInfo(taskobjectnumber).MoreInfo

as instructed in (http://www.brown.edu/Research/monkeylogic/conditionsfiles.html#arguments)

 

The problem:

With ML2, I get an error at runtime:

“Reference to non-existent field “MoreInfo””

Seems like the fourth Gen taskObject output is not moving into the runtime workspace.

I went into mltaskobject.m, which parses the Gen taskObject function outputs. First, I found one candidate reason:

Under mltaskobject.m, ~line 125-6

case 'gen'
[~,n] = fileparts(a{2});
if 2<length(a), x = a{3}; y = a{4}; else x = 0; y = 0; end
switch nargout(n) % number of outputs from Gen function

case 2, [imdata,obj.Info{idx}] = feval(n,TrialRecord);
case 3, [imdata,x,y] = feval(n,TrialRecord);
case 5, [imdata,x,y,obj.Info{idx}] = feval(n,TrialRecord);
otherwise, imdata = feval(n,TrialRecord);

end

I changed "case 5" to "case 4", but this didn’t fix the issue.

Any thoughts from Jaewon or the community?

0
Jaewon

Senior Member
Registered:
Posts: 312
Reply with quote  #14 
Hi crponce,

Thanks for reporting this. First of all, "case 5" has been fixed, if you check the current package. The real cause of the problem is that I confused CurrentConditionStimulusInfo with CurrentConditionInfo (where the Info column of the conditions file goes), so different info was assigned to CurrentConditionStimulusInfo. I can fix this quickly, but there is one thing I want you to double-check.

Although the online document says you can access MoreInfo like TrialRecord.CurrentConditionStimulusInfo(taskobjectnumber).MoreInfo, what MonkeyLogic returns is actually a cell array, so you have to access it like the following, don't you? I assume you have run this with the old versions successfully.

TrialRecord.CurrentConditionStimulusInfo{taskobjectnumber}.MoreInfo

If not, can you show me a few lines of your timing file related to this?
0
crponce

Junior Member
Registered:
Posts: 12
Reply with quote  #15 
Thank you for your response! Yes, you are correct - I usually call it as an array. When I started having issues, I just switched to displaying its fields. During runtime, I am now calling 

>> TrialRecord.CurrentConditionStimulusInfo

which results in

ans = 
      s: '.'
      Stim1: '.'
      Stim2: '.'
      Stim3: '.'

0
Jaewon

Senior Member
Registered:
Posts: 312
Reply with quote  #16 
I am still confused. What I asked is how you access the MoreInfo field.

TrialRecord.CurrentConditionStimulusInfo(1).MoreInfo
TrialRecord.CurrentConditionStimulusInfo{1}.MoreInfo

Although the manual shows the first one, what actually works is the second one. Isn't it the case in your code? Please show me the line in your timing file where MoreInfo is accessed.

-----
Well, it doesn't matter. I made it work in either way. I will upload the updated packages tomorrow.
0
neo3dot1415

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

Thanks for the package. I'm using Gen in my condition file like this:
Gen(P1b,-5,4)

Here is the error:

Subscripted assignment dimension mismatch.

Error in mltaskobject/addobj (line 219)
obj.Position(idx,[smile] = [x y];

Error in mltaskobject (line 14)
if isfield(taskobj,'Attribute'), addobj(obj,taskobj,MLConfig,TrialRecord); else addobj_from_struct(obj,taskobj,MLConfig,TrialRecord); end

Error in run_trial (line 109)
TaskObject = mltaskobject(taskobject,MLConfig,TrialRecord);

Error in monkeylogic/UIcallback (line 745)
run_trial(MLConfig,datafile);

Error while evaluating UIControl Callback

If I change x and y to 0, then there is no problem. If I use Sqr or etc. with high x and y, it would be fine again. So, I guess there is something wrong with Gen. 

* I've used the same condition file before with ML1 and was working very well. 

Thanks.
0
Jaewon

Senior Member
Registered:
Posts: 312
Reply with quote  #18 
* Changes in NIMH MonkeyLogic 2 (Mar 22, 2017)

 ~ Fixed the problem that TrialRecord.CurrentConditionStimulusInfo does not
   reflect the taskobject info correctly.
   
 ~ Fixed the problem that the x & y positions of gen objects defined in the
   conditions file are provided as char, not numeric.
   
 ~ Fixed the problem that the intertrial-interval is not counted for the
   duration specified by set_iti().
0
neo3dot1415

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

I just realized that "Edit Timing File Variables" option dose not update itself based on the editable variables defined in timing script. 

Thanks.
0
Jaewon

Senior Member
Registered:
Posts: 312
Reply with quote  #20 
Hi neo3dot1415,

I am not sure what you are exactly talking about, but I guess it is related to the new feature I added in NIMH ML 2.

- The values of “editable” variables are kept in the configuration file, so users do not need to re-type them every time a new session starts.

So the "Edit Timing File Variables" menu shows the values that were used last time and it doesn't reset them with the numbers written in the timing script. Let me know if you meant a different thing.
0
Jaewon

Senior Member
Registered:
Posts: 312
Reply with quote  #21 
* Changes in NIMH MonkeyLogic 2 (Mar 24, 2017)

 ~ Fixed an error in assigning strings that contain commas and semi-colons to
   editable variables.
   
 ~ Fixed the problem that the simulation mode did not work with Stimulation
   and TTL.
0
neo3dot1415

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

You're right. I was a bit biased with ML1. In ML1 if we make any changes on editable variable in script, it would update "Edit Timing File Variables" menu as well.

By the way, Thanks for the new version. Shorter ITI helps me a lot during experiments. 


0
Jaewon

Senior Member
Registered:
Posts: 312
Reply with quote  #23 
* Changes in NIMH MonkeyLogic 2 (Mar 27, 2017)

 + Now the behavior summary is provided at the end of tasks, as in the previous
   versions.

 ~ An error made in the previous version that disables Stimulation and Mouse
   is fixed.
   
 ~ The timing accuracy of goodmonkey (reward on/off time and eventmarker) is
   improved.
0
crponce

Junior Member
Registered:
Posts: 12
Reply with quote  #24 
Just tried the latest. It works beautifully, and it is amazingly fast. Thank you!
0
mkytch

Junior Member
Registered:
Posts: 6
Reply with quote  #25 
Thanks a lot for this fantastic work, Jaewon!

I've run the newest version, and generally it worked well but with two following concerns:

1. After loading the included delayed match to sample task, the "Chart blocks" function doesn't seem to work, with a matlab error: Index exceeds matrix dimensions.

2. Now the behavioral summary doesn't contain as much information as the old version, which also plots the eye traces and includes a replay function. Are there any possibilities that this behavioral summary going to be improved with the NIMH ML 2?

Thanks again!!
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation: