Skip to content

Commit ff7def9

Browse files
committed
Updates all instances of Physionet
Corrects all instances of Physionet to PhysioNet which corresponds to the correct capitalization of the platform.
1 parent f65cf2e commit ff7def9

File tree

6 files changed

+43
-43
lines changed

6 files changed

+43
-43
lines changed

demo.ipynb

Lines changed: 10 additions & 10 deletions
Large diffs are not rendered by default.

tests/test_record.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class TestRecord(unittest.TestCase):
1111
"""
1212
Test read and write of single segment WFDB records, including
13-
Physionet streaming.
13+
PhysioNet streaming.
1414
1515
Target files created using the original WFDB Software Package
1616
version 10.5.24
@@ -160,7 +160,7 @@ def test_2a(self):
160160
# Compare data streaming from Physionet
161161
sig_pn, fields_pn = wfdb.rdsamp('100', pn_dir = 'mitdb')
162162
# This comment line was manually added and is not present in the
163-
# original Physionet record
163+
# original PhysioNet record
164164
del(fields['comments'][0])
165165

166166
assert np.array_equal(sig_round, sig_target)
@@ -183,7 +183,7 @@ def test_2b(self):
183183
record_pn = wfdb.rdrecord('100', sampfrom=1, sampto=10800,
184184
channels=[1], physical=False, pn_dir='mitdb')
185185
# This comment line was manually added and is not present in the
186-
# original Physionet record
186+
# original PhysioNet record
187187
del(record.comments[0])
188188

189189
# Option of selecting channels by name
@@ -530,7 +530,7 @@ def tearDownClass(cls):
530530
class TestMultiRecord(unittest.TestCase):
531531
"""
532532
Test read and write of multi segment WFDB records, including
533-
Physionet streaming.
533+
PhysioNet streaming.
534534
535535
Target files created using the original WFDB Software Package
536536
version 10.5.24

