Skip to content

Commit d1a5de0

Browse files
committed
Renames function / adjusts docs
1 parent f78b64b commit d1a5de0

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

wfdb/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from wfdb.io.record import (Record, MultiRecord, rdheader, rdrecord, rdsamp,
2-
wrsamp, dl_database, edf2mit, wfdb2edf, wav2mit, wfdb2mat, sampfreq, signame)
2+
wrsamp, dl_database, edf2mit, mit2edf, wav2mit, wfdb2mat, sampfreq, signame)
33
from wfdb.io.annotation import (Annotation, rdann, wrann, show_ann_labels,
44
show_ann_classes, ann2rr)
55
from wfdb.io.download import get_dbs, get_record_list, dl_files, set_db_index_url

wfdb/io/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from wfdb.io.record import (Record, MultiRecord, rdheader, rdrecord, rdsamp, wrsamp,
2-
dl_database, edf2mit, wfdb2edf, wav2mit, wfdb2mat, sampfreq, signame, SIGNAL_CLASSES)
2+
dl_database, edf2mit, mit2edf, wav2mit, wfdb2mat, sampfreq, signame, SIGNAL_CLASSES)
33
from wfdb.io._signal import est_res, wr_dat_file
44
from wfdb.io.annotation import (Annotation, rdann, wrann, show_ann_labels,
55
show_ann_classes, ann2rr)

wfdb/io/record.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,6 +1353,22 @@ def edf2mit(record_name, pn_dir=None, delete_file=True, record_only=False):
13531353
"""
13541354
Convert EDF formatted files to MIT format.
13551355
1356+
Many EDF files contain signals at widely varying sampling frequencies.
1357+
`edf2mit` handles these properly, but the default behavior of most WFDB
1358+
applications is to read such data in low-resolution mode (in which all
1359+
signals are resampled at the lowest sampling frequency used for any signal
1360+
in the record). This is almost certainly not what you want if, for
1361+
example, the record contains EEG signals sampled at 200 Hz and body
1362+
temperature sampled at 1 Hz; by default, applications such as `rdsamp`
1363+
will resample the EEGs (and any other signals in the record) at 1 Hz. To
1364+
avoid this behavior, you can set `smooth_frames` to False (high resolution)
1365+
provided by `rdrecord` and a few other WFDB applications.
1366+
1367+
Note that applications built using version 3.1.0 and later versions of
1368+
the WFDB-Python library can read EDF files directly, so that the conversion
1369+
performed by `edf2mit` is no longer necessary. However, one can still use
1370+
this function to produce WFDB-compatible files from EDF files if desired.
1371+
13561372
Parameters
13571373
----------
13581374
record_name : str
@@ -1498,11 +1514,11 @@ def edf2mit(record_name, pn_dir=None, delete_file=True, record_only=False):
14981514
pass
14991515

15001516

1501-
def wfdb2edf(record_name, pn_dir=None, sampfrom=0, sampto=None, channels=None,
1517+
def mit2edf(record_name, pn_dir=None, sampfrom=0, sampto=None, channels=None,
15021518
output_filename='', edf_plus=False):
15031519
"""
15041520
These programs convert EDF (European Data Format) files into
1505-
WFDB-compatible files (as used in PhysioBank) and vice versa. European
1521+
WFDB-compatible files (as used in PhysioNet) and vice versa. European
15061522
Data Format (EDF) was originally designed for storage of polysomnograms.
15071523
15081524
Note that WFDB format does not include a standard way to specify the
@@ -1511,22 +1527,6 @@ def wfdb2edf(record_name, pn_dir=None, sampfrom=0, sampto=None, channels=None,
15111527
standard signal and unit names specified for EDF is permitted but not
15121528
enforced by `mit2edf`.
15131529
1514-
Many EDF files contain signals at widely varying sampling frequencies.
1515-
`edf2mit` handles these properly, but the default behavior of most WFDB
1516-
applications is to read such data in low-resolution mode (in which all
1517-
signals are resampled at the lowest sampling frequency used for any signal
1518-
in the record). This is almost certainly not what you want if, for
1519-
example, the record contains EEG signals sampled at 200 Hz and body
1520-
temperature sampled at 1 Hz; by default, applications such as `rdsamp`
1521-
will resample the EEGs (and any other signals in the record) at 1 Hz. To
1522-
avoid this behavior, you can set `smooth_frames` to False (high resolution)
1523-
provided by `rdrecord` and a few other WFDB applications.
1524-
1525-
Note that applications built using version 3.1.0 and later versions of
1526-
the WFDB-Python library can read EDF files directly, so that the conversion
1527-
performed by `edf2mit` is no longer necessary. However, one can still use
1528-
this function to produce WFDB-compatible files from EDF files if desired.
1529-
15301530
Parameters
15311531
----------
15321532
record_name : str
@@ -1602,7 +1602,7 @@ def wfdb2edf(record_name, pn_dir=None, sampfrom=0, sampto=None, channels=None,
16021602
16031603
Examples
16041604
--------
1605-
>>> wfdb.wfdb2edf('100', pn_dir='pwave')
1605+
>>> wfdb.mit2edf('100', pn_dir='pwave')
16061606
16071607
The output file name is '100.edf'
16081608

0 commit comments

Comments
 (0)