Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment   Page 8 of 8     «   Prev   5   6   7   8
Wing

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

   I have a crash problem when i use eyejoytrack function in MonkeyLogic2(version Mar-23-2018).

   In my customized code, i use this sentence:
###
          eyejoytrack('holdfix',fixation_order, fixation_value,'holdtouch', lever_order, lever_value, time)
###
   to require the subject hold both fixated and holding a lever(set as button1) during the time setted(quite short, 300-700msec).

  The crash doesn't happen often(mostly it works perfect), and I couldn't repeat the crash situation unfortunately.

  However, I can repeat this crash problem if I use the old version MonkeyLogic--- if i release the lever in the required hold time once but pull it soon, like as fast as i can.

  Importantly, in both version, after the crash, same error showed up:

###
Index exceeds matrix dimension

Error stm2_runtime/end_trial (line 1233)
ml_new_fix_point(ml_,😉=median(TrialData.AnalogData.Eye(ML_EyeTargetRecord(ml_,3):ML_EyeTargetRecord(ml_,4),😉,1);

Error stm2_runtime (line 1988)
end_trial;

Error run_trial (line 111)
runtime(MLConfig,TrialRecord,TaskObject,TrialData);

Error monkeylogic/UIcallback (line 1100)
result = run_trial(MLConfig,datafile);

Error while evaluating uicontrol Callback

###

   Do you have any idea what happened?Am i supposed to use other codes rather than the eyejoytrack function?

Thanks!
0
Jaewon

Administrator
Registered:
Posts: 547
Reply with quote  #177 
Hi Wing,

Thank you for letting me know this. I think I figured out what happened. Your detailed description helped a lot.

When you release the lever, the 'holdtouch' requirement is not fulfilled, so eyejoytrack returns early. However, if the eye fixation is not broken, the ontarget status of 'holdfix' remains as 1. This makes ML think that the 'holdfix' succeeded and try to adjust the eye drift. But, if the trial ended immediately after the eyejoytrack, there is no actual eye signal recorded for the given duration due to the early return and the drift correction mechanism fails.

So there are a couple of conditions to be met simultaneously, for this to happen.
1) Eye fixation should be held when the lever is released.
2) The auto drift correction should be turned on.
3) The trial should be aborted immediately when the eyejoytrack returns.

Please let me know if you think this is not the case. I will fix it and update the package as soon as possible.
0
Wing

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

    Thanks for your quick reply.

    I think that is exactly the case. All 3 conditions are satisfied when the ML2 crashes.  
0
kms

Member
Registered:
Posts: 37
Reply with quote  #179 
Hi Jaewon, 

How can one access the 'data file' name in the timings file? I would like to use the same name while saving my video files.

Thanks.


0
Jaewon

Administrator
Registered:
Posts: 547
Reply with quote  #180 
It is in TrialRecord.DataFile
0
Jaewon

Administrator
Registered:
Posts: 547
Reply with quote  #181 
* Changes in NIMH MonkeyLogic 2 (Mar 26, 2018)

 + The GUI button that opened the runtime folder was replaced with the 'Save
   stimuli' button in Mar 19, 2018. To open the runtime file, double-click the
   name of the timing script in the list from now on. If the runtime file is
   not created yet, it will just open the runtime folder, which is Windows's
   temp directory.

 - A problem that the auto eye drift correction fails under a certain condition
   in which 'holdfix' is concurrently used with other tracking methods in
   eyejoytrack() is fixed. (Thanks to Wing from the ML forum)

 - It seems that buttons didn't work when the threshold was empty ('[]') in the
   eyejoytrack(). That shouldn't be the case, so it is fixed. An empty
   threshold resets the previously used threshold to the default value. (3 for
   analog buttons and 0.5 for digital buttons)

0
kms

Member
Registered:
Posts: 37
Reply with quote  #182 
Thank you, Jaewon. 

I am trying to verify the time of acquisition of my video frames (as given by 'time' and 'metadata' in 'getdata') and their timing with respect to ML task events (as given by eventmarker). Could you clarify how the 'AbsoluteTrialStartTime' & 'TrialDateTime' fields of the 'BHV' structure in a data file are related to the timestamps marked by the event codes? Thanks.
0
Jaewon

Administrator
Registered:
Posts: 547
Reply with quote  #183 
TrialDateTime is just the system clock reading when each trial begins. It is for human reference.

AbsoluteTrialStartTime is the time in milliseconds passed since the task start. Data acquisition begins at the AbsoluteTrialStartTime of each trial and the times of events are counted from it as well. AbsoluteTrialStartTime of Trial 1 is 0.
0
kms

Member
Registered:
Posts: 37
Reply with quote  #184 
Thank you, Jaewon.

As a sanity check, I saved the 'clock' time just after an event is stamped (via eventmarker) in the BHV2 file and tested if this clock time for a given trial is almost equal to (TrialDateTime of 1st trial + AbsoluteTrialStartTime for that trial + event code time in that trial)?

