Forum

Notifications
Clear all

Error message: Function hmR_MotionCorrectSplineSG generated error at line 114

21 Posts
6 Users
2 Likes
1,794 Views
Meryem Yücel
Posts: 162
(@mayucel)
Joined: 3 years ago

And your cfg file (processing stream).

Reply
1 Reply
(@broscheid)
Joined: 2 years ago

Active Member
Posts: 7

@mayucel: thanks for the help. I'll check it tomorrow.

Reply
Meryem Yücel
Posts: 162
(@mayucel)
Joined: 3 years ago

Hi Kim,

 

Just checked the data file you sent. It seems for some channels you have NaN values at some time points. 

E.g. raw signal at ch 9 has some (see below). This causes the filtfilt function to break when called by Spline SG function.

find(isnan(d(:,9))==1)

ans =

798
799
800
801
802
803
804
805
806
807

A solution could be to replace these NaN values with the mean of the two neighboring points.

Hope this helps.

Meryem

 

Reply
1 Reply
(@broscheid)
Joined: 2 years ago

Active Member
Posts: 7

@mayucel we could find the nan and replace it in most cases as you suggested. How do you handle it if a whole channel has nan? Is there any possibility to analyze the rest of the dataset?

Thanks for the great and fast help!

 

Reply
Posts: 280
(@dboas)
Joined: 3 years ago

Jay and Stephen think this error was fixed on Jan 28. Download the latest Homer3 from github and try it

Reply
1 Reply
(@broscheid)
Joined: 2 years ago

Active Member
Posts: 7

@dboas we tried this. With Homer3 it is not working. We wrote a script to replace the nan in the raw data as Meryem suggested. In most cases it works now.

Reply
Posts: 280
(@dboas)
Joined: 3 years ago

Thanks for the feedback. I added this to our to do list to try and find NaNs automatically

Reply
Posts: 3
(@rhealey0)
New Member
Joined: 2 years ago

Hi Meryem and David,

Our lab is running into the same issue. We have opened the .nirs file in Homer3 and written a script that replaces the NaN values as Meryem suggested. We have called this matrix 'd'. I was just wondering how to save this into a .nirs/.snirf file so our cleaned data can be analysed in Homer3.

Thanks,

Bec

Reply
Page 2 / 3
Share:
en_USEnglish