Skip to content

Commit 3eb2beb

Browse files
authored
Update record_name documentation to mention cloud URI options (#570)
In #567 the documentation was updated to indicate how cloud URIs can be used to read WFDB files via `fsspec`. While this improvement to Read the Docs is helpful, some users might look at the `record_name` parameter documentation first or exclusively. This PR updates the `record_name` parameter documentation to indicate how cloud URIs can be used to read WFDB files.
2 parents f627b5f + ac3a12e commit 3eb2beb

1 file changed

Lines changed: 83 additions & 40 deletions

File tree

‎wfdb/io/record.py‎

Lines changed: 83 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,14 @@ class BaseRecord(object):
167167
The name of the WFDB record to be read, without any file
168168
extensions. If the argument contains any path delimiter
169169
characters, the argument will be interpreted as PATH/BASE_RECORD.
170-
Both relative and absolute paths are accepted. If the `pn_dir`
171-
parameter is set, this parameter should contain just the base
172-
record name, and the files fill be searched for remotely.
173-
Otherwise, the data files will be searched for in the local path.
170+
Both relative and absolute paths are accepted. If `pn_dir` is set,
171+
`record_name` should contain just the base record name, and the
172+
files will be searched for remotely on PhysioNet. Otherwise,
173+
files are searched for locally, or when `record_name` is a
174+
supported cloud URI, they are read directly from cloud storage
175+
via `fsspec`. Supported URIs: `s3://`, `gs://`, `az://`,
176+
`azureml://`. Install the appropriate `fsspec` backend
177+
(e.g., `s3fs`, `gcsfs`, `adlfs`).
174178
n_sig : int, optional
175179
Total number of signals.
176180
fs : int, float, optional
@@ -718,10 +722,14 @@ class Record(BaseRecord, _header.HeaderMixin, _signal.SignalMixin):
718722
The name of the WFDB record to be read, without any file
719723
extensions. If the argument contains any path delimiter
720724
characters, the argument will be interpreted as PATH/BASE_RECORD.
721-
Both relative and absolute paths are accepted. If the `pn_dir`
722-
parameter is set, this parameter should contain just the base
723-
record name, and the files fill be searched for remotely.
724-
Otherwise, the data files will be searched for in the local path.
725+
Both relative and absolute paths are accepted. If `pn_dir` is set,
726+
`record_name` should contain just the base record name, and the
727+
files will be searched for remotely on PhysioNet. Otherwise,
728+
files are searched for locally, or when `record_name` is a
729+
supported cloud URI, they are read directly from cloud storage
730+
via `fsspec`. Supported URIs: `s3://`, `gs://`, `az://`,
731+
`azureml://`. Install the appropriate `fsspec` backend
732+
(e.g., `s3fs`, `gcsfs`, `adlfs`).
725733
n_sig : int, optional
726734
Total number of signals.
727735
fs : float, optional
@@ -1066,10 +1074,14 @@ class MultiRecord(BaseRecord, _header.MultiHeaderMixin):
10661074
The name of the WFDB record to be read, without any file
10671075
extensions. If the argument contains any path delimiter
10681076
characters, the argument will be interpreted as PATH/BASE_RECORD.
1069-
Both relative and absolute paths are accepted. If the `pn_dir`
1070-
parameter is set, this parameter should contain just the base
1071-
record name, and the files fill be searched for remotely.
1072-
Otherwise, the data files will be searched for in the local path.
1077+
Both relative and absolute paths are accepted. If `pn_dir` is set,
1078+
`record_name` should contain just the base record name, and the
1079+
files will be searched for remotely on PhysioNet. Otherwise,
1080+
files are searched for locally, or when `record_name` is a
1081+
supported cloud URI, they are read directly from cloud storage
1082+
via `fsspec`. Supported URIs: `s3://`, `gs://`, `az://`,
1083+
`azureml://`. Install the appropriate `fsspec` backend
1084+
(e.g., `s3fs`, `gcsfs`, `adlfs`).
10731085
n_sig : int, optional
10741086
Total number of signals.
10751087
fs : int, float, optional
@@ -1802,10 +1814,14 @@ def rdheader(record_name, pn_dir=None, rd_segments=False):
18021814
The name of the WFDB record to be read, without any file
18031815
extensions. If the argument contains any path delimiter
18041816
characters, the argument will be interpreted as PATH/BASE_RECORD.
1805-
Both relative and absolute paths are accepted. If the `pn_dir`
1806-
parameter is set, this parameter should contain just the base
1807-
record name, and the files fill be searched for remotely.
1808-
Otherwise, the data files will be searched for in the local path.
1817+
Both relative and absolute paths are accepted. If `pn_dir` is set,
1818+
`record_name` should contain just the base record name, and the
1819+
files will be searched for remotely on PhysioNet. Otherwise,
1820+
files are searched for locally, or when `record_name` is a
1821+
supported cloud URI, they are read directly from cloud storage
1822+
via `fsspec`. Supported URIs: `s3://`, `gs://`, `az://`,
1823+
`azureml://`. Install the appropriate `fsspec` backend
1824+
(e.g., `s3fs`, `gcsfs`, `adlfs`).
18091825
pn_dir : str, optional
18101826
Option used to stream data from Physionet. The Physionet
18111827
database directory from which to find the required record files.
@@ -1951,10 +1967,14 @@ def rdrecord(
19511967
The name of the WFDB record to be read, without any file
19521968
extensions. If the argument contains any path delimiter
19531969
characters, the argument will be interpreted as PATH/BASE_RECORD.
1954-
Both relative and absolute paths are accepted. If the `pn_dir`
1955-
parameter is set, this parameter should contain just the base
1956-
record name, and the files fill be searched for remotely.
1957-
Otherwise, the data files will be searched for in the local path.
1970+
Both relative and absolute paths are accepted. If `pn_dir` is set,
1971+
`record_name` should contain just the base record name, and the
1972+
files will be searched for remotely on PhysioNet. Otherwise,
1973+
files are searched for locally, or when `record_name` is a
1974+
supported cloud URI, they are read directly from cloud storage
1975+
via `fsspec`. Supported URIs: `s3://`, `gs://`, `az://`,
1976+
`azureml://`. Install the appropriate `fsspec` backend
1977+
(e.g., `s3fs`, `gcsfs`, `adlfs`).
19581978
sampfrom : int, optional
19591979
The starting sample number to read for all channels.
19601980
sampto : int, 'end', optional
@@ -2267,10 +2287,17 @@ def rdsamp(
22672287
Parameters
22682288
----------
22692289
record_name : str
2270-
The name of the WFDB record to be read (without any file
2271-
extensions). If the argument contains any path delimiter
2272-
characters, the argument will be interpreted as PATH/baserecord
2273-
and the data files will be searched for in the local path.
2290+
The name of the WFDB record to be read, without any file
2291+
extensions. If the argument contains any path delimiter
2292+
characters, the argument will be interpreted as PATH/BASE_RECORD.
2293+
Both relative and absolute paths are accepted. If `pn_dir` is set,
2294+
`record_name` should contain just the base record name, and the
2295+
files will be searched for remotely on PhysioNet. Otherwise,
2296+
files are searched for locally, or when `record_name` is a
2297+
supported cloud URI, they are read directly from cloud storage
2298+
via `fsspec`. Supported URIs: `s3://`, `gs://`, `az://`,
2299+
`azureml://`. Install the appropriate `fsspec` backend
2300+
(e.g., `s3fs`, `gcsfs`, `adlfs`).
22742301
sampfrom : int, optional
22752302
The starting sample number to read for all channels.
22762303
sampto : int, 'end', optional
@@ -2384,10 +2411,14 @@ def sampfreq(record_name, pn_dir=None):
23842411
The name of the WFDB record to be read, without any file
23852412
extensions. If the argument contains any path delimiter
23862413
characters, the argument will be interpreted as PATH/BASE_RECORD.
2387-
Both relative and absolute paths are accepted. If the `pn_dir`
2388-
parameter is set, this parameter should contain just the base
2389-
record name, and the files fill be searched for remotely.
2390-
Otherwise, the data files will be searched for in the local path.
2414+
Both relative and absolute paths are accepted. If `pn_dir` is set,
2415+
`record_name` should contain just the base record name, and the
2416+
files will be searched for remotely on PhysioNet. Otherwise,
2417+
files are searched for locally, or when `record_name` is a
2418+
supported cloud URI, they are read directly from cloud storage
2419+
via `fsspec`. Supported URIs: `s3://`, `gs://`, `az://`,
2420+
`azureml://`. Install the appropriate `fsspec` backend
2421+
(e.g., `s3fs`, `gcsfs`, `adlfs`).
23912422
pn_dir : str, optional
23922423
Option used to stream data from Physionet. The Physionet
23932424
database directory from which to find the required record files.
@@ -2431,10 +2462,14 @@ def signame(record_name, pn_dir=None, sig_nums=[]):
24312462
The name of the WFDB record to be read, without any file
24322463
extensions. If the argument contains any path delimiter
24332464
characters, the argument will be interpreted as PATH/BASE_RECORD.
2434-
Both relative and absolute paths are accepted. If the `pn_dir`
2435-
parameter is set, this parameter should contain just the base
2436-
record name, and the files fill be searched for remotely.
2437-
Otherwise, the data files will be searched for in the local path.
2465+
Both relative and absolute paths are accepted. If `pn_dir` is set,
2466+
`record_name` should contain just the base record name, and the
2467+
files will be searched for remotely on PhysioNet. Otherwise,
2468+
files are searched for locally, or when `record_name` is a
2469+
supported cloud URI, they are read directly from cloud storage
2470+
via `fsspec`. Supported URIs: `s3://`, `gs://`, `az://`,
2471+
`azureml://`. Install the appropriate `fsspec` backend
2472+
(e.g., `s3fs`, `gcsfs`, `adlfs`).
24382473
pn_dir : str, optional
24392474
Option used to stream data from Physionet. The Physionet
24402475
database directory from which to find the required record files.
@@ -2488,10 +2523,14 @@ def wfdbdesc(record_name, pn_dir=None):
24882523
The name of the WFDB record to be read, without any file
24892524
extensions. If the argument contains any path delimiter
24902525
characters, the argument will be interpreted as PATH/BASE_RECORD.
2491-
Both relative and absolute paths are accepted. If the `pn_dir`
2492-
parameter is set, this parameter should contain just the base
2493-
record name, and the files fill be searched for remotely.
2494-
Otherwise, the data files will be searched for in the local path.
2526+
Both relative and absolute paths are accepted. If `pn_dir` is set,
2527+
`record_name` should contain just the base record name, and the
2528+
files will be searched for remotely on PhysioNet. Otherwise,
2529+
files are searched for locally, or when `record_name` is a
2530+
supported cloud URI, they are read directly from cloud storage
2531+
via `fsspec`. Supported URIs: `s3://`, `gs://`, `az://`,
2532+
`azureml://`. Install the appropriate `fsspec` backend
2533+
(e.g., `s3fs`, `gcsfs`, `adlfs`).
24952534
pn_dir : str, optional
24962535
Option used to stream data from Physionet. The Physionet
24972536
database directory from which to find the required record files.
@@ -2618,10 +2657,14 @@ def wfdbtime(record_name, input_times, pn_dir=None):
26182657
The name of the WFDB record to be read, without any file
26192658
extensions. If the argument contains any path delimiter
26202659
characters, the argument will be interpreted as PATH/BASE_RECORD.
2621-
Both relative and absolute paths are accepted. If the `pn_dir`
2622-
parameter is set, this parameter should contain just the base
2623-
record name, and the files fill be searched for remotely.
2624-
Otherwise, the data files will be searched for in the local path.
2660+
Both relative and absolute paths are accepted. If `pn_dir` is set,
2661+
`record_name` should contain just the base record name, and the
2662+
files will be searched for remotely on PhysioNet. Otherwise,
2663+
files are searched for locally, or when `record_name` is a
2664+
supported cloud URI, they are read directly from cloud storage
2665+
via `fsspec`. Supported URIs: `s3://`, `gs://`, `az://`,
2666+
`azureml://`. Install the appropriate `fsspec` backend
2667+
(e.g., `s3fs`, `gcsfs`, `adlfs`).
26252668
input_times : str, list
26262669
The desired times (or samples) to be converted and displayed for the
26272670
chosen record. This can either be a single string, or a list of

0 commit comments

Comments
 (0)