From 0987121dbda67df0cc0ccb3e35ed2d340e6684cd Mon Sep 17 00:00:00 2001 From: Benjamin Moody Date: Fri, 2 Dec 2022 12:02:00 -0500 Subject: [PATCH 1/3] Bump version to 4.1.0. --- pyproject.toml | 2 +- wfdb/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 57b95d2b..9ebe802e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wfdb" -version = "4.0.0" +version = "4.1.0" description = "The WFDB Python package: tools for reading, writing, and processing physiologic signals and annotations." authors = ["The Laboratory for Computational Physiology "] readme = "README.md" diff --git a/wfdb/version.py b/wfdb/version.py index ce1305bf..70397087 100644 --- a/wfdb/version.py +++ b/wfdb/version.py @@ -1 +1 @@ -__version__ = "4.0.0" +__version__ = "4.1.0" From 62791fd274c4e0bd2414b712b493d3b7d7ec36a9 Mon Sep 17 00:00:00 2001 From: Benjamin Moody Date: Fri, 2 Dec 2022 14:07:04 -0500 Subject: [PATCH 2/3] Add new API functions to documentation. --- docs/io.rst | 4 ++-- docs/wfdb.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/io.rst b/docs/io.rst index 88e14b57..80831a4b 100644 --- a/docs/io.rst +++ b/docs/io.rst @@ -13,11 +13,11 @@ WFDB Records .. autoclass:: wfdb.io.Record :members: get_frame_number, get_elapsed_time, get_absolute_time, - wrsamp, adc, dac + wrsamp, adc, dac, to_dataframe .. autoclass:: wfdb.io.MultiRecord :members: get_frame_number, get_elapsed_time, get_absolute_time, - multi_to_single + multi_to_single, contained_ranges, contained_combined_ranges WFDB Annotations diff --git a/docs/wfdb.rst b/docs/wfdb.rst index d49dc472..62d3b7b2 100644 --- a/docs/wfdb.rst +++ b/docs/wfdb.rst @@ -13,11 +13,11 @@ WFDB Records .. autoclass:: wfdb.Record :members: get_frame_number, get_elapsed_time, get_absolute_time, - wrsamp, adc, dac + wrsamp, adc, dac, to_dataframe .. autoclass:: wfdb.MultiRecord :members: get_frame_number, get_elapsed_time, get_absolute_time, - multi_to_single + multi_to_single, contained_ranges, contained_combined_ranges WFDB Annotations From e1b0df6b6973f6b3f4a9a5d4301e25bbb1ea39e4 Mon Sep 17 00:00:00 2001 From: Benjamin Moody Date: Fri, 2 Dec 2022 14:07:58 -0500 Subject: [PATCH 3/3] Add Recent Changes to documentation. --- docs/changes.rst | 30 ++++++++++++++++++++++++++++++ docs/index.rst | 1 + 2 files changed, 31 insertions(+) create mode 100644 docs/changes.rst diff --git a/docs/changes.rst b/docs/changes.rst new file mode 100644 index 00000000..ac4762af --- /dev/null +++ b/docs/changes.rst @@ -0,0 +1,30 @@ +Recent Changes +============== + +This page lists recent changes in the `wfdb` package (since version 4.0.0) that may be relevant if you are upgrading from an older version of the package. For the complete history of changes in the package, please refer to the `development repository`_ on GitHub. + +.. _development repository: https://github.com/MIT-LCP/wfdb-python + +Version 4.1.0 (December 2022) +----------------------------- + +**Converting a record into a DataFrame** + The new method :meth:`wfdb.Record.to_dataframe` can be used to convert signal data from a Record object into a Pandas DataFrame, which can then be manipulated using Pandas methods. + +**Locating signals in a multi-segment record** + The new method :meth:`wfdb.MultiRecord.contained_ranges` can be used to search for time intervals within a record that contain a specific channel. The method :meth:`wfdb.MultiRecord.contained_combined_ranges` searches for time intervals that contain several specific channels at once. + +**Writing custom annotation symbols** + The :func:`wfdb.wrann` function can now be used to write annotations with custom annotation types (``symbol`` strings.) Custom annotation types must be defined using the ``custom_labels`` argument. + +**Correct rounding when converting floating-point signal data** + When calling :func:`wfdb.wrsamp` with a ``p_signal`` argument, input values will be *rounded* to the nearest sample value rather than being *truncated* towards zero. The same applies to the :meth:`wfdb.Record.adc` method. + +**Writing signals in compressed format** + The :func:`wfdb.wrsamp` function, and the :meth:`wfdb.Record.wrsamp` method, now support writing compressed signal files. To write a compressed file, set the ``fmt`` value to ``"508"`` (for an 8-bit channel), ``"516"`` (for a 16-bit channel), or ``"524"`` (for a 24-bit channel). + +**Decoding non-ASCII text in EDF files** + The :func:`wfdb.io.convert.edf.read_edf` and :func:`wfdb.io.convert.edf.rdedfann` functions now take an optional argument ``encoding``, which specifies the character encoding for text fields. ISO-8859-1 encoding is used by default, in contrast to older versions of the package which used UTF-8. + +**Bug fixes when writing signal metadata** + When calling :meth:`wfdb.Record.wrsamp`, the checksum and samples-per-frame fields in the header file will correctly match the signal data, rather than relying on attributes of the Record object. diff --git a/docs/index.rst b/docs/index.rst index 88613163..8794c347 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -40,6 +40,7 @@ Other Content :maxdepth: 2 installation + changes wfdb-specifications convert