We use cookies and other tools to enhance your experience on our website and to analyze our web traffic.
For more information about these cookies and the data collected, please refer to our Privacy Policy.

Getting Started with EDF files

26 posts
Was this reply useful? Learn more...
 
[-]
DennisDean +0 points · over 9 years ago

The European Data Format (EDF) was developed to store data from sleep studies in 1992. Despite enhancements and proposed alternatives, the original EDF format remains the most common way to exchange EDF files. If you are interested in understanding the details of the format, you might want to read the original article or visit the EDF specification site.

#For Programmers# Accessing data from an EDF file can be tricky when starting out since the file structure is little more complication than a CSV file. Fortunately, there are publicly available EDF readers/loaders for most programming languages. The EDF Specification page maintains a list publicly available EDF tools which you might want to review. New EDF loader/reader seem to be made available regularly. I would recommend that you Google EDF, load/read and the programming language you are working with to identify recently released tools.

We have develop a set of EDF tools written in MATLAB that includes an EDF loader. We have posted a MATLAB based tutorial that describes how to use our MATLAB EDF loader to help you get started.

52 posts
bio
Was this reply useful? Learn more...
 
[-]
remomueller +0 points · over 9 years ago

For Ruby Enthusiasts, we also have a Ruby Gem that loads and tests EDFs called edfize.

Here's an example how to validate a folder of EDFs from command line:

$ cd EDF-DIRECTORY
$ edfize test

Here's an example of how to load an EDF in Ruby using edfize:

# Tutorial 01 - Load EDF and Signals
#
#   gem install edfize
#
#   ruby tutorial_01_load_edf_and_signals.rb
#
# The EDF exists at:
#
#    https://sleepdata.org/datasets/shhs/files/edfs/shhs1?f=shhs1-200001.edf
#

require 'rubygems'
require 'edfize'

# Loads the file and reads the EDF Header
edf = Edfize::Edf.new('shhs1-200001.edf')

# Loads the data section of the EDF into Signal objects
edf.load_signals

# Print out information on the signals
puts "EDF #{edf.filename} contains the following #{edf.signals.count} signal#{'s' unless edf.signals.count == 1}:\n\n"

edf.signals.each do |signal|
  puts "Signal"
  puts "  Label                    : #{signal.label}"
  puts "  Samples Per Data Record  : #{signal.samples_per_data_record}"
  puts "  First 10 Physical Values : #{(signal.physical_values[0..10] + ['...']).inspect}\n\n"
end
4 posts
Was this reply useful? Learn more...
 
[-]
jaspalsingh +0 points · over 8 years ago

Dear Sir,

I was trying to use the EdfBrowser to read EDF files. unfortunately, with all the 20+ files (from SHHS1 as well as SHHS2) I tried, it says date parameter not as required and so reports 'not EDF or BDF' file.

regards

52 posts
bio
Was this reply useful? Learn more...
 
[-]
remomueller +0 points · over 8 years ago

Dear Jaspal,

Thanks for reaching out to us! Can you provide us with more information of the version of EdfBrowser you are using and where you downloaded it? Is this program written in Java, or are you using @DennisDean's Matlab Block EDF Loader?

Once we figure this out we can put you in contact with the correct developers of the tools, thanks!

Also, if you simply need to view the files, you can click the "Preview Online" link on the EDF download page to browse them using our online viewer. Note: You will need to be logged in and have a DAUA filled out for the dataset to preview the EDFs online.

4 posts
Was this reply useful? Learn more...
 
[-]
jaspalsingh +0 points · over 8 years ago

Dear Sir,

I discovered, that if I change the header of the EDF files, the files become accessible. (This relates to the EDFBrowser ver 1.56 by Teuniz. Hope it helps fellow researchers.) Also, I have the DAUA done.

Thanks and regards.

1 post
Was this reply useful? Learn more...
 
[-]
kejuzou +0 points · over 8 years ago

Can you make the details how you "change the header of the EDF files, the files become accessible.",please?