From george at mit.edu Tue Nov 1 11:01:10 2005 From: george at mit.edu (George B. Moody) Date: Tue, 01 Nov 2005 11:01:10 -0500 Subject: [Physionet-users] question about rr2ann command In-Reply-To: <33133.10.3.0.214.1130795522.squirrel@delfin.unacar.mx> References: <33133.10.3.0.214.1130795522.squirrel@delfin.unacar.mx> Message-ID: <43679146.1090001@mit.edu> pmijangos at pampano.unacar.mx wrote: >>From WFDB applications guide, at the end of the description of the command > ?wrsamp? it is exemplified the following > > rdsamp -r 100s | wrsamp -o 100w -F 360 1 2 > > ? This command creates a record named ?100w? that is a copy of record > ?100s? (although the signal file format is different).? Specifically, this creates a new signal file (100w.dat), and a new header file (100w.hea). It does not create a new reference annotation file, however. Sorry if this is confusing. When I wrote in the WFDB Applications Guide about a "copy of [a] record", I may have added to the confusion. A WFDB record is a collection of files, which must include a header (.hea) file, usually includes one or more signal (conventionally, .dat) files, and may include one or more annotation files (including, perhaps, a reference (.atr) annotation file). The .hea file lists any signal files belonging to the record, but the annotation files are not explicitly enumerated anywhere, because it is desirable to be able to create an annotation file associated with a record without necessarily being able to modify the record's .hea file. So, it's probably more useful to think of annotation files as being *associated* with WFDB records, rather than thinking of them as *parts* of those records. The point is that annotation files won't be copied unless our software is told about them and knows how to copy them, and neither 'rdsamp' nor 'wrsamp' is aware of annotation files. > However, at the time of creating a header file 100w.atr using the command > ?rr2ann? it is not possible for me to get a right plot of the data using > the command ?hrplot?. In other words, it seems that the graphical > properties of the copy are not the same than that of the original 100s > file. I get a decreasing function. What you did is not completely clear, but I think the underlying problem is that the 100w record that you created using "wrsamp" does not have an associated annotation file. You can create one in several ways: (1) You can combine rdann and wrann in a way very similar to the way you combined rdsamp and wrsamp: rdann -r 100s -a atr -f 0 | wrann -r 100w -a atr (2) You can simply copy 100s.atr to 100w.atr in one of these ways: cp 100s.atr 100w.atr or cp `wfdbwhich 100s.atr` 100w.atr or wfdbcat 100s.atr >100w.atr The first command works only if 100s.atr is in the current directory, the second one works if 100s.atr is in any local directory in your WFDB path, and the last one works even if 100s.atr has to be retrieved from the PhysioNet web server. You can also copy signal (.dat) files in these ways, but renamed copies of .hea files won't work, since the WFDB library checks that the name of the .hea file matches the record name stored within the file. (3) The program "rr2ann", which you found, can create an annotation file if it is given an RR interval time series as input. Since "ann2rr" creates such a time series given an annotation file as input, the following command will create an annotation file (which will not be an exact copy of the original, however): ann2rr -r 100s -a atr | rr2ann -r 100w -a not_quite_atr The copy won't be exact, because the only information transmitted by ann2rr to rr2ann is the RR interval time series, and the annotation files contain other attributes (annotation type, subtype, etc.) as well as non-beat annotations (rhythm changes, signal quality changes, etc.) at times that do not define RR interval endpoints. The differences will not be apparent in the heart rate time series, however. If you create "100w.atr" (or "100w.not_quite_atr") using any of these methods, you should find that "hrplot" shows the same heart rate time series for your new annotation file as for the original. -- George From biniaa at rediffmail.com Tue Nov 1 22:29:17 2005 From: biniaa at rediffmail.com (bini ali) Date: 2 Nov 2005 03:29:17 -0000 Subject: [Physionet-users] Message-ID: <20051102032917.3201.qmail@webmail17.rediffmail.com> ? hi there how can i unsubscribe from the group? with thanks bini From george at mit.edu Wed Nov 2 09:45:48 2005 From: george at mit.edu (George B. Moody) Date: Wed, 02 Nov 2005 09:45:48 -0500 Subject: [Physionet-users] In-Reply-To: <20051102032917.3201.qmail@webmail17.rediffmail.com> References: <20051102032917.3201.qmail@webmail17.rediffmail.com> Message-ID: <4368D11C.9050409@mit.edu> bini ali wrote: > > hi there > how can i unsubscribe from the group? > with thanks > bini > _______________________________________________ > PhysioNet-Users mailing list > PhysioNet-Users at www.physionet.org > http://www.physionet.org/mailman/listinfo/physionet-users > Just visit the URL at the end of any note posted to the group (such as your own, quoted above, or this one), and follow the instructions that begin "To unsubscribe from PhysioNet-Users...." -- George