I recently updated to the latest commit and found that my usage of ApplyROI no longer works. I have been unable to determine how long ago the change happened based on commit hashes (I assume due to the mercurial git changeover) and I foolishly had deleted my previous mercurial download 🤦.
Undefined function 'isnan' for input arguments of type 'cell'.
Error in nirs.util.ROIhelper (line 51)
if(any(all([isnan(R{idx}.detector) isnan(R{idx}.source)],2)))
I have suggested two code changes in the pull request. First, I added a unit test to demonstrate the issue I encountered. Second, I have proposed a solution that modifies the ApplyROI input format to be suitable for roiAverage. I decided to modify the ApplyROI function as this seemed the most backwards compatible solution (no change to documentation required).
It may also be that I have misunderstood how to use the ApplyROI function, if so I would be happy to update the documentation if you can inform me of a better way to specify multiple ROIs.
Dear Professor Huppert,
I recently updated to the latest commit and found that my usage of
ApplyROI
no longer works. I have been unable to determine how long ago the change happened based on commit hashes (I assume due to the mercurial git changeover) and I foolishly had deleted my previous mercurial download 🤦.When I run
ApplyROI
with multiple ROIs (following the format in docs) I get the following error:I have suggested two code changes in the pull request. First, I added a unit test to demonstrate the issue I encountered. Second, I have proposed a solution that modifies the
ApplyROI
input format to be suitable forroiAverage
. I decided to modify theApplyROI
function as this seemed the most backwards compatible solution (no change to documentation required).It may also be that I have misunderstood how to use the
ApplyROI
function, if so I would be happy to update the documentation if you can inform me of a better way to specify multiple ROIs.Thanks for the great package, Rob