fixed bug in interpolation, added error checks#720
Conversation
|
@ReidIsaak Thanks! |
|
@AnderBiguri I've checked and the angles read from the files are consistent with MATLAB version using either ReadXIM or mexReadXim. The angles for the clinical projection data I have is typically in the range 90-450deg. The previous version of interp_weight() was returning weights that didn't sum to one for input angles that were outside the range [0,mod(360)]. The function now returns the correct weights for inputs that are inside or outside that range (e.g. 450deg) without needing to alter the angles read from the files. The array of angles, xp, used for interpolation must still be monotonically increasing modN. |
|
@ReidIsaak Thanks for the explanation! I don't really have a way to test this anymore, so I trust you :) Thanks again! |
|
@AnderBiguri Thanks! Unfortunately, the test data I have available is confidential. Otherwise, I would share it with tests so others could verify. |
|
@ReidIsaak No worries at all! Ultimately this kind of code is for people who have confidential data, so if it works for you, that is good enough of a test for me :) |
Fixed bug in interp_weights where invalid weights were returned for input angles outside 360 degrees. Added checks for invalid inputs and outputs.