CPSCDataBase

class torch_ecg.databases.CPSCDataBase(db_name: str, db_dir: str | bytes | PathLike | None = None, working_dir: str | bytes | PathLike | None = None, verbose: int = 1, **kwargs: Any)[source]

Bases: _DataBase

Base class for readers for the CPSC database.

Parameters:
  • db_name (str) – Name of the database.

  • db_dir (path-like, optional) – Local storage path of the database.

  • working_dir (path-like, 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.

download() None[source]

Download the database from self.url.

get_subject_id(rec: str | int) int[source]

Attach a unique subject ID for the record.

Parameters:

rec (str or int) – Record name or index of the record in all_records.

Returns:

Subject ID associated with the record.

Return type:

int

helper(items: str | List[str] | None = None) None[source]

Print corr. meanings of symbols belonging to items.

Parameters:

items (str or List[str], optional) – Items to print. If is None, then a comprehensive printing of meanings of all symbols will be performed.

Return type:

None