Skip to content

Commit 3a0d339

Browse files
author
Benjamin Moody
committed
Merge pull request #437 into main
Update version number and documentation for version 4.1.0.
2 parents 843d80e + e1b0df6 commit 3a0d339

File tree

6 files changed

+37
-6
lines changed

6 files changed

+37
-6
lines changed

docs/changes.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Recent Changes
2+
==============
3+
4+
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.
5+
6+
.. _development repository: https://github.com/MIT-LCP/wfdb-python
7+
8+
Version 4.1.0 (December 2022)
9+
-----------------------------
10+
11+
**Converting a record into a DataFrame**
12+
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.
13+
14+
**Locating signals in a multi-segment record**
15+
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.
16+
17+
**Writing custom annotation symbols**
18+
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.
19+
20+
**Correct rounding when converting floating-point signal data**
21+
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.
22+
23+
**Writing signals in compressed format**
24+
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).
25+
26+
**Decoding non-ASCII text in EDF files**
27+
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.
28+
29+
**Bug fixes when writing signal metadata**
30+
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.

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Other Content
4040
:maxdepth: 2
4141

4242
installation
43+
changes
4344
wfdb-specifications
4445
convert
4546

docs/io.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ WFDB Records
1313

1414
.. autoclass:: wfdb.io.Record
1515
:members: get_frame_number, get_elapsed_time, get_absolute_time,
16-
wrsamp, adc, dac
16+
wrsamp, adc, dac, to_dataframe
1717

1818
.. autoclass:: wfdb.io.MultiRecord
1919
:members: get_frame_number, get_elapsed_time, get_absolute_time,
20-
multi_to_single
20+
multi_to_single, contained_ranges, contained_combined_ranges
2121

2222

2323
WFDB Annotations

docs/wfdb.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ WFDB Records
1313

1414
.. autoclass:: wfdb.Record
1515
:members: get_frame_number, get_elapsed_time, get_absolute_time,
16-
wrsamp, adc, dac
16+
wrsamp, adc, dac, to_dataframe
1717

1818
.. autoclass:: wfdb.MultiRecord
1919
:members: get_frame_number, get_elapsed_time, get_absolute_time,
20-
multi_to_single
20+
multi_to_single, contained_ranges, contained_combined_ranges
2121

2222

2323
WFDB Annotations

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "wfdb"
3-
version = "4.0.0"
3+
version = "4.1.0"
44
description = "The WFDB Python package: tools for reading, writing, and processing physiologic signals and annotations."
55
authors = ["The Laboratory for Computational Physiology <[email protected]>"]
66
readme = "README.md"

wfdb/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "4.0.0"
1+
__version__ = "4.1.0"

0 commit comments

Comments
 (0)