Skip to content

Neurobotics/jsEDF

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

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