Issue Brief Description
At line 87 in the loadNIRx() function the assignment expects short channel count to match detector count. If this is not the case, the source-detector mask assignment will fail, as the matrix dimensions will not match.
Reproducing the Issue
Attempt loading in a NIRx file (with short channels) using the nirs.io.loadNIRx() function.
Always reproducible.
Suggested Fix
from:
87 info.S_D_Mask(:,info.Detectors-info.ShortDetectors+1:end)=eye(info.ShortDetectors);
to:
87 info.S_D_Mask(1:info.ShortDetectors,info.Detectors-info.ShortDetectors+1:end)=eye(info.ShortDetectors);
Fix Brief Description
Reduces the left side matrix of the assignment from [detectorCount] x [shortDetectorCount] to [shortDetectorCount]^2, which always matches the right side matrix of the assignment.
Issue Brief Description At line 87 in the loadNIRx() function the assignment expects short channel count to match detector count. If this is not the case, the source-detector mask assignment will fail, as the matrix dimensions will not match.
Reproducing the Issue
Suggested Fix from: 87
info.S_D_Mask(:,info.Detectors-info.ShortDetectors+1:end)=eye(info.ShortDetectors);
to: 87info.S_D_Mask(1:info.ShortDetectors,info.Detectors-info.ShortDetectors+1:end)=eye(info.ShortDetectors);
Fix Brief Description Reduces the left side matrix of the assignment from [detectorCount] x [shortDetectorCount] to [shortDetectorCount]^2, which always matches the right side matrix of the assignment.