This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
Mathematica Import/Export Format

EDF (.edf)

EDF and EDF+ physiological signal recordings format.
Commonly used for the exchange and storage of medical time-series recordings.
Application areas include electroencephalography, polysomnography, electromyography, evoked potentials, electroneurography, and electrocardiography.
EDF is an acronym for European Data Format.
Binary format.
Stores multiple simultaneous signal channels, time-stamped annotations, and meta-information.
Encodes signal samples as 16-bit integers.
EDF+ can store discontinuous time series.
First published in 1992, superseded by EDF+ in 2003.
  • Import fully supports the EDF and EDF+ formats.
  • Import["file.edf"] imports an EDF file, returning the signals data as an array of integers.
  • Import["file.edf"]returns an array of the form {ch1, ch2, ...}where the signal channels chi are lists of possibly discontinuous records {reci1, reci2, ...}. Each record is given as a list of data samples.
  • Import["file.edf", elem] imports the specified element from an EDF file.
  • Import["file.edf", {elem, suba, subb, ...}] imports a subelement.
  • Import["file.edf", {{elem1, elem2, ...}}] imports multiple elements.
  • The import format can be specified with Import["file", "EDF"] or Import["file", {"EDF", elem, ...}].
  • See the reference pages for full general information on Import.
"Elements"list of elements and options available in this file
"Rules"full list of rules for each element and option
"Options"list of rules for options, properties and settings
  • Data representation elements:
"Data"all signal channels represented as a list of lists, with discontinuous records combined into a flat list
"Labels"names of all signal channels
"LabeledData"list of rules, each representing a labeled data channel
"RecordsData"all signal channels, given as an array of lists
  • Import uses the "Data" element by default.
  • Import["file.edf", "Data"] gives a list of packed arrays of data samples, effectively combining discontinuous records for each signal channel into a flat list.
  • Import["file.edf", "LabeledData"]imports the entire file and returns an expression of the form {label1->ch1, label2->ch2, ...}.
  • Import["file.edf", "RecordsData"]returns a packed array of the form {ch1, ch2, ...}where the signals chi are lists of discontinuous records {reci1, reci2, ...}. Each record is given as a list of data samples.
  • Meta-information elements:
"Annotations"time-stamped annotation list
"ChannelCount"number of simultaneous signal channels
"FilterInformation"information about signal filters applied during the recording, given as a list of strings
"PatientID"patient identification string
"Title"title of the recording, typically used as a document identification
"RecordTimings"start times and durations for each record, given in seconds
"SignalRange"physical data ranges for each signal channel
"SignalUnits"units in which the physical data for each channel is given
"StartDate"local date and time when the recording was started
"Device"information about the physical devices such as electrodes used for recording each channel
  • Import["file.edf", "Annotations"]gives the time-stamped annotation lists of an EDF+ file as a list of the form {{ti, duri}->{stri1, stri2, ...}, ...}.
  • In EDF and EDF+, all records have the same duration. EDF+ allows time gaps between records.