Hello, I'm writing this issue report for the amplitude scaling issue that I faced during the conversion of MEF 2.1 version file. In addition, I want to address the solution regarding this problem.
- Issue regarding the amplitude scale
In the MEF version 2.1 documentation (link: https://main.ieeg.org/sites/default/files/MEF_Format.pdf), inside the header there should be 'Voltage Conversion Factor', which describes how the MEF files amplitude was scaled from the original time-series signals. However, this toolbox does not accounts this header information and imports the amplitude information directly from the raw MEF files. Thus the amplitude of the converted time series shows the wrong value in general.
- How to solve this problem in the toolbox.
To address this issue, I fixed the following two codes in your repository:
-
MEF_import1.21\mef_matlab\matlab\MEF_2p1@MEFSession_2p1\get_info_data.m
At line 45 "var_names" and "var_types": I added 'voltage_conversion_factor' and 'double'
After line 91, I added the line: sess_info.voltage_conversion_factor(k) = header_k.voltage_conversion_factor;
-
MEF_import1.21\mef_matlab\matlab\MEF_2p1@MEFSession_2p1\import_sess.m
After line 63, I added the line: x_k = x_k*this.SessionInformation.voltage_conversion_factor(k);
After accounting the conversion factor, the amplitude information was retrieved successfully.
If the owner of this repository agrees with this solution, I will issue the pull requests for this fixed code. Since this is the only open-source MATLAB toolbox available to convert MEF version 2.1 files, this will help a lot in the future. Thank you!
Hello, I'm writing this issue report for the amplitude scaling issue that I faced during the conversion of MEF 2.1 version file. In addition, I want to address the solution regarding this problem.
In the MEF version 2.1 documentation (link: https://main.ieeg.org/sites/default/files/MEF_Format.pdf), inside the header there should be 'Voltage Conversion Factor', which describes how the MEF files amplitude was scaled from the original time-series signals. However, this toolbox does not accounts this header information and imports the amplitude information directly from the raw MEF files. Thus the amplitude of the converted time series shows the wrong value in general.
To address this issue, I fixed the following two codes in your repository:
MEF_import1.21\mef_matlab\matlab\MEF_2p1@MEFSession_2p1\get_info_data.m
At line 45 "var_names" and "var_types": I added 'voltage_conversion_factor' and 'double'
After line 91, I added the line: sess_info.voltage_conversion_factor(k) = header_k.voltage_conversion_factor;
MEF_import1.21\mef_matlab\matlab\MEF_2p1@MEFSession_2p1\import_sess.m
After line 63, I added the line: x_k = x_k*this.SessionInformation.voltage_conversion_factor(k);
After accounting the conversion factor, the amplitude information was retrieved successfully.
If the owner of this repository agrees with this solution, I will issue the pull requests for this fixed code. Since this is the only open-source MATLAB toolbox available to convert MEF version 2.1 files, this will help a lot in the future. Thank you!