Changelog#
Unreleased#
[0.4.13] - 2026-02-11#
Added#
Add
keep_age,keep_sex, andkeep_starttimeparameters toEdf.anonymize()for optionally keeping these fields when anonymizing an EDF/BDF record (#100 by Clemens Brunner).
[0.4.12] - 2026-01-20#
Changed#
Avoid loading data from disk when creating a new
Edfobject based on signals from an existing file (#98).
[0.4.11] - 2025-11-19#
Fixed#
Use lazy loading in
Edf.slice_between_secondsto speed up execution (#93).
[0.4.10] - 2025-10-07#
Added#
Support reading and writing BDF and BDF+C files (#63).
Fixed#
Changing the microsecond part of an EDF+C with multiple annotation signals now correctly updates all annotation onsets (#63).
[0.4.9] - 2025-05-19#
Fixed#
When reading a file where the number of data records is set to
-1in the header, automatically fix the corresponding field and issue a warning (#74).
[0.4.8] - 2025-03-26#
Added#
Fixed#
[0.4.7] - 2025-03-21#
Fixed#
[0.4.6] - 2025-02-27#
Fixed#
Improve efficiency of creating annotations signals in EDF+ files (#65).
[0.4.5] - 2024-10-28#
Added#
[0.4.4] - 2024-09-25#
Added#
Allow adding new EDF+ annotations and overwriting all existing ones with
Edf.add_annotationsandEdf._set_annotations(#54).
[0.4.3] - 2024-06-23#
Fixed#
Retrieving data for signals where physical minimum and maximum are the same, the warning message now correctly reflects that (#51).
[0.4.2] - 2024-05-13#
Added#
Lazy load raw signals from local EDF files. Lazy loading is supported and enabled by default when passing a
strorpathlib.Pathobject to theread_edffunction. The behavior can be controlled using thelazy_load_dataparameters of theread_edffunction (#48).Public getter for digital signal values called
digital(#48).
[0.4.1] - 2024-04-30#
Added#
Make EDF+ header fields
patientandrecordingmore tolerant regarding non-compliant inputs: omitted subfields are returned asXinstead of throwing an exception (#18).Allow reading from
tempfile.SpooledTemporaryFile[bytes](#36).Enable the reading of EDF files where the filesize does not match the header information. Incomplete data records will be truncated (#41).
Fixed#
Allow reading more non-standard starttime and startdate fields (#30).
[0.4.0] - 2023-12-22#
Changed#
Added#
Expand
~(tilde) to the user’s home directory inedf_fileargument ofread_edf()andtargetargument ofEdf.write()(#23).
Fixed#
[0.3.1] - 2023-12-06#
Added#
[0.3.0] - 2023-11-30#
Changed#
Edf.signalscan not be set anymore. UseEdf.append_signals(),Edf.drop_signals(), andEdfSignal.update_data()instead (#10).
Added#
Fixed#
Disallow creating a new Edf where local patient/recording identification subfields are empty strings (#6).
Allow retrieving the starttime from a file where the reserved field indicates it is an EDF+C but no annotations signal is present (#8).
Disallow removing the EDF+ timekeeping signal with
Edf.drop_signals(#10).
[0.2.1] - 2023-11-17#
Fixed#
Disallow creating a new Edf with a recording startdate not between 1985-01-01 and 2084-12-31 (#5).
[0.2.0] - 2023-11-16#
Added#
Support non-standard header fields (not encoded as UTF-8) by replacing incompatible characters with “�” (#4).
Fixed#
When
EdfSignal.physical_minorEdfSignal.physical_maxdo not fit into their header fields, they are now always rounded down or up, respectively, to ensure all physical values lie within the physical range (#2).The calculation of
num_data_recordsfrom signal duration anddata_record_durationis now more robust to floating point errors (#3).
[0.1.1] - 2023-11-09#
Fixed#
Use correct path to sphinx config file in
.readthedocs.yml.
[0.1.0] - 2023-11-09#
Initial release 🎉
Added#
Support for reading and writing EDF and EDF+C files.
I/O from/to files and file-like objects.
Edf.slice_between_seconds()andEdf.slice_between_annotations()for slicing a recording in time.Edf.drop_annotations()for dropping EDF+ annotations based on their text.Edf.drop_signals()for dropping individual EDF signals by specifying their index or label.Edf.anonymize()for anonymizing all identifying header fields.