Affiliated to:
       

 

      EDF++

MASS's records are provided in the EDF++ format. This is a sub-standard of the EDF+ format (much as EDF is a sub-standard of the EDF format), meaning that these files are compatible with the EDF+ format. However, a richer annotation scheme was judge useful than the one readily incorporated in the EDF+ format. To support inter-operability of these annotations, we wanted to document as clearly as possible this additional specification. We decided to use a distinct name for this sub-standard (EDF++) to be able to indentify clearly recordings following this scheme. 

 

 

EDF  and EDF+

 

The EDF and the EDF+ standards have already been comprehensively documented on this web site and in [3-2, 3-3] . It should be mentioned that XML annotations are discussed on the EDF+ website but no standardization effort has been made, leaving it for local non inter-operable specifications.

 

 

EDF++

 

The standard format of EDF+ annotations is as follow:

 

+[start time]21[duration]20[event description]200

 

where the 0 20 and 21 are binary markers, [start time] is the time elapsed since the beginning of the recording (in seconds),.[duration] is the event duration (also in seconds) and [event description] is a string of UCS characters encoded by UTF-8 describing the annotation (see EDF+ description for further details ). EDF++ specifies that [event description] can take two forms: plain strings (as in EDF+) and XML strings. The first character of the [event description] string determines which form is used: "<" for an XML string, any other character for a plain string. General guidelines regarding standardization of plain string annotations and other EDF+ texts (e.g., channel label, physical dimension, etc.) are formulated on the Standard texts and polarity rules  page of the EDF+ website. MASS recordings follow these rules but only use plain strings for stage annotations such as to avoid breaking compatibility with existing PSG EDF+ readers. Supplementary stage scoring (it can be useful to score nights multiple times to evaluate agreement and devise consensus scheme of night scoring) can be entered using XML strings.

 

XML strings


The XML annotations have been kept as simple as possible: we used the format <Event X/> where X is a space-separated list of fields encoded as attributeName=”description” where attributeName is the name of the attribute and description is a string representation of its value. For example, <Event channel="Cz-A1" name="SpyndleRMS" scoringType="automatic" groupName="spindle" rmsAmp="12.07" stage="Sleep stage 2 " meanFreq="12.98" cycle="2"/>  describes a spindle event detected automatically on channel Cz-A1 during sleep stage 2 of the second REM-NREM cycle with a root mean square (RMS) amplitude of 12.07 µV. Currently defined attributes are as follow [please suggest any additional attribute that might be missing for your specific applications]:

 

Attribute

Type

Description

Values

name

mandatory

Name of the class of event to which this particular event belongs.

User defined. It should match the name attribute of a <Detector> or an <Expert> tag, if such tags are included [see below].

groupName

mandatory

An identifier for a group of event classes.

“spindle”, “kcomplex”, “slowWave” [please propose additional names if the kind of event you are investigating is not covered by this limited list]

channel

optional

Channel name. If this attribute is not provided, the event is considered not to be channel-specific.

It should be identical the signal “label” included in the EDF+ header of this file or of an associated EDF+ file.

scoringType

optional

Type of scoring used for this event.

“automatic” or “manual”

cycle

optional

NREM-REM cycle in which the event has been detected.

String representation of an integer greater than 0.

cycleDef

optional

Unique name identifying the definition of the rules used to determine the NREM-REM cycles.

User defined. It should match the name attribute of the <CycleDefinition> tag, if this tag is included [see below].

stage

optional, redundant

Sleep stage of the event.

One of the sleep stage defined in the EDF+ standard: "Sleep stage W", "Sleep stage 1", "Sleep stage 2", "Sleep stage 3", "Sleep stage 4", "Sleep stage R", "Sleep stage ?", "Movement time", "Sleep stage N", "Sleep stage N1", "Sleep stage N2", or "Sleep stage N3".

rmsAmp

optional, redundant

Root mean square amplitude of the signal during the event.

As computed. [string representation of a float; in µV]

meanFreq

optional, redundant

Mean frequency of the signal during the event.

As computed. [string representation of a float; in Hz]

The meaning of the terms in the “Type” column is as follow:

 

 

 

Information related to events but which are the same for a whole class of events should be added just one time and not for every single event. Thus, supplementary annotations can be included only once at the beginning of the file with [time start] and [duration] both equals to 0. These annotations are useful to add supplementary information to promote traceability and reproducibility of these event scoring. As of now, the following additional tags have been defined < Detector X/>, < Expert X/>, and < CycleDefinition X/> with X being a space-separated list of fields as for the <Event X/> tag. Attributes for the < Detector X/> tags are as follow:

Attribute

Type

Description

Values

name

mandatory

Unique name identifying an automated detector.

User defined. It should match the name attribute of the related <Event> tags.

package

optional

Name of the software package where this detector is implemented.

User defined.

object

optional

Name of the object implementing this detector within the software package.

User defined.

version

optional

Version of the implementation.

User defined.

Example: <Detector name=”SpyndleRMS” package="Spyndle" object="spyndle.detector.SpindleDetectorRMS" version="0.3.1">

 

Attributes for the < Expert X/> tags are as follow:

Attribute

Type

Description

Values

name

mandatory

Unique name identifying this automated detector.

User defined. It should match the name attribute of the related <Event> tags.

email

optional

E-mail of this expert. Aside from allowing contacting the given expert, it also helps identifying him/her.

User defined.

Example: <Expert name=”Christian O’Reilly” email="christian.oreilly@umontreal.ca"> 

 

Attributes for the < CycleDefinition X/> tags are as follow:

Attribute

Type

Description

Values

name

mandatory

Unique name identifying a definition of the rules used to determine NREM-REM cycles.

User defined. It should match the cycleDef attribute of the related <Event> tag.

description

optional

A description of how the NREM-REM cycles have been determined.

User defined.

Example: <Expert name=”Feinberg & Floyd” description="According to the methodology of Feinberg & Floyd, Systematic trends across the night in human sleep cycles. Psychophysiology. 1979; 16(3): 283-91.">

 

Note 1: EDF++ readers should be programmed such that they simply ignore attributes not defined here (they should not report an error). 

 

Note 2: this XML annotation scheme is open to modifications following user-community propositions. Please feel free to propose new labels or XML structures if those provided here are too limited for your need. We'll try to include them to the present description without breaking backward-compatibility. 



 

 

 



comments powered by Disqus

Questions related to MASS should be addressed to christian.oreilly@umontreal.ca