Welcome! Log In Create A New Profile

Advanced

reading old .bhv files

Posted by ntk1 
reading old .bhv files
March 26, 2020 08:11PM
Hello,

Is there a way to read .bhv files acquired in ML in 2015-2016 using the current ML2 (latest built)?

Thank you!
Re: reading old .bhv files
March 27, 2020 12:11AM
Did you try bhv_read or mlread?
Re: reading old .bhv files
April 17, 2020 07:22PM
Hello,

Sorry, it took a long time to get back to you (I could not access my files). I have tried using mlread() and bhv_read() to open the files acquired with MATLAB 2013b and I received the errors below:

>> mlread()
Operands to the || and && operators must be convertible to logical scalar values.

Error in bhv_read (line 379)
if BHV.NumXEyePoints == BHV.NumYEyePoints && BHV.NumXEyePoints > 0,

Error in mlread (line 17)
case '.bhv', data = bhv_read(filename); return;

>> bhv_read()
Operands to the || and && operators must be convertible to logical scalar values.

Error in bhv_read (line 379)
if BHV.NumXEyePoints == BHV.NumYEyePoints && BHV.NumXEyePoints > 0,


% LINE 379: %

if BHV.NumXEyePoints == BHV.NumYEyePoints && BHV.NumXEyePoints > 0,
BHV.AnalogData{trial}.EyeSignal = [xeye yeye];
elseif BHV.NumXEyePoints > BHV.NumYEyePoints, %only recorded one of the two
BHV.AnalogData{trial}.EyeSignal = xeye;
end



Thank you for your help
Re: reading old .bhv files
April 17, 2020 10:19PM
It seems that either EyeX or EyeY is empty, but this is not my problem to fix. NIMH ML does not support BHV. bhv_read is a script copied from the original ML and mlread simply calls bhv_read when the extension of a given file is *.bhv.
Re: reading old .bhv files
April 19, 2020 07:47PM
Thank you for your response. We will go back to our old setup to read the files.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.