Load physical (converted from digital) ECG data,
which is more understandable for humans;
or load digital signal directly.
Parameters:
rec (str or int) – Record name or index of the record in all_records.
leads (str or int or Sequence[str] or Sequence[int], optional) – The leads of the ECG data to load.
None or “all” for all leads.
sampfrom (int, optional) – Start index of the data to be loaded.
sampto (int, optional) – End index of the data to be loaded.
data_format (str, default "channel_first") – Format of the ECG data,
“channel_last” (alias “lead_last”), or
“channel_first” (alias “lead_first”), or
“flat” (alias “plain”) which is valid only when leads is a single lead
units (str or None, default "mV") – Units of the output signal, can also be “μV” (aliases “uV”, “muV”).
None for digital data, without digital-to-physical conversion.
fs (numbers.Real, optional) – Sampling frequency of the output signal.
If not None, the loaded data will be resampled to this frequency;
if None, self.fs will be used if available and not None;
otherwise, the original sampling frequency will be used.
return_fs (bool, default False) – Whether to return the sampling frequency of the output signal.
Returns:
data (numpy.ndarray) – The ECG data loaded from the record,
with given units and data_format.
data_fs (numbers.Real, optional) – Sampling frequency of the output signal.
Returned if return_fs is True.