dat files same as wav

103 views
Skip to first unread message

Jose Javier Gonzalez Ortiz

unread,
Apr 25, 2016, 12:22:31 PM4/25/16
to physionet-challenges
From one of the previous posts I read that the .dat files are the associated ECGs of each one of the PCG in the training set in WFDB format.

After installing the matlab toolbox and running 

[tm,sig]=rdsamp('a0001.dat',1);
plot(tm,sig);

I got the exact same PCG signal as the one stored in the wav file. 

What am I missing here? How can I access the ECGs?

Thank you

Benjamin Moody

unread,
Apr 25, 2016, 3:27:26 PM4/25/16
to Jose Javier Gonzalez Ortiz, physionet-challenges
On 4/25/16, Jose Javier Gonzalez Ortiz
The ECG (where available) is the second signal in the record; the
first signal, as you've seen, is the PCG. You want, e.g.,
"rdsamp('a0001.dat',2)".

The 'rdsamp' toolbox function makes things confusing by (a) silently
ignoring the '.dat' suffix, making you think you're reading the .dat
file when you're not; and (b) numbering the signals starting with 1
instead of 0.

Benjamin

Ikaro Silva

unread,
Apr 25, 2016, 6:31:19 PM4/25/16
to Benjamin Moody, Jose Javier Gonzalez Ortiz, physionet-challenges
Hi!


I can see where the confusion arises here, will be happy to update the doc or change the implementation if there is any specific suggestions. Basically:

 a) Was done to make it more convenient for the user since the file extension was never being used (the toolbox gets the data file from from the header file that's on the  system path). This was done also to reflect the Software Package use of  RDSAMP and the '-r' flag.

b) The signal indexing starts from 1 in order to be consistent with MATLAB's 1 indexing into arrays and users (all functions in the WFDB MATLAB Toolbox have been adapted to be 1 based indexing). While in this case we are breaking consistency with the WFDB Software package, we are being consistent within MATLAB's framework and community.


-is

Ikaro Silva, Ph.D.
ik...@mit.edu
Laboratory for Computational Physiology/ PhysioNet
Harvard-MIT Division of Health Sciences and Technology
MIT Room E25-505,
Cambridge, MA 02139 USA


--
You received this message because you are subscribed to the Google Groups "physionet-challenges" group.
To unsubscribe from this group and stop receiving emails from it, send an email to physionet-challe...@googlegroups.com.
Visit this group at https://groups.google.com/group/physionet-challenges.
To view this discussion on the web visit https://groups.google.com/d/msgid/physionet-challenges/CAAk6P0WCToWUzV3APa8rT%3D1q%3DbCcmRoG-YcxCjdHLWMXQ%2B_onw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages