Skip to content

Neurobotics/jsEDF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jsEDF

JavaScript reader of EDF+/BDF+ files

Usage

var bytes = UInt8Array(); //Acquired some how (e.g. from input-file or server-based)

var edf = new EDF(bytes);

console.log("DateTime:", edf.date, edf.time);
console.log("Duration:", edf.duration, "seconds");
console.log("Has annotations:", edf.has_annotations);
console.log("Channel count:", edf.realChannelCount);

for (var i = 0; i<edf.realChannelCount; i++)
{
   console.log("> ", i, edf.channels[i].label);
}

var startSecond = 1;
var lengthSeconds = 5;

//Reading data from all channels [[], [], []] 
var data = edf.read(startSecond, lengthSeconds);

var channelIndex = 1;
//Reading data from one channel
var singleChannelData = edf.readSingleChannel(channelIndex, startSecond, lengthSeconds);

Demo

https://neurobotics.ru/nt/edf/

or just open demo.html from this repo

About

JavaScript reader of EDF+/BDF+ files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published