NSRRDataBase¶
- class torch_ecg.databases.NSRRDataBase(db_name: str, db_dir: Optional[Union[str, pathlib.Path]] = None, working_dir: Optional[str] = None, verbose: int = 1, **kwargs: Any)[source]¶
Bases:
torch_ecg.databases.base._DataBase
Base class for readers for the NSRR database.
For a full list of available databases, and their descriptions, please visit the NSRR database webpage 1.
- Parameters
db_name (str) – Name of the database.
db_dir (str or pathlib.Path, optional) – Local storage path of the database.
working_dir (str, optional) – Working directory, to store intermediate files and log files.
verbose (int, default 1) – Verbosity level for logging.
kwargs (dict, optional) – Auxilliary key word arguments.
References
- helper(items: Optional[Union[str, List[str]]] = None) None [source]¶
Print corr. meanings of symbols belonging to items.
- safe_edf_file_operation(operation: str = 'close', full_file_path: Optional[Union[str, pathlib.Path]] = None) None [source]¶
Safe IO operation for edf file.
- Parameters
operation ({"open", "close"}, optional) – Operation name, by default “close”.
full_file_path (str or pathlib.Path, optional) – Path of the file which contains the data. If is None, default path will be used.
- Return type
None
- Raises
ValueError – If the operation is not supported.