files to test phase wrap between matlab and python#10
files to test phase wrap between matlab and python#10kuziekj wants to merge 2 commits intoimportBOXYfrom
Conversation
| @@ -0,0 +1,131 @@ | |||
| import os | |||
There was a problem hiding this comment.
wait so I think this test has copied in the commands from the functions, which is dangerous, what if those functions change, I think it would be a better test if it called the actual boxy.py function , so the same code doesn't repeat there and here
There was a problem hiding this comment.
but in the bigger scheme this is just a side test on this preprocessing step, and you already confirmed it works, so no need to worry about this
There was a problem hiding this comment.
sorry realized I never posted these comments
this test was successful, but no need to merge it into our submission to the toolbox, keep it as a branch for further testing, but see comment above about using the real functions instead of copied in ones
There was a problem hiding this comment.
Okay sounds good.
Yeah I thought calling boxy.py would be the better way to implement these tests, but since we want to test each of the individual phase pre-processing steps, I wasn't sure how to best go about that.
I suppose it would be better to have the same code in matlab and python, we could then just compare the output directly rather than comparing each individual step.
|
Combined these tests with a different branch/PR :#21 |
Created files to help test phase wrap output between Matlab and python.
Can just run 'test_phase_wrap.py' and messages will be printed depending on the success or failure of each step. If the outputs between matlab and python are the same to 8 decimal places (can be changed in the code), then the comparison is successful.
Currently tests:
-phase wrap
-detrending phase
-subtract mean
-removing outliers
-converting phase to pico seconds
Data is taken from the 'anc' data set. Once the data was loaded and parsed in python (without any changes made to phase data), the data was saved as a .mat file and then loaded into Matlab 2019b. All of the above preprocessing steps were run on the data, taken from p-pod 10.6.3 (b-norm.m), and the data was saved in a separate file after each step. The same preprocessing steps are then run in python and compared to the saved matlab data.