rdann cannot find file on specified path (Physionet wfdb)

Hi there,
I am working with physionet data (2018 you snooze you loose compitition) and the wfdb toolbox. I am trying to use the rdann function to read the .annotation data;
annRead = rdann(recordName, annotator)
As per the docuemntation I should be able to specify the full pathname for "recordName" and the file extention for "annotator" so for file "tr03-0005.arousal" it would look something like this;
recordName = ('H:\PhD_DataBase\physionet.org\files\challenge-2018\1.0.0\training\tr03-0005\tr03-005.arousal') % Location, NB: each patient has their own file and subfold with identical names
annotator = ('arousal') %arousal file type
annRead = rdann(recordName, annotator); % call rdann func
When I attempt to run the above I get the error 'Command exited with non-zero status!!' which I am assuming means the file cannot be found, however the folder (and subfolders) have been added to path and are listed in 'Set Path'. However if I try,
isfile('H:\PhD_DataBase\physionet.org\files\challenge-2018\1.0.0\training\tr03-0005\tr03-0005.arousal')
a logical 1 is returned so the file can be found.
Has anyone had success opening the .arousal files for this dataset (2018 you snooze you loose compitition) with rdann?
The files are open source data so I will include a couple patients in the structure provided. I can read in the .mat and .hea files no problem but I need the .arousals (not the trXX-XXXX-arousal.mat file those are fine but the actual .arousal files). I have stripped out the data files as they are too large to upload but the .arousal, .hea and (arousal).mat are still there. I care about the .arousal files as it has more information included than the trXX-XXXX-arousal.mat files.
Kinds regards,
Christopher

6 Comments

Physionet has undergone some changes in the past few years, and it’s been a bit difficult for me to keep up with them. (Finding and bookmarking the ATM recently took a bit of effort.) I have not done that challenge (or any others), so the only recommendation I have is to contact Physionet directly and ask them. They have always responded to me when I had questions, usually within a couple days.
I definitely do consider this to be a MATLAB question, since Physionet is quite MATLAB-friendly and I see a lot of posts here using those database files, although not always correctly.
.
Hi Star Strider,
I hope you are keeping well. I have never figured out that 'prominent R wave' description, though I have asked several other cardiologists since who all gave the same response you did of there not being an offical definition!
I will reach out to physionet as you have suggested, I know the toolbox is well used especially within the matlab community so I thought I would try my luck here first. I have used it myself before without any issues but these .annotation files are really causing me some bother.
I will keep the thread posted if I hear anything back.
Thank you and I hope you are keeping well!
Christopher
Thank you! I am and I hope you are as well.
Please follow up here with whatever Physionet suggests, and your results with it.
As always, my pleasure!
Unfortunatly I still have to received any update from the Physionet team.
I have been implementing a work around to pull all the annotation data once and store this to a cell matrix of cells for later use/processing. Using dir to query the local filenames (which match those stored on the server) and then using that list of files to querey those of the same name on the server (which can't/won't return a dir like name list). This allows the files to be looped through on the server and all annotations to be stored locally. Working from the sever rather than local flies takes longer to compute, but as the script will run once and then the generated cell array will be used instead.
@Star Strider thank you for the advice though, I do really apreshate it! If you want to post a placeholder answer I am more than happy to accept. With some additional searching it is clear that direct path issue is a bug faced by many others too!
Kind regards,
Christopher
Hi, had you resolved this issue?
Hi Ullah,
I created a list of filenames from the downloaded data files and used this to create a list of annotations files which looped through as they were pulled from the server. My final comment (above) has full details.
Kind regards,
Christopher

Sign in to comment.

Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Products

Release

R2021b

Edited:

on 4 Jan 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!