[409112]: / preprocessOfApneaECG / list2mat.py

Download this file

20 lines (15 with data), 502 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
"""
"""
import scipy.io as sio
from preprocessOfApneaECG.mit2Segments import Mit2Segment
def list2mat(segment, is_debug=False):
"""
Convert python list to matlab .mat file.
:param Mit2Segment segment: python list of ecg data.
:param bool is_debug: python list of ecg data.
:return None:
"""
if is_debug:
print("Convert list to .mat %s" % str(segment.global_id))
name = segment.base_file_path + 'denoised_ecg_data.mat'
sio.savemat(name, {'denoised_ecg_data': segment.denoised_ecg_data})