From MKramer at TransomaMedical.com Mon Mar 13 12:10:58 2006 From: MKramer at TransomaMedical.com (Kramer, Mat) Date: Mon, 13 Mar 2006 11:10:58 -0600 Subject: [Physionet-users] AHA database vectors Message-ID: Hi all, Sorry if this is a FAQ. The AHA database provides two channels of data. What vectors do these two channels represent? -Mat From serge.skorokhodov at tochka.ru Mon Mar 13 12:55:37 2006 From: serge.skorokhodov at tochka.ru (Serge Skorokhodov) Date: Mon, 13 Mar 2006 20:55:37 +0300 Subject: [Physionet-users] AHA database vectors In-Reply-To: References: Message-ID: <4415B219.9090603@tochka.ru> Kramer, Mat wrote: > > Sorry if this is a FAQ. The AHA database provides two channels of > data. What vectors do these two channels represent? > What do you mean by "vector"? Do you mean which leads? The leads should be labeled in the header. -- Serge From george at mit.edu Mon Mar 13 17:41:58 2006 From: george at mit.edu (George Moody) Date: Mon, 13 Mar 2006 17:41:58 -0500 Subject: [Physionet-users] AHA database vectors In-Reply-To: References: Message-ID: <4415F536.7030003@mit.edu> Kramer, Mat wrote: > Sorry if this is a FAQ. The AHA database provides two channels of data. > What vectors do these two channels represent? The creators of the AHA database did not specify which leads they used for each recording. Serge, in his reply to your note, is correct in saying that the leads should be labelled in the .hea file for each record. In the case of the AHA database, however, the labels are missing, because the information was not preserved. The standard practice for two-channel long-term ECG recordings is to use frontal-plane leads with electrodes on the thorax (not limb leads, because of noise problems in ambulatory recordings). The primary lead (signal 0) will usually be rougly parallel to be mean cardiac electrical axis, so that the QRS amplitude is maximum. See http://www.physionet.org/faq.shtml#signal-names for a discussion of this issue. There are (at least) two schools of thought about the secondary lead. In our lab (which contributed the MIT-BIH Arrhythmia Database) the secondary lead is usually chosen to be nearly orthogonal to the first (in the frontal plane), because this choice affords the best opportunity to see activity that is independent of that seen in the primary signal, such as ectopic beats that may appear nearly isoelectric in the primary signal. This choice also implies that (of all frontal-plane leads) the dominant QRS complexes have the smallest amplitude, so if the primary lead fails, the secondary lead may be difficult to analyze. For this reason, the other school of thought would suggest using a secondary lead that may be nearly parallel to the first, forgoing the opportunity to observe some ectopy in return for improving the likelihood of getting a good signal for measurement of interbeat intervals. Since the AHA Database was collected from the contributions of multiple clinical labs (including ours), it should be expected that both schools of thought are represented in the database, and that the choice of leads will vary from record to record. In contrast to the debate about *which* frontal-plane leads to use, there is little debate about using frontal-plane leads per se; in long-term electrocardiography with conventional electrodes, any other electrode placement is poorly tolerated and the resulting signals are often quite noisy. For this reason, even newer three-channel recorders are often used to record three frontal-plane leads. -- George From MOsborn at TransomaMedical.com Thu Mar 23 13:04:01 2006 From: MOsborn at TransomaMedical.com (Osborn, Matt) Date: Thu, 23 Mar 2006 12:04:01 -0600 Subject: [Physionet-users] Converted AHA Annotation files Message-ID: I've successfully converted records from the AHA Database to MIT format via Ad2m.exe & a2m.exe. However, I don't know how to determine the start time of the first annotation. AHA states that only the beats in the last 30 minutes of a record are annotated. That's seems (to me)to be only an approximation of the time of the first annotation. Is there some step in the conversion process (ad2m or a2m or ???) that could establish or recover the extact time of the first annotation relative to the signal data? From george at mit.edu Thu Mar 23 13:59:35 2006 From: george at mit.edu (George B. Moody) Date: Thu, 23 Mar 2006 13:59:35 -0500 Subject: [Physionet-users] Converted AHA Annotation files In-Reply-To: References: Message-ID: <4422F017.6040708@mit.edu> Osborn, Matt wrote: > I've successfully converted records from the AHA Database to MIT format > via Ad2m.exe & a2m.exe. However, I don't know how to determine the start > time of the first annotation. AHA states that only the beats in the > last 30 minutes of a record are annotated. That's seems (to me)to be > only an approximation of the time of the first annotation. > > Is there some step in the conversion process (ad2m or a2m or ???) that > could establish or recover the extact time of the first annotation > relative to the signal data? Probably the easiest way to do this is to read the reference annotation (*.atr) files that 'a2m' has just created, using 'rdann', like this: rdann -r 1201 -a atr -t "#1" The arguments '-t "#1"' cause 'rdann' to stop reading the file after the first QRS annotation. The output of this command is: 5:00.040 75010 N 0 0 0 where the first two columns indicate the time of the first QRS annotation (in minutes and seconds, and in sample intervals, both relative to the beginning of the record). See http://www.physionet.org/faq.shtml#rdann-output for additional information about the output. You will need to repeat the 'rdann' command for each record, replacing '1201' with the record name in each case. -- George From abiagioni at duke-river.com Thu Mar 23 20:10:21 2006 From: abiagioni at duke-river.com (Andrew Biagioni) Date: Thu, 23 Mar 2006 20:10:21 -0500 Subject: [Physionet-users] WFDB/SWIG/C# experience? Message-ID: <442346FD.40204@duke-river.com> Howdy! I'm new to PhysioNet (and quite impressed, actually) and after experimenting for a bit with it through WAVE, I'm trying to access it from Visual C# .net. The short of it is: does someone have experience in doing just that, and maybe have a DLL set they are willing to share? I found the page on using SWIG, and the info on how to make a native-windows WFDB DLL, etc. However, I have been trying to make it work for me for several days without success -- I got to the point where I have a C#-compatible DLL that needs all the cygwin DLLs to work, except that it hangs when I try to execute it (presumably it's not happy running under cygwin when it's NOT under cygwin -- or something else...). I can keep fighting with various "maybe"s, but if someone has already done it, I would appreciate the help. Thanks, Andrew -- Andrew Biagioni, Staff Consultant Duke-River Engineering Company 30 Ossipee Road, Newton, MA 02464-9101 http://duke-river.com Tel (617) 965-7255 x253 Fax (617) 965-1213 From george at mit.edu Thu Mar 23 22:34:44 2006 From: george at mit.edu (George Moody) Date: Thu, 23 Mar 2006 22:34:44 -0500 Subject: [Physionet-users] WFDB/SWIG/C# experience? In-Reply-To: <442346FD.40204@duke-river.com> References: <442346FD.40204@duke-river.com> Message-ID: <442368D4.3070805@mit.edu> Andrew Biagioni wrote: > Howdy! > > I'm new to PhysioNet (and quite impressed, actually) and after > experimenting for a bit with it through WAVE, I'm trying to access it > from Visual C# .net. > > The short of it is: does someone have experience in doing just that, > and maybe have a DLL set they are willing to share? > > I found the page on using SWIG, and the info on how to make a > native-windows WFDB DLL, etc. However, I have been trying to make it > work for me for several days without success -- I got to the point where > I have a C#-compatible DLL that needs all the cygwin DLLs to work, > except that it hangs when I try to execute it (presumably it's not happy > running under cygwin when it's NOT under cygwin -- or something > else...). I can keep fighting with various "maybe"s, but if someone has > already done it, I would appreciate the help. Sorry that you've had problems! The critical point is that you need to build DLLs of WFDB wrappers for C# (wfdbsharpglue.dll and wfdb-sharp.dll) that don't require cygwin1.dll (the POSIX emulator provided by Cygwin), because cygwin1.dll replaces the non-standard functions provided by the native Windows DLLs with standard POSIX-compatible functions, which are however incompatible with the .NET languages. Although you need to avoid building DLLs that require cygwin1.dll at runtime, it is perfectly OK (and in fact recommended) to build them using Cygwin's gcc compiler. The trick is to use gcc's -mno-cygwin option, which allows you to build binaries that use the native Windows DLLs rather than cygwin1.dll. An acceptable alternative is to use MinGW's version of gcc. To summarize, not only the WFDB library itself, but also the two WFDB wrapper DLLs, must be built using either cygwin's gcc with the -mno-cygwin option, or MinGW gcc. Take a look at http://physionet.org/physiotools/wfdb-swig/wfdb-csharp/src/Makefile.w32 to see how this can be done. We don't recommend building the entire WFDB Software Package this way, because cygwin1.dll has many advantages over the native Windows DLLs, and because WAVE cannot be built at all without cygwin1.dll. To make a working set of wrappers for .NET languages, however, it is necessary to avoid using cygwin1.dll. -- George