Reading Clinical EEG (.ezdata) file IN MATLAB

64 views (last 30 days)
Hassan Nawazish
Hassan Nawazish on 13 Sep 2019
Answered: jan brogger on 21 Mar 2024 at 9:58
how can we read a clinical EEG that is in .ezdata file format in Matlab. Following is the data from one subject and it shows the Ezdata in the name.i have searched alot but i am unable to find any sort of converter for this format.i have also attached the file which i am trying to read in Matlab in compressed folder.how can we read this file in matlab or convert it to some format that is supported by MATLAB.THANKS.The machine used for recording this data is Cadwell Arc Essentia.
  4 Comments
Hassan Nawazish
Hassan Nawazish on 13 Sep 2019
if possible kindly open the attached data file and apply this method yourself .it will be very efficent way to understand the problem for you.
deying liu
deying liu on 4 Feb 2024
hello,have u solved the problem?I face the same problem

Sign in to comment.

Answers (2)

Cris LaPierre
Cris LaPierre on 5 Feb 2024
ezdata appears to be a file created by Cadwell EEG Machines (along with .eas and .ez3). Based on what I see in the attached file, it is in SQLite format 3, which appears to be a database file. If you have access to the Database Toolbox, you can use sqlread to load the data.
zipFile = 'ace8295e-7820-...7-02-18-1.zip';
unzip(zipFile)
% Connect to the database
conn = sqlite('ace8295e-7820-4076-b08b-f533449786d1-2019-02-05-07-02-18-1.ezdata')
conn =
sqlite with properties: Database: 'ace8295e-7820-4076-b08b-f533449786d1-2019-02-05-07-02-18-1.ezdata' IsReadOnly: 0 AutoCommit: 'on'
% List all database contents
data = sqlfind(conn,'')
data = 11×5 table
Catalog Schema Table Columns Type _______ ______ ________________________ ____________________________________________________________________________________________________________________________________________________________________ ____ "" "" "FrameInfo" {["DataKey" "FrameKey" "Data" ]} "" "" "" "MediaHeader" {["Key" "Value" ]} "" "" "" "MediaHeaderSyncRowData" {["Key" "UpdateTick" "UpdateTimeStamp" "UpdateClientID" "DeletedFlag" ]} "" "" "" "MiscInfo" {["TimeStamp" "Key" "Value" ]} "" "" "" "MiscInfoSyncRowData" {["TimeStamp" "Key" "UpdateTick" "UpdateTimeStamp" "UpdateClientID" "DeletedFlag" ]} "" "" "" "syncrowdata" {["SyncTableKey" "PrimaryKey" "UpdateTick" "UpdateTimeStamp" "UpdateClientID" "DeletedFlag" ]} "" "" "" "synctable" {["SyncTableKey" "TableName" "PrimaryKey" "Direction" "UploadAnchor" "DownloadAnchor" "UploadTimeStamp" "DownloadTimeStamp" "SyncRowTable"]} "" "" "" "sqlite_sequence" {["name" "seq" ]} "" "" "" "TrackInfo" {["Offset" "Track" "Data" ]} "" "" "" "TrackInfoSyncRowData" {["Offset" "Track" "UpdateTick" "UpdateTimeStamp" "UpdateClientID" "DeletedFlag" ]} "" "" "" "SchemaUpdateLog" {["LogKey" "OldVersion" "NewVersion" "TimeStamp" "UpdateScript" ]} ""
It looks like FrameInfo contains the actual data, so load that using sqlread
% Load a table from the database (must know the name)
vals = sqlread(conn,data.Table(1))
vals = 338×3 table
DataKey FrameKey Data ____________ ____________ _______________ {16×1 uint8} {16×1 uint8} {18564×1 uint8} {16×1 uint8} {16×1 uint8} {18564×1 uint8} {16×1 uint8} {16×1 uint8} {18564×1 uint8} {16×1 uint8} {16×1 uint8} {18564×1 uint8} {16×1 uint8} {16×1 uint8} {18564×1 uint8} {16×1 uint8} {16×1 uint8} {18564×1 uint8} {16×1 uint8} {16×1 uint8} {18564×1 uint8} {16×1 uint8} {16×1 uint8} {18564×1 uint8} {16×1 uint8} {16×1 uint8} {18564×1 uint8} {16×1 uint8} {16×1 uint8} {18564×1 uint8} {16×1 uint8} {16×1 uint8} {18564×1 uint8} {16×1 uint8} {16×1 uint8} {18564×1 uint8} {16×1 uint8} {16×1 uint8} {18564×1 uint8} {16×1 uint8} {16×1 uint8} {18564×1 uint8} {16×1 uint8} {16×1 uint8} {18564×1 uint8} {16×1 uint8} {16×1 uint8} {18564×1 uint8}
% plot first track
plot(vals.Data{1})
This should be enough to get your started.

jan brogger
jan brogger on 21 Mar 2024 at 9:58
I am the author of an FieldTrip/EEGLAB plugin that reads Nicolet EEG files. I now have the same problem of working with Cadwell Arc .ezdata files. I might work on an EEGLAB plugin for Cadwell Arc .ezdata files. I have been able to reproduce @Cris LaPierre parsing of an .ezdata file as a SQLite database. Cris is probably right that the EEG data are in the FrameInfo table.
On a test EEG file which is 1199 seconds long (19 minutes 59 seconds) about 20 channels at 500 Hz, the FrameInfo table contains 1199 rows. Try using this statement.
SELECT COUNT(Data) FROM 'FrameInfo'
returns 1199. This is suspiciously like the number of seconds in the file.
Each line contains 10449 comma-separated values. So the data matrix contains (1199x10449) = 12528351 values.
The expected size of the EEG data matrix for 20 channels at 500 Hz at 1199 seconds is 11 990 000 data points. So it is not far off to think that this is a matrix with a header of 538 351 points, and a data matrix of 11 990 000 data points.
The SyncInfo table contains sync items at about one second distance Try:
SELECT UpdateTimeStamp FROM 'syncrowdata'
Parsing the EEG file is somewhat limited by the fact that the information about the EEG channels, which is likely in the TrackInfo table, is a binary large object (blob). Try:
SELECT * FROM 'TrackInfo'
So the extraction of raw EEG data from Cadwell Arc .ezdata format seems possible, but needs more work.
Please reply to this post if conversion of Cadwell Arc is of interest.

Categories

Find more on EEG/MEG/ECoG in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!