diff --git a/changelog.d/cloud-writing.rst b/changelog.d/cloud-writing.rst deleted file mode 100644 index 77065db6..00000000 --- a/changelog.d/cloud-writing.rst +++ /dev/null @@ -1,3 +0,0 @@ -**Write WFDB records and annotations to cloud storage** - ``wrsamp`` and ``wrann`` now accept cloud URIs in ``write_dir``, including - S3, Google Cloud Storage, Azure Blob Storage, and in-memory filesystems. diff --git a/changelog.d/dataframe-chunks.rst b/changelog.d/dataframe-chunks.rst deleted file mode 100644 index 53beb0fa..00000000 --- a/changelog.d/dataframe-chunks.rst +++ /dev/null @@ -1,5 +0,0 @@ -**Iterate over long records as DataFrame chunks** - ``wfdb.iter_dataframes`` reads one sample window at a time and yields - pandas DataFrames with continuous time indexes, avoiding a full-record - signal allocation. Ranged reads also work when the header omits the signal - length. diff --git a/changelog.d/dataframe-header-cache.rst b/changelog.d/dataframe-header-cache.rst deleted file mode 100644 index 2e19b053..00000000 --- a/changelog.d/dataframe-header-cache.rst +++ /dev/null @@ -1,3 +0,0 @@ -**Reuse headers while iterating over DataFrame chunks** - ``wfdb.iter_dataframes`` now reads each record and segment header only once - per iterator, reducing requests for remote records. diff --git a/changelog.d/edf-adc-resolution.rst b/changelog.d/edf-adc-resolution.rst deleted file mode 100644 index 96488026..00000000 --- a/changelog.d/edf-adc-resolution.rst +++ /dev/null @@ -1,3 +0,0 @@ -**Correct EDF ADC resolution metadata** - ``read_edf`` now reports the bit width of the inclusive digital range, so - full 12-bit and 16-bit EDF channels report ``adc_res`` 12 and 16. diff --git a/changelog.d/edf-ann-precision.rst b/changelog.d/edf-ann-precision.rst deleted file mode 100644 index 2500f1c7..00000000 --- a/changelog.d/edf-ann-precision.rst +++ /dev/null @@ -1,4 +0,0 @@ -**Preserve EDF+ annotation timing with mixed signal rates** - ``rdedfann`` now uses the fastest physiologic signal rate for annotation - sample numbers by default. The selected rate is returned as ``fs`` in the - info dictionary and stored in written WFDB annotation files. diff --git a/changelog.d/edf-ann-sample-num.rst b/changelog.d/edf-ann-sample-num.rst deleted file mode 100644 index be1e76d7..00000000 --- a/changelog.d/edf-ann-sample-num.rst +++ /dev/null @@ -1,3 +0,0 @@ -**Correct EDF+ annotation sample numbers** - ``rdedfann`` now converts onset times to sample numbers using the record's - sampling frequency and rounds to the nearest sample in both return modes. diff --git a/changelog.d/edf-annotation-rate.rst b/changelog.d/edf-annotation-rate.rst deleted file mode 100644 index 4e197a80..00000000 --- a/changelog.d/edf-annotation-rate.rst +++ /dev/null @@ -1,6 +0,0 @@ -**Exclude EDF+ annotation channels from signal rates** - ``read_edf`` now calculates sampling frequency and signal frames from - physiologic channels only, and no longer includes ``EDF Annotations`` in - ``sig_name`` or ``p_signal``. Annotation-only files have no signal rate: - ``rdedfann`` returns ``None`` sample numbers unless ``fs`` is supplied, and - writing a WFDB annotation from one now requires ``fs``. diff --git a/changelog.d/edf-annotation-raw-bytes.rst b/changelog.d/edf-annotation-raw-bytes.rst deleted file mode 100644 index 1093c0dc..00000000 --- a/changelog.d/edf-annotation-raw-bytes.rst +++ /dev/null @@ -1,4 +0,0 @@ -**Decode EDF+ annotations from their original bytes** - ``rdedfann`` now reads annotation text from the EDF digital samples, so - physical calibration and other channels' sample rates do not alter it. - EDF+ annotation text is decoded as UTF-8 by default. diff --git a/changelog.d/edf-baseline-list.rst b/changelog.d/edf-baseline-list.rst deleted file mode 100644 index 2a340c16..00000000 --- a/changelog.d/edf-baseline-list.rst +++ /dev/null @@ -1,3 +0,0 @@ -**Make records read from EDF writable** - ``read_edf`` now stores the computed baseline as a list, so its returned - record can be written with ``Record.wrsamp``. diff --git a/changelog.d/edf-conversion-speed.rst b/changelog.d/edf-conversion-speed.rst deleted file mode 100644 index d627a25e..00000000 --- a/changelog.d/edf-conversion-speed.rst +++ /dev/null @@ -1,4 +0,0 @@ -**Speed up EDF conversion and correct mixed-rate scaling** - EDF writing now assembles data by block without per-sample Python lists. - EDF reading averages higher-rate channels with NumPy and applies their ADC - gain correctly when sample rates differ. diff --git a/changelog.d/edf-digital-checksum.rst b/changelog.d/edf-digital-checksum.rst deleted file mode 100644 index 728b9e11..00000000 --- a/changelog.d/edf-digital-checksum.rst +++ /dev/null @@ -1,3 +0,0 @@ -**Correct checksums in records read from EDF files** - ``read_edf`` now computes channel checksums from the converted digital - samples, including channels with inverted scales or averaged samples. diff --git a/changelog.d/edf-extra-block.rst b/changelog.d/edf-extra-block.rst deleted file mode 100644 index b44ba2b7..00000000 --- a/changelog.d/edf-extra-block.rst +++ /dev/null @@ -1,3 +0,0 @@ -**Avoid an extra EDF data record at exact block boundaries** - ``wfdb_to_edf`` no longer appends a full block of padding when the input - signal length is an exact multiple of the EDF data record length. diff --git a/changelog.d/edf-inverted-gain.rst b/changelog.d/edf-inverted-gain.rst deleted file mode 100644 index 73b80788..00000000 --- a/changelog.d/edf-inverted-gain.rst +++ /dev/null @@ -1,5 +0,0 @@ -**Write EDF records with inverted physical ranges** - ``read_edf`` now reflects the digital scale of inverted channels so the - returned record has a positive WFDB gain and can be written with ``wrsamp``. - The shared signal file uses format 32 only when a converted sample cannot - be stored as valid format 16 data. diff --git a/changelog.d/edf-tal-parser.rst b/changelog.d/edf-tal-parser.rst deleted file mode 100644 index d57d58f4..00000000 --- a/changelog.d/edf-tal-parser.rst +++ /dev/null @@ -1,3 +0,0 @@ -**Parse EDF+ annotation delimiters correctly** - ``rdedfann`` now preserves plus signs in annotation text, handles negative - onsets, optional durations, and multiple annotations in a TAL. diff --git a/changelog.d/filter-gain-frequency.rst b/changelog.d/filter-gain-frequency.rst deleted file mode 100644 index df4094a3..00000000 --- a/changelog.d/filter-gain-frequency.rst +++ /dev/null @@ -1,4 +0,0 @@ -**Evaluate filter gain at the requested frequency** - ``processing.get_filter_gain`` no longer rounds up to a fixed frequency grid. - This also fixes an ``IndexError`` at the Nyquist frequency and frequencies - just below it. diff --git a/changelog.d/flattened-segment-ranges.rst b/changelog.d/flattened-segment-ranges.rst deleted file mode 100644 index 73a5d479..00000000 --- a/changelog.d/flattened-segment-ranges.rst +++ /dev/null @@ -1,5 +0,0 @@ -**Preserve source segment ranges on flattened records** - ``rdrecord`` now retains source segment names and frame ranges, including - empty segments, in the ``source_segments`` attribute when flattening a - multi-segment record. Each range is a ``wfdb.io.SourceSegment`` named tuple - of ``(name, start, stop)``. diff --git a/changelog.d/plot-aux-notes.rst b/changelog.d/plot-aux-notes.rst deleted file mode 100644 index 31de3e82..00000000 --- a/changelog.d/plot-aux-notes.rst +++ /dev/null @@ -1,5 +0,0 @@ -**Display annotation notes on plots** - ``plot_wfdb`` can now display annotation auxiliary notes beside their markers - when called with ``plot_aux=True``. Annotations on channels beyond the - record's signals are now drawn on the correct axes, even when some channels - have no annotations. diff --git a/changelog.d/read-edf-calibration-rates.rst b/changelog.d/read-edf-calibration-rates.rst deleted file mode 100644 index 36e31fec..00000000 --- a/changelog.d/read-edf-calibration-rates.rst +++ /dev/null @@ -1,6 +0,0 @@ -**Correct EDF calibration and mixed-rate reads** - ``read_edf`` no longer shifts physical values by one digital unit, and it - reads files with differing per-signal sample counts consistently. EDF+ - annotation decoding uses the corrected values. Physical samples can differ - from the WFDB C ``edf2mit`` output by up to one digital unit when the EDF - offset is fractional, because its baseline is rounded to an integer. diff --git a/changelog.d/readme-pypi-refresh.rst b/changelog.d/readme-pypi-refresh.rst deleted file mode 100644 index 8046ac6f..00000000 --- a/changelog.d/readme-pypi-refresh.rst +++ /dev/null @@ -1,3 +0,0 @@ -**Improve the README and PyPI project page** - Add a task-focused quick start, clearer feature and documentation links, and - more useful PyPI project metadata, including a link to the WFDB project site. diff --git a/changelog.d/segment-list-fields.rst b/changelog.d/segment-list-fields.rst deleted file mode 100644 index 444c61ef..00000000 --- a/changelog.d/segment-list-fields.rst +++ /dev/null @@ -1,3 +0,0 @@ -**Validate multi-segment header fields as lists** - ``seg_name`` and ``seg_len`` must be lists with correctly typed elements. - Invalid values now raise a clear ``TypeError`` before writing a header. diff --git a/changelog.d/soundfile-flac-seek.rst b/changelog.d/soundfile-flac-seek.rst deleted file mode 100644 index 114a3b1f..00000000 --- a/changelog.d/soundfile-flac-seek.rst +++ /dev/null @@ -1,3 +0,0 @@ -**Avoid FLAC seek failures in older SoundFile builds** - Require SoundFile 0.13.1 or newer so supported wheels use updated bundled - FLAC libraries. Document the separate system-library requirement. diff --git a/changelog.d/variable-layout-digital-missing.rst b/changelog.d/variable-layout-digital-missing.rst deleted file mode 100644 index abde1771..00000000 --- a/changelog.d/variable-layout-digital-missing.rst +++ /dev/null @@ -1,4 +0,0 @@ -**Read digital variable-layout records with absent channels** - ``rdrecord`` and ``iter_dataframes`` now handle windows where a requested - channel has no samples in any selected segment. Those channels are filled - with a missing-value marker instead of raising ``KeyError``. diff --git a/changelog.d/write-flattened-records.rst b/changelog.d/write-flattened-records.rst deleted file mode 100644 index 500756ea..00000000 --- a/changelog.d/write-flattened-records.rst +++ /dev/null @@ -1,6 +0,0 @@ -**Write flattened multi-segment records** - Records returned by ``rdrecord`` with ``m2s=True`` can now be written after - assigning a new record name and signal file names. Missing write metadata is - filled in, and incompatible or unknown formats are converted to format 32. - The caller's record is not changed. Records with conflicting source units - require an explicit ``units`` value. diff --git a/docs/changes.rst b/docs/changes.rst index 041de0ff..7850b2c4 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -7,6 +7,130 @@ This page lists recent changes in the `wfdb` package (since version 4.0.0) that .. towncrier release notes start +Version 5.3.0 (Nov 2026) +------------------------ + +This release adds cloud writing for records and annotations, chunked DataFrame +reads, and support for writing flattened multi-segment records. It also +corrects EDF calibration, mixed-rate reads, and EDF+ annotation timing and +decoding. EDF+ annotation channels are no longer treated as physiologic +signals; writing annotations from an annotation-only EDF file now requires an +explicit sampling frequency. See the entries below for details. + +**Write WFDB records and annotations to cloud storage** + ``wrsamp`` and ``wrann`` now accept cloud URIs in ``write_dir``, including + S3, Google Cloud Storage, Azure Blob Storage, and in-memory filesystems. + +**Iterate over long records as DataFrame chunks** + ``wfdb.iter_dataframes`` reads one sample window at a time and yields + pandas DataFrames with continuous time indexes, avoiding a full-record + signal allocation. Ranged reads also work when the header omits the signal + length. + +**Reuse headers while iterating over DataFrame chunks** + ``wfdb.iter_dataframes`` now reads each record and segment header only once + per iterator, reducing requests for remote records. + +**Correct EDF ADC resolution metadata** + ``read_edf`` now reports the bit width of the inclusive digital range, so + full 12-bit and 16-bit EDF channels report ``adc_res`` 12 and 16. + +**Preserve EDF+ annotation timing with mixed signal rates** + ``rdedfann`` now uses the fastest physiologic signal rate for annotation + sample numbers by default. The selected rate is returned as ``fs`` in the + info dictionary and stored in written WFDB annotation files. + +**Correct EDF+ annotation sample numbers** + ``rdedfann`` now converts onset times to sample numbers using the record's + sampling frequency and rounds to the nearest sample in both return modes. + +**Exclude EDF+ annotation channels from signal rates** + ``read_edf`` now calculates sampling frequency and signal frames from + physiologic channels only, and no longer includes ``EDF Annotations`` in + ``sig_name`` or ``p_signal``. Annotation-only files have no signal rate: + ``rdedfann`` returns ``None`` sample numbers unless ``fs`` is supplied, and + writing a WFDB annotation from one now requires ``fs``. + +**Decode EDF+ annotations from their original bytes** + ``rdedfann`` now reads annotation text from the EDF digital samples, so + physical calibration and other channels' sample rates do not alter it. + EDF+ annotation text is decoded as UTF-8 by default. + +**Make records read from EDF writable** + ``read_edf`` now stores the computed baseline as a list, so its returned + record can be written with ``Record.wrsamp``. + +**Speed up EDF conversion and correct mixed-rate scaling** + EDF writing now assembles data by block without per-sample Python lists. + EDF reading averages higher-rate channels with NumPy and applies their ADC + gain correctly when sample rates differ. + +**Correct checksums in records read from EDF files** + ``read_edf`` now computes channel checksums from the converted digital + samples, including channels with inverted scales or averaged samples. + +**Avoid an extra EDF data record at exact block boundaries** + ``wfdb_to_edf`` no longer appends a full block of padding when the input + signal length is an exact multiple of the EDF data record length. + +**Write EDF records with inverted physical ranges** + ``read_edf`` now reflects the digital scale of inverted channels so the + returned record has a positive WFDB gain and can be written with ``wrsamp``. + The shared signal file uses format 32 only when a converted sample cannot + be stored as valid format 16 data. + +**Parse EDF+ annotation delimiters correctly** + ``rdedfann`` now preserves plus signs in annotation text, handles negative + onsets, optional durations, and multiple annotations in a TAL. + +**Evaluate filter gain at the requested frequency** + ``processing.get_filter_gain`` no longer rounds up to a fixed frequency grid. + This also fixes an ``IndexError`` at the Nyquist frequency and frequencies + just below it. + +**Preserve source segment ranges on flattened records** + ``rdrecord`` now retains source segment names and frame ranges, including + empty segments, in the ``source_segments`` attribute when flattening a + multi-segment record. Each range is a ``wfdb.io.SourceSegment`` named tuple + of ``(name, start, stop)``. + +**Display annotation notes on plots** + ``plot_wfdb`` can now display annotation auxiliary notes beside their markers + when called with ``plot_aux=True``. Annotations on channels beyond the + record's signals are now drawn on the correct axes, even when some channels + have no annotations. + +**Correct EDF calibration and mixed-rate reads** + ``read_edf`` no longer shifts physical values by one digital unit, and it + reads files with differing per-signal sample counts consistently. EDF+ + annotation decoding uses the corrected values. Physical samples can differ + from the WFDB C ``edf2mit`` output by up to one digital unit when the EDF + offset is fractional, because its baseline is rounded to an integer. + +**Improve the README and PyPI project page** + Add a task-focused quick start, clearer feature and documentation links, and + more useful PyPI project metadata, including a link to the WFDB project site. + +**Validate multi-segment header fields as lists** + ``seg_name`` and ``seg_len`` must be lists with correctly typed elements. + Invalid values now raise a clear ``TypeError`` before writing a header. + +**Avoid FLAC seek failures in older SoundFile builds** + Require SoundFile 0.13.1 or newer so supported wheels use updated bundled + FLAC libraries. Document the separate system-library requirement. + +**Read digital variable-layout records with absent channels** + ``rdrecord`` and ``iter_dataframes`` now handle windows where a requested + channel has no samples in any selected segment. Those channels are filled + with a missing-value marker instead of raising ``KeyError``. + +**Write flattened multi-segment records** + Records returned by ``rdrecord`` with ``m2s=True`` can now be written after + assigning a new record name and signal file names. Missing write metadata is + filled in, and incompatible or unknown formats are converted to format 32. + The caller's record is not changed. Records with conflicting source units + require an explicit ``units`` value. + Version 5.2.0 (Nov 2026) ------------------------ diff --git a/pyproject.toml b/pyproject.toml index 3fdec911..c10c343e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "uv_build" [project] name = "wfdb" -version = "5.2.0" +version = "5.3.0" description = "Read, write, plot, and process physiologic waveforms and annotations." authors = [{name = "The Laboratory for Computational Physiology", email = "contact@physionet.org"}] license = "MIT"