Forum

Notifications
Clear all

Issues with saving .snirf files after editing stim information

1 Posts
1 Users
0 Likes
33 Views
Debra Kim
Posts: 1
Topic starter
(@nfs)
New Member
Joined: 7 months ago

Hello,

I have been trying to edit stimulus information of .snirf files but have been having issues with saving the edited information. This is my current working environment:

>MATLAB R2020a

> Windows PC

and this is the code that I have been using:

------------------------------------------------------

Sub00 = SnirfLoad(filename.snirf)

Sub00.stim =[] %Erase prexistant stimulus information

% create StimClass for each stimulus type

tmp1 =StimClass('Start')
tmp2= StimClass('Target')
tmp3= StimClass('Lure')
tmp4= StimClass('Irrelevant')

Sub00.stim= tmp1
Sub00.stim(1,2)= tmp2
Sub00.stim(1,3)= tmp3
Sub00.stim(1,4)= tmp4

% Add stimulus onset information 

%( start / stim_T/stim_Lr/stim_Ir: these variables are all in double format structured as the following [stimulus onset time, duration, amplitude])

OGFile.stim(1,1).data=start
OGFile.stim(1,2).data=stim_T
OGFile.stim(1,3).data=stim_Lr
OGFile.stim(1,4).data=stim_Ir

% Save file

Sub00.Save('Sub00_stimedited.snirf')

----------------------------------------------------------

Everything seems fine until I load the saved snirf file ('Sub00_stimedited.snirf'). When loaded, the stimulus labels are re-sorted in alphabetical order (Irrelevant, Lure, Start, Target) and the stimulus onset information that I added earlier is gone. Also, the .exe version of Homer3 refuses to read the edited snirf file with this error message:

FAILED error check: D:/2021-02-EEGNIRS@TET/NIRS/snirf_stimsync/Sub00_stimedited.snirf will not be added to data set

Where could I be going wrong? 

Any advice would be a huge help.

Thank you in advance!

Sincerely,

Evelyn Joo.

 

Topic Tags
Share:
en_USEnglish