lpollonini / qt-nirs

QT-NIRS: Quality Testing of Near Infrared Scans
Other
14 stars 4 forks source link

Errors with data using 3 wavelengths #6

Open mvct opened 2 years ago

mvct commented 2 years ago

Describe the bug Hello, I've noticed tha when processing data with 3 wavelengths, the following errors occur :

  1. in generateQReport function : An error is obtained when generating the reportTable when computing group scanning. It seems to come from line 18 : nchannels = size(reportTable(1).MeasList,1)/2; This suppose that only 2 wavelengths are used. Thus it does not compute the report for group scanning.

  2. in qtnirs main function The MeasListAct does not contained the right number of channels. (only 2/3 of the channels). T lines 1119 & 1490 : qualityMats.MeasListAct = repelem(idx_gcl,2);%[idx_gcl; idx_gcl];

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

  1. bug 1: the number of wavelength or lambdaMask might be added to the reportTable so the code coulb be replaced by nchannels = size(reportTable(1).MeasList,1)/size(lambdaMask,2);

  2. bug 2: instead of divided by 2, the value could be automatically adapted depending on the number of lambdas: qualityMats.MeasListAct = repelem(idx_gcl,size(lambdaMask,2);

When I correct the qtnirs code with these suggestions, the reportTable is computed for group scanning. Also, the MeasListAct seems ok.

Screenshots For Bug 1 : Group Scan

error_groupScan

For Bug 2 : MeasListAct

error_MeasListAct

Desktop (please complete the following information):

Additional context It's how I interpreted the bugs.. but I might not be right, or doing things in the right way.

smonterohdz commented 2 years ago

Hi Mvct,

Thanks for reporting this issue. We are implementing your suggestions and we will need to test the functionality with one of your fnirs files. Could you send one of your files to smonter2 [at] central.uh.edu please?