You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Accessing a file in a subfolder on PhysioNet using pn_dir #467
I also struggle with correctly setting the path when using rdrecord etc.
Updating the documentation and using examples from the most complicated cases would help. I find that the link to a file in the PhysioNet project page is reliable but it might not be intuitive to everyone to go there to get an idea of what pn_dir should be.
Ultimately, it'd be great if functions like get_record_list worked cleanly with the record_name and pn_dir from rdrecord etc. This isn't the case now. For a project like https://physionet.org/content/mimic4wdb/0.1.0/ with multiple levels of RECORD files, the get_record_list function returns the path found in the top-level RECORD file. If you run it again, joining the result from the top-level RECORD as part of the db_dir, you get the result for the bottom-level RECORD file (in this project anyhow). If we documented this I think it'd be helpful. However, the get_record_list never produces a clean result for record_name and pn_dir (at least not for this project and similarly designed projects, i.e. MIMIC-IV-ECG , etc). In this case it returns the last folder and the record_name, so the user has to split the string to get just the record_name. If we could update get_record_list or introduce a new function (get_pn_dir_record_name) it would be helpful.
Side note, but I would like to move the logic for interacting with the PhysioNet platform into: https://github.com/MIT-LCP/physionet, so that WFDB can focus on file formats and analysis tools.
Activity
briangow commentedon Nov 14, 2023
I also struggle with correctly setting the path when using
rdrecordetc.Updating the documentation and using examples from the most complicated cases would help. I find that the link to a file in the PhysioNet project page is reliable but it might not be intuitive to everyone to go there to get an idea of what
pn_dirshould be.Ultimately, it'd be great if functions like
get_record_listworked cleanly with therecord_nameandpn_dirfromrdrecordetc. This isn't the case now. For a project like https://physionet.org/content/mimic4wdb/0.1.0/ with multiple levels ofRECORDfiles, theget_record_listfunction returns the path found in the top-levelRECORDfile. If you run it again, joining the result from the top-levelRECORDas part of thedb_dir, you get the result for the bottom-levelRECORDfile (in this project anyhow). If we documented this I think it'd be helpful. However, theget_record_listnever produces a clean result forrecord_nameandpn_dir(at least not for this project and similarly designed projects, i.e. MIMIC-IV-ECG , etc). In this case it returns the last folder and the record_name, so the user has to split the string to get just therecord_name. If we could updateget_record_listor introduce a new function (get_pn_dir_record_name) it would be helpful.tompollard commentedon Nov 16, 2023
Side note, but I would like to move the logic for interacting with the PhysioNet platform into: https://github.com/MIT-LCP/physionet, so that WFDB can focus on file formats and analysis tools.