help > Converting Raw Data to hemoglobin concentrations
May 9, 2022  02:05 PM | Jana Welkerling
Converting Raw Data to hemoglobin concentrations
Dear all,

I am trying to convert my Raw Data from an fNIRS measurement with NIRSport to hemoglobin concentrations.

I read in the data with the function spm_fnirs_read_nirscout(F) which stores the results in a NIRS.mat file. Afterwards I am specifying all my features P which are needed for the convert function spm_fnirs_convert_ui(F{1},P), which calculates the hemoglobin changes by the Beer-Lambert Law.

load NIRS.mat
P.wav = [760 850];% wavelengths [nm] of the *.wl1 and *.wl2 files, respectively eg, 760 850 nm
P.age = [21] ; % age of subject [years] to be used in estimation of DPF
P.d = [3];% distance between source and detector [cm] eg, 2.5
P.acoef = [1.4033 3.8547; 2.6694 1.8096];%molar absorption coefficients [mM^-1cm^-1] of HbO and HbR at wavelength 1 and wavelength2.
P.dpf = [[6.658 5.5957]]; %DPF at wavelength 1 and wavelength
spm_fnirs_convert_ui(F{1}, P);

I do not get any error message, but regarding the new NIRS.mat file all fields are empty (od, hbo, hbr, hbt). So it seems like Matlab doesn't calculate anything.

Having a closer look at the function, I saw that I don't have the variable P.base.
All mentioned P.variables in the head of the function spm_fnirs_convert_ui(F{1}, P);
% P.wav light wavelengths 
% P.fs sampling frequency
% P.nch number of channels
% P.ns number of samples
% P.mask mask of measurements
% P.fname names of raw files and converted file (NIRS.mat)
%
% P.d distance between source and detector
% P.acoef molar absorption coefficients [1/(mM*cm)]
% P.dpf differential pathlength factor [unitless]
% P.base baseline period [scan]

Can someone help me out what P.base might be and how I can specify it? And why is spm_fnirs not giving an error? By using the GUI of spm_fnirs the values of hbo etc. aren't empty when entereing the same features as mentioned above.

Happy to hearing from someone of you!
Thanks in advance