Forum

Notifications
Clear all

Error: Unrecognized method, property, or field 'GetMl' for class 'SnirfClass'.

2 Posts
2 Users
0 Likes
198 Views
Posts: 5
Topic starter
(@jvaisberg90)
Active Member
Joined: 2 years ago

Dear forum,

I am trying to process. snirf files using Homer3 functions within MATLAB. I have set up a data pipeline but am encountering the following error: 

"Unrecognized method, property, or field 'GetMl' for class 'SnirfClass'." Does anyone know how to circumvent this?

I have ensured that the Homer3-master directories is part of my path. I am afraid I am unable to share the actual .snirf file. 

MATLAB version: 2023a on PC

Code: 

clear all
<!-- [if mso]>
<![endif]-->
selpath = 'Data'; % uigetdir;
addpath(selpath);
addpath(genpath('C:\Users\[REDACTED]\Tools\Homer3-master'))
addpath(genpath('C:\Users\[REDACTED]\Tools\snirf_homer3-master'))
files = dir([selpath '/*.snirf']);
 
<!-- [if mso]>
<![endif]-->
for i = 1 %:size(files,1)
 
snirf0 = SnirfLoad(files(i).name);
 
<!-- [if mso]>
<![endif]-->
%% Step 1: Remove step-like noise (applied on light intensity data)
snirf1 = SnirfClass();
snirf1 = snirf0;
intensity = snirf1.data.dataTimeSeries(2:end,:); %Remove the first sample -- it's a spike resulting from device turning on
I = removeStep(intensity);
snirf1.data.dataTimeSeries = [I(1,:); I];
 
<!-- [if mso]>
<![endif]-->
%% Step 2: Exclude 'poor' channels
snirf2 = snirf1;
underscoreIdx = strfind(files(i).name,'_');
snirfIdx = strfind(files(i).name,'.snirf');
pid{i} = files(i).name(underscoreIdx+1:snirfIdx-1);
 
<!-- [if mso]>
<![endif]-->
%% Step 3: Convert light intensity to optical density
snirf3 = snirf2;
dod = hmrR_Intensity2OD(snirf1);
snirf3.data = dod;
 
<!-- [if mso]>
<![endif]-->
end
1 Reply
Meryem Yücel
Posts: 198
(@mayucel)
Joined: 4 years ago

Hi Jonathan,

 

Do you have access to any earlier versions of MATLAB (e.g. 2017 or 19)? If so can you test it there?

 

Meryem

Reply
Share:
en_USEnglish