Closed gsm2055 closed 5 years ago
i get this error
File "
File "D:\anaconda3\lib\site-packages\cardio-0.3.0-py3.7.egg\cardio\core\ecg_batch.py", line 390, in show_ecg i = 0 if index is None else self.get_pos(None, "signal", index)
File "D:\anaconda3\lib\site-packages\cardio-0.3.0-py3.7.egg\cardio\batchflow\batch.py", line 334, in get_pos pos = self.index.get_pos(index)
File "D:\anaconda3\lib\site-packages\cardio-0.3.0-py3.7.egg\cardio\batchflow\dsindex.py", line 148, in get_pos pos = self._pos[index]
`import os import sys sys.path.append("..")
import cardio.batchflow as bf from cardio import EcgBatch from cardio.models.metrics import classification_report
import tensorflow as tf
index = bf.FilesIndex(path="C:/Users/gsm20/Downloads/TestData/A*.hea", no_ext=True, sort=True)
print(index.indices)
eds = bf.Dataset(index, batch_class=EcgBatch) batch = eds.next_batch(batch_size=2) batch_with_data = batch.load(fmt="wfdb", components=["signal", "meta"]) batch_with_data.show_ecg('A00008', start=30, end=35)`
Hi, @gsm2055!
Those files are not Microsoft Access Table files. In wfdb
format data files can have different extensions: mat
, dat
, etc. So you should read those files as usual with load(fmt='wfdb', ...)
method.
Please, refer to WFDB Guide for more information.
Regarding your second message: it is most likely that there is no element with index A00008
in batch
. Try printing batch.indices
, and use one of those indices in show_ecg
.
really thx to your reply.
i don't know exactly how use .dat file. i know .mat file can use in matlab.
but i want to know how can i use .dat file to show using python..
can you tell me how can i use .dat file to look signal??
best regard
Endrew
-----Original Message----- From: "Dmitry Podvyaznikov"notifications@github.com To: "analysiscenter/cardio"cardio@noreply.github.com; Cc: "gsm2055"gsm2055@naver.com; "Mention"mention@noreply.github.com; Sent: 2019-08-30 (금) 19:01:02 (GMT+09:00) Subject: Re: [analysiscenter/cardio] what is difference A00001~A08528 microsoft Access Table Shortcut and sel30~selxx (#30)
Hi, @gsm2055! Those files are not Microsoft Access Table files. In wfdb format data files can have different extensions: mat, dat, etc. So you should read those files as usual with load(fmt='wfdb', ...) method. Please, refer to WFDB Guide for more information. Regarding your second message: it is most likely that there is no element with index A00008 in batch. Try printing batch.indices, and use one of those indices in show_ecg. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
CardIO
uses wfdb library to read data in wfdb
format. You can use this library independently from CardIO
. Please, read the documentation and go through demo notebook. wfdb
has a built-in function to display signals.
Also, to display signal with CardIO
, you can refer to tutorials/III. Models.ipynb
, section CardIO segmentation models. First code chunk shows how to create EcgDataset
object with QT data. Then you can generate new batch and use load
and show_ecg
methods as usual.
there is item in " ..\cardio\cardio\tests\data " A0001~A00013 .hea and Microsoft Access Table Shortcut.
but there isn't in qt-database-1.0.0 Microsoft Access Table Shortcut.
what's the difference. and how can i read in qt-database-1.0.0?
using qt-database-1.0.0 i can train HMM algorithm. but i can't find the midium result..