kylemath / mne-python

MNE : Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python
http://mne.tools
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

files to test phase wrap between matlab and python #10

Closed kuziekj closed 4 years ago

kuziekj commented 4 years ago

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.

kuziekj commented 4 years ago

Combined these tests with a different branch/PR :https://github.com/kylemath/mne-python/pull/21