This document describes the format used by EDFbrowser to write montage files. ----------------------------------------------------------------------------- The montage file uses basic XML elements. XML attributes are not allowed. The first line of the file must contain: The root element must be "EDFbrowser_montage", like: Inside the root element "EDFbrowser_montage", there will be a child element for every signal composition. A signal composition represents one trace on the screen. The name of this element must be "signalcomposition", like: Inside every element "signalcomposition", there must be one element with the name "num_of_signals", like: 2 The value of this element must be an integer within the range 1 to MAXSIGNALS inclusive. The value represents from how many signals it is derived i.e. if it's monopolar, bipolar or tripolar, etc. Note: all signals in the same signalcomposition must share the same samplerate and resolution (e.g. uV/lsb). Inside every element "signalcomposition", there must be one element with the name "voltpercm", like: 100.0 The value of this element must be a floating point number. (The example has a value of 100.0.) The value represents the amplitude of the signal expressed in it's physical dimension (unit) per cm (vertical). Inside every element "signalcomposition", there must be one element with the name "screen_offset", like: 0 The value of this element must be an integer or floating point number. (The example has a value of 0.) The value represents the vertical offset compared to the baseline. Inside every element "signalcomposition", there must be one element with the name "polarity", like: 1 The value of this element must be either 1 or -1. (The example has a value of 1.) The value has the following meanings: 1 : normal presentation (not inverted) -1 : signal will be drawn inverted (upside down) Inside every element "signalcomposition", there must be one element with the name "color", like: 2 The value of this element must be an integer within the range 2 to 18 inclusive. (The example has a value of 2.) The value represents the color of the signalcomposition on the screen i.e. the trace or curve. Colortable: 2 Black 3 White 4 Dark gray 5 Gray 6 Light gray 7 Red 8 Green 9 Blue 10 Cyan 11 Magenta 12 Yellow 13 Dark red 14 Dark green 15 Dark blue 16 Dark cyan 17 Dark magenta 18 Dark Yellow Inside every element "signalcomposition", there can be one element with the name "alias", like: average An alias, if present, replaces the signalcomposition label on the screen. It does not influence the montages. Only 7-bit ASCII characters are allowed. No control-characters. Max 16 characters. Inside every element "signalcomposition", there can be one element with the name "fidfilter_cnt", like: 0 The value of this element must be an integer within the range 0 to 8. (The example has a value of 0.) The value represents the number of fid filters applied to the signalcomposition. Inside every element "signalcomposition", there can be one element with the name "ravg_filter_cnt", like: 0 The value of this element must be an integer within the range 0 to 8. (The example has a value of 0.) The value represents the number of running average filters applied to the signalcomposition. Inside every element "signalcomposition", there must be at least one element with the name "signal", like: The number of elements "signal" must be equal to the value of the element "num_of_signals". Note: all signals in the same signalcomposition must have the same samplerate and resolution. Inside every element "signal", there must be one element with the name "label", like: The value of this element must be a string containing only 7-bit ASCII characters. (The example has a value of "FP1".) The decimal value of every character must be in the range 32 to 126. This avoids the use of control-codes. The maximum amount of characters allowed is 16. There must be no termination character (like zero). The value represents the label of the signal in the file which must be used for this signalcomposition. Exception: Instead of an element "label", an element "edfindex" can be used: 4 The value of this element must be an integer within the range 0 to MAXSIGNALS - 1. (The example has a value of 4.) The value represents a zero-based number of the signal in the file, which must be used for this signalcomposition. The first signal in an EDF-file has number 0, the second signal has number 1, the third signal has number 2, etc. Inside the element "signal", there must be one element with the name "factor", like: 1.0 Multiplying factor. The value can be an integer or float in the range -128 to 128. 0 is not allowed. (The example has a value of 1.) The value must be greater than +0.001 or lower than -0.001. If the value of element "fidfilter_cnt" is non-zero, there must be at least one element with name "fidfilter", like: The number of elements "fidfilter" must be equal to the value of the element "fidfilter_cnt". Inside every element "fidfilter", there must be one element with the name "type", like: 0 The value of this element must be an integer in the range 0 to 4. (The example has a value of 0.) filtertype table: 0 higpass 1 lowpass 2 notch 3 bandpass 4 bandstop Note: when type = 2 (notch), element "model" must be 0 (Butterworth). Inside every element "fidfilter", there must be one element with the name "frequency", like: 0.5 The value of this element must be a floating point number. (The example has a value of 0.5 Hz.) The value represents the cut-off or notch frequency expressed in Hz. Inside every element "fidfilter", there must be one element with the name "frequency2", like: 100.0 The value of this element must be a floating point number. (The example has a value of 100.0 Hz.) The value represents the second cut-off frequency of a bandpass or bandstop filter expressed in Hz and must be higher than the value of "frequency". Inside every element "fidfilter", there must be one element with the name "ripple", like: 3.0 The value of this element must be a floating point number. (The example has a value of 3.0 dB.) The value represents the bandpass ripple expressed in dB. Inside every element "fidfilter", there must be one element with the name "order", like: 1 The value of this element must be an integer number within the range 1 to 100. (The example has a value of 1.) The value represents the filters order e.g. 1th order. Note: when type = 2 (notch), order must be in the range 3 to 100 and represents the Q-factor of the notch-filter. Inside every element "fidfilter", there must be one element with the name "model", like: 0 The value of this element must be an integer number within the range 0 to 2. (The example has a value of 0.) The value represents the filters model. filter model table: 0 Butterworth 1 Chebyshev 2 Bessel Note: when type = 2 (notch), element "model" must be 0 (Butterworth). Note: Not all filter parameters are applicabel to all types of filters. Despite, the parameters must be present. If a parameter is not applicabel e.g. frequency2 when using a highpassfilter, fill in some value. The value will be ignored but must be present in the file. Inside every element "signalcomposition", there can be one element with the name "ecg_filter", like: 1 The value of this element must be an integer with the value 1. (The example has a value of 1.) The value represents the activation of the heartrate detection. If the value of element "ravg_filter_cnt" is higher than zero, there must be at least one element with name "ravg_filter", like: The number of elements "ravg_filter" must be equal to the value of the element "ravg_filter_cnt". Inside every element "ravg_filter", there must be one element with the name "type", like: 0 The value of this element must be an integer in the range 0 to 1. (The example has a value of 0.) filtertype table: 0 higpass running average filter (also called: moving average filter) 1 lowpass running average filter Inside every element "ravg_filter", there must be one element with the name "size", like: 16 The value of this element must be an integer in the range 2 to 10000. (The example has a value of 16.) The value represents the size of the running average filterbuffer expressed in samples. Inside the root element "EDFbrowser_montage", there must be one element with the name "pagetime", like: 100000000 The value of this element must be an integer with a minimum value of 10000. (The example has a value of 100000000.) The value represents the timescale (pagetime) expressed in units of 100 nanoSeconds. Thus, a value of 100000000 means a timescale of 10 seconds. An example of the content of a montage file. --------------------------------------------- It contains three signalcompositions. All of them are derivatives of two signals: F4 - FP2, C4 - F4 and X1 - X2. The first signalcomposition has two filters: a 1th order highpass Butterworth filter at 0.1 Hz and a 1th order lowpass Butterworth filter at 35.0 Hz. ("frequency2" and "ripple" are not applicabel to this type of filter) The second signalcomposition has one filter: a notch filter at 50.0 Hz with a Q-factor of 20. The third signalcomposition has the heartrate detection activated. The timescale is set to 10 seconds. 2 50.000000 0.000000 2 2 0 1 -1 0 0.1000000000000000 0.1120000000000000 -1.0000000000000000 1 0 1 35.0000000000000000 39.2000000000000028 -1.0000000000000000 1 0 2 50.000000 0.000000 2 1 0 1 -1 2 50.0000000000000000 0.0001000000000000 -1.0000000000000000 20 0 2 5.000000 415.748031 7 0 0 1 -1 1 100000000