wfdb/io/_signal.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ def _rd_segment(file_name, dir_name, pn_dir, fmt, n_sig, sig_len, byte_offset,
873873
The full directory where the dat file(s) are located, if the dat
874874
file(s) are local.
875875
pn_dir : str
876-
The Physionet directory where the dat file(s) are located, if
876+
The PhysioNet directory where the dat file(s) are located, if
877877
the dat file(s) are remote.
878878
fmt : list
879879
The formats of the dat files.
@@ -1042,7 +1042,7 @@ def _rd_dat_signals(file_name, dir_name, pn_dir, fmt, n_sig, sig_len,
10421042
The full directory where the dat file(s) are located, if the dat
10431043
file(s) are local.
10441044
pn_dir : str
1045-
The Physionet directory where the dat file(s) are located, if
1045+
The PhysioNet directory where the dat file(s) are located, if
10461046
the dat file(s) are remote.
10471047
fmt : list
10481048
The formats of the dat files.
@@ -1359,7 +1359,7 @@ def _rd_dat_file(file_name, dir_name, pn_dir, fmt, start_byte, n_samp):
13591359
The full directory where the dat file(s) are located, if the dat
13601360
file(s) are local.
13611361
pn_dir : str
1362-
The Physionet directory where the dat file(s) are located, if
1362+
The PhysioNet directory where the dat file(s) are located, if
13631363
the dat file(s) are remote.
13641364
fmt : list
13651365
The formats of the dat files.
@@ -2069,7 +2069,7 @@ def _infer_sig_len(file_name, fmt, n_sig, dir_name, pn_dir=None):
20692069
The full directory where the dat file(s) are located, if the dat
20702070
file(s) are local.
20712071
pn_dir : str, optional
2072-
The Physionet directory where the dat file(s) are located, if
2072+
The PhysioNet directory where the dat file(s) are located, if
20732073
the dat file(s) are remote.
20742074
20752075
Returns

wfdb/io/annotation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,7 @@ def rdann(record_name, extension, sampfrom=0, sampto=None, shift_samps=False,
15791579
Specifies whether to return the sample indices relative to `sampfrom`
15801580
(True), or sample 0 (False).
15811581
pn_dir : str, optional
1582-
Option used to stream data from Physionet. The Physionet database
1582+
Option used to stream data from Physionet. The PhysioNet database
15831583
directory from which to find the required annotation file. eg. For
15841584
record '100' in 'http://physionet.org/content/mitdb': pn_dir='mitdb'.
15851585
return_label_elements : list, optional
@@ -1732,7 +1732,7 @@ def load_byte_pairs(record_name, extension, pn_dir):
17321732
The annotatator extension of the annotation file. ie. for file
17331733
'100.atr', extension='atr'.
17341734
pn_dir : str
1735-
Option used to stream data from Physionet. The Physionet database
1735+
Option used to stream data from Physionet. The PhysioNet database
17361736
directory from which to find the required annotation file. eg. For
17371737
record '100' in 'http://physionet.org/content/mitdb': pn_dir='mitdb'.
17381738
@@ -1746,7 +1746,7 @@ def load_byte_pairs(record_name, extension, pn_dir):
17461746
if pn_dir is None:
17471747
with open(record_name + '.' + extension, 'rb') as f:
17481748
filebytes = np.fromfile(f, '<u1').reshape([-1, 2])
1749-
# Physionet file
1749+
# PhysioNet file
17501750
else:
17511751
filebytes = download._stream_annotation(record_name+'.'+extension, pn_dir).reshape([-1, 2])
17521752

@@ -2218,7 +2218,7 @@ def ann2rr(record_name, extension, pn_dir=None, start_time=None,
22182218
The annotatator extension of the annotation file. ie. for file
22192219
'100.atr', extension='atr'.
22202220
pn_dir : str
2221-
Option used to stream data from Physionet. The Physionet database
2221+
Option used to stream data from Physionet. The PhysioNet database
22222222
directory from which to find the required annotation file. eg. For
22232223
record '100' in 'http://physionet.org/content/mitdb': pn_dir='mitdb'.
22242224
start_time : float

wfdb/io/download.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
from wfdb.io import record
1111

1212

13-
# The Physionet index url
13+
# The PhysioNet index url
1414
PN_INDEX_URL = 'https://physionet.org/files/'
1515
PN_CONTENT_URL = 'https://physionet.org/content/'
1616

1717
class Config(object):
1818
"""
19-
General class structure for the Physionet database.
19+
General class structure for the PhysioNet database.
2020
2121
Attributes
2222
----------
@@ -25,7 +25,7 @@ class Config(object):
2525
"""
2626
pass
2727

28-
# The configuration database index url. Uses Physionet index by default.
28+
# The configuration database index url. Uses PhysioNet index by default.
2929
config = Config()
3030
config.db_index_url = PN_INDEX_URL
3131

@@ -39,7 +39,7 @@ def set_db_index_url(db_index_url=PN_INDEX_URL):
3939
----------
4040
db_index_url : str, optional
4141
The desired new database index url. Leave as default to reset
42-
to the Physionet index url.
42+
to the PhysioNet index url.
4343
4444
Returns
4545
-------
@@ -94,7 +94,7 @@ def _stream_header(file_name, pn_dir):
9494
file_name : str
9595
The name of the headerr file to be read.
9696
pn_dir : str
97-
The Physionet database directory from which to find the
97+
The PhysioNet database directory from which to find the
9898
required header file. eg. For file '100.hea' in
9999
'http://physionet.org/content/mitdb', pn_dir='mitdb'.
100100
@@ -148,7 +148,7 @@ def _stream_dat(file_name, pn_dir, byte_count, start_byte, dtype):
148148
file_name : str
149149
The name of the dat file to be read.
150150
pn_dir : str
151-
The Physionet directory where the dat file is located.
151+
The PhysioNet directory where the dat file is located.
152152
byte_count : int
153153
The number of bytes to be read.
154154
start_byte : int
@@ -196,7 +196,7 @@ def _stream_annotation(file_name, pn_dir):
196196
file_name : str
197197
The name of the annotation file to be read.
198198
pn_dir : str
199-
The Physionet directory where the annotation file is located.
199+
The PhysioNet directory where the annotation file is located.
200200
201201
Returns
202202
-------
@@ -220,7 +220,7 @@ def _stream_annotation(file_name, pn_dir):
220220

221221
def get_dbs():
222222
"""
223-
Get a list of all the Physionet databases available.
223+
Get a list of all the PhysioNet databases available.
224224
225225
Parameters
226226
----------
@@ -251,7 +251,7 @@ def get_dbs():
251251
return dbs
252252

253253

254-
# ---- Helper functions for downloading Physionet files ------- #
254+
# ---- Helper functions for downloading PhysioNet files ------- #
255255

256256

257257
def get_record_list(db_dir, records='all'):
@@ -277,7 +277,7 @@ def get_record_list(db_dir, records='all'):
277277
>>> wfdb.get_record_list('mitdb')
278278
279279
"""
280-
# Full url Physionet database
280+
# Full url PhysioNet database
281281
if os.sep not in db_dir:
282282
db_url = posixpath.join(config.db_index_url, db_dir, record.get_version(db_dir))
283283
else:
@@ -321,7 +321,7 @@ def get_annotators(db_dir, annotators):
321321
>>> wfdb.get_annotators('mitdb')
322322
323323
"""
324-
# Full url Physionet database
324+
# Full url PhysioNet database
325325
db_url = posixpath.join(config.db_index_url, db_dir)
326326

327327
if annotators is not None:
@@ -364,7 +364,7 @@ def make_local_dirs(dl_dir, dl_inputs, keep_subdirs):
364364
The desired input names for creating the directories.
365365
keep_subdirs : bool
366366
Whether to keep the relative subdirectories of downloaded files as they
367-
are organized in Physionet (True), or to download all files into the
367+
are organized in PhysioNet (True), or to download all files into the
368368
same base directory (False).
369369
370370
Returns
@@ -475,12 +475,12 @@ def dl_full_file(url, save_file_name):
475475

476476
def dl_files(db, dl_dir, files, keep_subdirs=True, overwrite=False):
477477
"""
478-
Download specified files from a Physionet database.
478+
Download specified files from a PhysioNet database.
479479
480480
Parameters
481481
----------
482482
db : str
483-
The Physionet database directory to download. eg. For database:
483+
The PhysioNet database directory to download. eg. For database:
484484
'http://physionet.org/content/mitdb', db='mitdb'.
485485
dl_dir : str
486486
The full local directory path in which to download the files.
@@ -489,7 +489,7 @@ def dl_files(db, dl_dir, files, keep_subdirs=True, overwrite=False):
489489
database base directory.
490490
keep_subdirs : bool, optional
491491
Whether to keep the relative subdirectories of downloaded files as they
492-
are organized in Physionet (True), or to download all files into the
492+
are organized in PhysioNet (True), or to download all files into the
493493
same base directory (False).
494494
overwrite : bool, optional
495495
If True, all files will be redownloaded regardless. If False, existing
@@ -511,7 +511,7 @@ def dl_files(db, dl_dir, files, keep_subdirs=True, overwrite=False):
511511
'data/001a.dat'])
512512
513513
"""
514-
# Full url Physionet database
514+
# Full url PhysioNet database
515515
db_dir = posixpath.join(db, record.get_version(db))
516516
db_url = posixpath.join(PN_CONTENT_URL, db_dir) + os.sep
517517

wfdb/io/record.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,7 @@ def get_version(pn_dir):
12321232
Parameters
12331233
----------
12341234
pn_dir : str
1235-
The Physionet database directory from which to find the
1235+
The PhysioNet database directory from which to find the
12361236
required version number. eg. For the project 'mitdb' in
12371237
'http://physionet.org/content/mitdb', pn_dir='mitdb'.
12381238
@@ -2509,13 +2509,13 @@ def dl_database(db_dir, dl_dir, records='all', annotators='all',
25092509
keep_subdirs=True, overwrite=False):
25102510
"""
25112511
Download WFDB record (and optionally annotation) files from a
2512-
Physionet database. The database must contain a 'RECORDS' file in
2512+
PhysioNet database. The database must contain a 'RECORDS' file in
25132513
its base directory which lists its WFDB records.
25142514
25152515
Parameters
25162516
----------
25172517
db_dir : str
2518-
The Physionet database directory to download. eg. For database:
2518+
The PhysioNet database directory to download. eg. For database:
25192519
'http://physionet.org/content/mitdb/', db_dir='mitdb'.
25202520
dl_dir : str
25212521
The full local directory path in which to download the files.
@@ -2535,7 +2535,7 @@ def dl_database(db_dir, dl_dir, records='all', annotators='all',
25352535
https://physionet.org/content/prcp/
25362536
keep_subdirs : bool, optional
25372537
Whether to keep the relative subdirectories of downloaded files
2538-
as they are organized in Physionet (True), or to download all
2538+
as they are organized in PhysioNet (True), or to download all
25392539
files into the same base directory (False).
25402540
overwrite : bool, optional
25412541
If True, all files will be redownloaded regardless. If False,
@@ -2556,7 +2556,7 @@ def dl_database(db_dir, dl_dir, records='all', annotators='all',
25562556
>>> wfdb.dl_database('ahadb', os.getcwd())
25572557
25582558
"""
2559-
# Full url Physionet database
2559+
# Full url PhysioNet database
25602560
if os.sep in db_dir:
25612561
dir_list = db_dir.split(os.sep)
25622562
db_dir = posixpath.join(dir_list[0], get_version(dir_list[0]), *dir_list[1:])

0 commit comments

Comments
 (0)