Am I right in this logic? By your estimates, how much deviation from equality is expected/ normal?

Thanks.
0
Jaewon

Administrator
Registered:
Posts: 547
Reply with quote  #185 
Your logic sounds solid, but you won't be able to measure the time interval properly with the 'clock' time, because the precision of the 'clock' time is just ~10 ms, which is why TrialDateTime should be used for human reference only.
0
Wing

Junior Member
Registered:
Posts: 19
Reply with quote  #186 
Thank you, Jaewon. 

   The new ML looks fine now!

   I'll let you know if there is any other problems after i test for a couple of days.

0
Jaewon

Administrator
Registered:
Posts: 547
Reply with quote  #187 
* Changes in NIMH MonkeyLogic 2 (Mar 28, 2018)

 - Multi-selection in the "Blocks to run" dialog did not work when there were
   only two blocks. It is fixed. (Thanks to Keith Purpura)

 - When the "First block to run" was manually selected, the selected block was
   not removed from the available block pool and therefore was run twice during
   the first round. It is fixed. (Thanks to Keith Purpura)
0
kms

Member
Registered:
Posts: 37
Reply with quote  #188 
Thanks, Jaewon. Unfortunately, the image acquisition toolbox gives the time of triggering the video (and subsequent frame acquisitions with respect to it) in clock time. Would it be possible to integrate eventmarker with this to get the trigger time with respect to ML trial start?
0
Jaewon

Administrator
Registered:
Posts: 547
Reply with quote  #189 
Please show me the values of 'time' and 'metadata' that are returned by getdata. From the description in the manual, I think you can use 'time', but I want to see what they look like, to be sure. It seems that metadata.AbsTime is in clock time, but 'time' is not.
0
kms

Member
Registered:
Posts: 37
Reply with quote  #190 
Hi Jaewon, 

I have moved this discussion to the thread on Video Recording. Please find my answer here (http://forums.monkeylogic.org/post/show_single_post?pid=1303709269&postcount=5&forum=454793). Thanks.
0
Jaewon

Administrator
Registered:
Posts: 547
Reply with quote  #191 
* Changes in NIMH MonkeyLogic 2 (Apr 10, 2018)

 + Auto drift correction can be adjusted in the pause menu now.

 - When multiple eventcodes were sent as a vector, some digital bits in higher
   digits were not reset properly after the first code.  So, if the next code
   in the vector was smaller than the preceding one, an incorrect code could
   be stamped.  It is fixed now.

 - An error that occurred in some DAQ board models while setting a default
   input/output voltage range is fixed. (Thanks to Keith Purpura)

 - A problem that, when reading the H5 format file, the types of some variables
   were not set back to their original types is fixed. (Thanks to Daniel Amaya)

 - The timing of screen flips is adjusted so that it becomes closer to the time
   of the eventcode stamped together. (Thanks to Carlos Ponce)
0
Jaewon

Administrator
Registered:
Posts: 547
Reply with quote  #192 
* Changes in NIMH MonkeyLogic 2 (Apr 16, 2018)

 + A tool for tuning screen presentation timing is included. Users can use this
   tool to minimize the latency from the screen flip command to the photo
   detector response. It is required to turn on the photodiode trigger and
   assign the photodiode signal to an analog input channel, to use this tool.
   The detailed instructions of how to use the tool is in the following link.

http://forums.monkeylogic.org/post/a-delay-between-event-marker-and-stimuli-presentation-on-the-screen-9710796?pid=1303915680


ftp://helix.nih.gov/lsn/monkeylogic/NIMH_MonkeyLogic_2_(Apr-16-2018).mlappinstall

ftp://helix.nih.gov/lsn/monkeylogic/NIMH_MonkeyLogic_2_(Apr-16-2018).zip

-----

The packages were replaced on 4/18/18. There was slight improvement in the photodiode response tuning tool.

 
Attached Files
zip NIMH_MonkeyLogic_2_(Apr-16-2018).zip (28.56 MB, 1 views)

0
aboharbf

Junior Member
Registered:
Posts: 29
Reply with quote  #193 
Hey Jaewon,

What is the magnitude of the signal that needs to be used for the Analog Input? a friend of mine in the lab doesn't use a 5V battery with his photodiode, would this set up be acceptable? If not, is there a means of producing a constant 5V pulse through an Analog Out to power the Photodiode? Thanks!
0
Jaewon

Administrator
Registered:
Posts: 547
Reply with quote  #194 
The tool will say that it fails to detect the pulse, if the difference between the max and min voltages is less than 0.1V. For your own analysis, it doesn't matter as long as you can see where rising occurs.
0
aboharbf

Junior Member
Registered:
Posts: 29
Reply with quote  #195 
So is there anyway to allocate an Analog Out port for the sake of powering one?
0
Jaewon

Administrator
Registered:
Posts: 547
Reply with quote  #196 
It may work, since a diode does not require much current, but I wouldn't use analog output to power anything. The DAQ board probably has +5V lines already, so you can try with them.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.