Meta-EEGs: A structured approach for processing high-volume EEG data.
The 3 matches
- [1] § Method details › Meta-EEG of Siena Scalp EEG Database v1.0.0 ↔ code_siena.ipynb, lines 107–190 · score 0.58 · Siena DB, post ictal, lateralisation, localization, subfile, row
- [2] § Method details › Meta-EEG of CHB-MIT Scalp EEG Database v1.0.0.0 ↔ data_preprocess_chbmit.py, lines 11–27 · score 0.51 · CHB MIT DB, timestamp.csv, row
- [3] § Method details › Meta-EEG of CHB-MIT Scalp EEG Database v1.0.0.0 ↔ code_chbmit.ipynb, lines 13–26 · score 0.51 · CHB MIT DB, timestamp.csv, patients
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Jupyter notebook · 360 lines · 9.2 KB · no license · 1 match
- # %%
- pip install pyEDFlib
- # %%
- # libraries installation
- from pyedflib import EdfReader
- from numpy import zeros, arange
- import csv
- import pandas as pd
- from csv import reader, writer
- import os
- # %%
- #paths defines
- Edfpath='edf_files/'
- tempath='temp/'
- # read the excel file made for patient data
- excelData=pd.read_csv('Siena DB timestamp.csv', header=None)
- total_no_of_edfs=50
- excelData
- # %% [markdown]
- # **ICTAL**
- # %%
- seizuren= 0
- for i in range(1,total_no_of_edfs):
- edfFile=excelData[1][i]
- patientno= excelData[0][i]
- subfile=excelData[1][i]
- seizure_type= excelData[4][i]
- localization=excelData[5][i]
- lateralization=excelData[6][i]
- # read Ictal start and end rows
- IctalS= int(excelData[15][i])
- IctalE= int(excelData[16][i])
- print(seizure_type,localization,lateralization,IctalS,IctalE)
- # read edf file
- f=EdfReader(Edfpath+ edfFile+'.edf')
- n = f.signals_in_file
- signal_labels = f.getSignalLabels()
- print(signal_labels)
- data = zeros((n,f.getNSamples()[0]))
- data
- for k in arange(n):
- data[k, :] = f.readSignal(k)
- #store all data
- data_eeg = data
- #close the edf file
- f._close()
- del f
- print(data_eeg.shape)
- df = pd.DataFrame(data_eeg)
- # convert the edf to csv file
- df.to_csv(tempath+'temp1.csv', index=False)
- total_cols= len(df.columns)
- print(total_cols)
- #cut the data for ictal
- cols=list(range(0,IctalS))
- df.drop(columns=cols, axis=1,inplace=True)
- cols=list(range(IctalE+1,total_cols))
- df.drop(columns=cols, axis=1,inplace=True)
- print(df.shape)
- # add class label
- df[len(df.columns)]=1
- #save the updated csv file
- df.to_csv(tempath+'temp2.csv', index=False)
- # create pateint specific folder
- folderpath = 'Generated siena db/Patient Inter Specific/'+seizure_type+'/'+localization+'/'+lateralization+'/'+'PN'+str(patientno)+'/'
- if not os.path.exists(folderpath):
- os.makedirs(folderpath)
- newpath= folderpath + 'Ictal' +'/'
- if not os.path.exists(newpath):
- os.makedirs(newpath)
- print(df.shape)
- # transpose the csv
- with open(tempath+'temp2.csv') as f, open(newpath + subfile +'_ictal.csv', 'w') as fw:
- writer(fw, delimiter=',').writerows(zip(*reader(f, delimiter=',')))
- df=pd.read_csv(newpath + subfile +'_ictal.csv', header=None)
- df.drop(columns=0, axis=1,inplace=True)
- print(df.shape)
- # Patient Non Specific
- newpath2= 'Generated siena db/Patient Non-Specific/Ictal/'
- if not os.path.exists(newpath2):
- os.makedirs(newpath2)
- df.to_csv(newpath + subfile +'_ictal.csv', index=False, header=False)
- df.to_csv(newpath2+str(i+seizuren)+'.csv', index=False, header=False)
- # %% [markdown]
- # **POST-ICTAL**
- # %%
- seizuren= 0
- for i in range(1,total_no_of_edfs):
- edfFile=excelData[1][i]
- patientno= excelData[0][i]
- subfile=excelData[1][i]
- seizure_type= excelData[4][i]
- localization=excelData[5][i]
- lateralization=excelData[6][i]
- # read Post Ictal start and end rows
- PostIctalS= int(excelData[19][i])
- PostIctalE= int(excelData[20][i])
- print(seizure_type,localization,lateralization,PostIctalS,PostIctalE)
- # read edf file
- f=EdfReader(Edfpath+ edfFile+'.edf')
- n = f.signals_in_file
- signal_labels = f.getSignalLabels()
- print(signal_labels)
- data = zeros((n,f.getNSamples()[0]))
- data
- for k in arange(n):
- data[k, :] = f.readSignal(k)
- #store all data
- data_eeg = data
- #close the edf file
- f._close()
- del f
- print(data_eeg.shape)
- df = pd.DataFrame(data_eeg)
- # convert the edf to csv file
- df.to_csv(tempath+'temp1.csv', index=False)
- total_cols= len(df.columns)
- print(total_cols)
- #cut the data for post-ictal
- cols=list(range(0,PostIctalS))
- df.drop(columns=cols, axis=1,inplace=True)
- cols=list(range(PostIctalE+1,total_cols))
- df.drop(columns=cols, axis=1,inplace=True)
- print(df.shape)
- # add class label
- df[len(df.columns)]=1
- #save the updated csv file
- df.to_csv(tempath+'temp2.csv', index=False)
- # create pateint specific folder
- folderpath = 'Generated siena db/Patient Inter Specific/'+seizure_type+'/'+localization+'/'+lateralization+'/'+'PN'+str(patientno)+'/'
- if not os.path.exists(folderpath):
- os.makedirs(folderpath)
- newpath= folderpath + 'Post-Ictal' +'/'
- if not os.path.exists(newpath):
- os.makedirs(newpath)
- print(df.shape)
- # transpose the csv
- with open(tempath+'temp2.csv') as f, open(newpath + subfile +'_post-ictal.csv', 'w') as fw:
- writer(fw, delimiter=',').writerows(zip(*reader(f, delimiter=',')))
- df=pd.read_csv(newpath + subfile +'_post-ictal.csv', header=None)
- df.drop(columns=0, axis=1,inplace=True)
- print(df.shape)
- # Patient Non Specific
- newpath2= 'Generated siena db/Patient Non-Specific/Post-Ictal/'
- if not os.path.exists(newpath2):
- os.makedirs(newpath2)
- df.to_csv(newpath + subfile +'_post-ictal.csv', index=False, header=False)
- df.to_csv(newpath2+str(i+seizuren)+'.csv', index=False, header=False)
- # %% [markdown]
- # **PRE_ICTAL**
- # %%
- seizuren= 0
- for i in range(1,total_no_of_edfs):
- edfFile=excelData[1][i]
- patientno= excelData[0][i]
- subfile=excelData[1][i]
- seizure_type= excelData[4][i]
- localization=excelData[5][i]
- lateralization=excelData[6][i]
- # read Pre Ictal start and end rows
- PreIctalS= int(excelData[23][i])
- PreIctalE= int(excelData[24][i])
- print(seizure_type,localization,lateralization,PreIctalS,PreIctalE)
- # read edf file
- f=EdfReader(Edfpath+ edfFile+'.edf')
- n = f.signals_in_file
- signal_labels = f.getSignalLabels()
- print(signal_labels)
- data = zeros((n,f.getNSamples()[0]))
- data
- for k in arange(n):
- data[k, :] = f.readSignal(k)
- #store all data
- data_eeg = data
- #close the edf file
- f._close()
- del f
- print(data_eeg.shape)
- df = pd.DataFrame(data_eeg)
- # convert the edf to csv file
- df.to_csv(tempath+'temp1.csv', index=False)
- total_cols= len(df.columns)
- print(total_cols)
- #cut the data for pre-ictal
- cols=list(range(0,PreIctalS))
- df.drop(columns=cols, axis=1,inplace=True)
- cols=list(range(PreIctalE+1,total_cols))
- df.drop(columns=cols, axis=1,inplace=True)
- print(df.shape)
- # add class label
- df[len(df.columns)]=1
- #save the updated csv file
- df.to_csv(tempath+'temp2.csv', index=False)
- # create pateint specific folder
- folderpath = 'Generated siena db/Patient Inter Specific/'+seizure_type+'/'+localization+'/'+lateralization+'/'+'PN'+str(patientno)+'/'
- if not os.path.exists(folderpath):
- os.makedirs(folderpath)
- newpath= folderpath + 'Pre-Ictal' +'/'
- if not os.path.exists(newpath):
- os.makedirs(newpath)
- print(df.shape)
- # transpose the csv
- with open(tempath+'temp2.csv') as f, open(newpath + subfile +'_pre-ictal.csv', 'w') as fw:
- writer(fw, delimiter=',').writerows(zip(*reader(f, delimiter=',')))
- df=pd.read_csv(newpath + subfile +'_pre-ictal.csv', header=None)
- df.drop(columns=0, axis=1,inplace=True)
- print(df.shape)
- # Patient Non Specific
- newpath2= 'Generated siena db/Patient Non-Specific/Pre-Ictal/'
- if not os.path.exists(newpath2):
- os.makedirs(newpath2)
- df.to_csv(newpath + subfile +'_pre-ictal.csv', index=False, header=False)
- df.to_csv(newpath2+str(i+seizuren)+'.csv', index=False, header=False)
- # %% [markdown]
- # **PERI_ICTAL**
- # %%
- seizuren= 0
- for i in range(1,total_no_of_edfs):
- edfFile=excelData[1][i]
- patientno= excelData[0][i]
- subfile=excelData[1][i]
- seizure_type= excelData[4][i]
- localization=excelData[5][i]
- lateralization=excelData[6][i]
- # read Peri Ictal start and end rows
- PeriIctalS= int(excelData[27][i])
- PeriIctalE= int(excelData[28][i])
- print(seizure_type,localization,lateralization,PeriIctalS,PeriIctalE)
- # read edf file
- f=EdfReader(Edfpath+ edfFile+'.edf')
- n = f.signals_in_file
- signal_labels = f.getSignalLabels()
- print(signal_labels)
- data = zeros((n,f.getNSamples()[0]))
- data
- for k in arange(n):
- data[k, :] = f.readSignal(k)
- #store all data
- data_eeg = data
- #close the edf file
- f._close()
- del f
- print(data_eeg.shape)
- df = pd.DataFrame(data_eeg)
- # convert the edf to csv file
- df.to_csv(tempath+'temp1.csv', index=False)
- total_cols= len(df.columns)
- print(total_cols)
- #cut the data for peri-ictal
- cols=list(range(0,PeriIctalS))
- df.drop(columns=cols, axis=1,inplace=True)
- cols=list(range(PeriIctalE+1,total_cols))
- df.drop(columns=cols, axis=1,inplace=True)
- print(df.shape)
- # add class label
- df[len(df.columns)]=1
- #save the updated csv file
- df.to_csv(tempath+'temp2.csv', index=False)
- # create pateint specific folder
- folderpath = 'Generated siena db/Patient Inter Specific/'+seizure_type+'/'+localization+'/'+lateralization+'/'+'PN'+str(patientno)+'/'
- if not os.path.exists(folderpath):
- os.makedirs(folderpath)
- newpath= folderpath + 'Peri-Ictal' +'/'
- if not os.path.exists(newpath):
- os.makedirs(newpath)
- print(df.shape)
- # transpose the csv
- with open(tempath+'temp2.csv') as f, open(newpath + subfile +'_peri-ictal.csv', 'w') as fw:
- writer(fw, delimiter=',').writerows(zip(*reader(f, delimiter=',')))
- df=pd.read_csv(newpath + subfile +'_peri-ictal.csv', header=None)
- df.drop(columns=0, axis=1,inplace=True)
- print(df.shape)
- # Patient Non Specific
- newpath2= 'Generated siena db/Patient Non-Specific/Peri-Ictal/'
- if not os.path.exists(newpath2):
- os.makedirs(newpath2)
- df.to_csv(newpath + subfile +'_peri-ictal.csv', index=False, header=False)
- df.to_csv(newpath2+str(i+seizuren)+'.csv', index=False, header=False)
code_siena.ipynb at commit d66f64f, no license · at the source
Overview
- Research Center for Medical Image Analysis and Artificial Intelligence, Department of Medicine, Faculty of Medicine and Dentistry, Danube Private University, Krems, Austria
- Department of Artificial Intelligence and Data Science, Guru Gobind Singh Indraprastha University, New Delhi, India
- Expedia Group, Noida, India
Abstract
Electroencephalography (EEG) is widely used clinically and in research, including AI-driven applications for cognitive state analysis and neurological disorder detection, such as epilepsy. However, automated seizure detection faces challenges, including inconsistent windowing, timestamp misalignment, label-based signal segmentation, and unstructured large-scale EEG data—especially critical in event-driven settings. To address these, we introduce Meta-EEGs, a structured, domain-agnostic EEG representation for temporally labelled tasks. Meta-EEGs provide consistent windowing with precise time alignment, enable event-based segmentation based on annotations or class labels, and organise raw EEG recordings into a simpler, relatively reduced in volume format suitable for AI model input. They also support the creation and management of hierarchical EEG datasets, currently lacking in the field. As case studies, we applied Meta-EEGs to the CHB-MIT and Siena Scalp EEG Databases, generating structured datasets that are publicly available on Figshare and have been downloaded over 2000 times since 2022. The working code is accessible on GitHub.
Main features and applications: • Provides consistent window definition, timestamp alignment, signal segmentation, and standardised structuring for large-scale EEG studies. • Releases two fully annotated, reduced in volume datasets for automated seizure detection, supporting reproducible and generalisable analysis. • Enables AI model development for seizure detection, event classification, patient-specific and cross-patient analysis, and hierarchical EEG tasks without repeated initial preprocessing.
Reproduced under the paper's license (CC BY-NC), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 3 matches between paragraphs and lines of code.
misahub2023/META-EEG-CHBMIT-and-SIENA
d66f64fe4d6286272aae4122dc236bf60a01fe28, 28 August 2025Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
5 files
- code_chbmit.ipynb, Jupyter, 602 lines, 1 match
- code_siena.ipynb, Jupyter, 360 lines, 1 match
- data_preprocess_chbmit.p
y , Python, 66 lines, 1 match - data_preprocess_siena.py
, Python, 62 lines - README.md, Text, 107 lines
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 4 scripts, each with its path and the digest of its content;
- 3 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Datasets cited
- figshare:30000775, at figshare; found in the text, “Method details”
- zenodo:6061290, at Zenodo; found in the references
- zenodo:6062372, at Zenodo; found in the references
Data availability
The data is available on Figshare.
Reproduced under the paper's license (CC BY-NC), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 2, 28 September 2026
- Authors: added Palak Handa (0009-0001-4573-3967); removed Palak Handa
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, pages, dates, 4 authors, 4 keywords, 4 references.
Cite
This paper
Handa, P., Joshi, M., Gupta, E., & Woitek, R. (2026). Meta-EEGs: A structured approach for processing high-volume EEG data. MethodsX, 17, 104005. https://
BibTeX
@article{handa2026meta,
author = {Handa, Palak and Joshi, Manya and Gupta, Esha and Woitek, Ramona},
title = {{Meta-EEGs: A structured approach for processing high-volume EEG data}},
journal = {MethodsX},
year = {2026},
month = jun,
volume = {17},
pages = {104005},
publisher = {Elsevier},
issn = {2215-0161},
doi = {10.1016/
url = {https://
pmid = {42327638},
pmcid = {PMC13279890}
}
RIS
TY - JOUR
AU - Handa, Palak
AU - Joshi, Manya
AU - Gupta, Esha
AU - Woitek, Ramona
TI - Meta-EEGs: A structured approach for processing high-volume EEG data
T2 - MethodsX
J2 - MethodsX
PY - 2026
DA - 2026/
VL - 17
SP - 104005
SN - 2215-0161
PB - Elsevier
DO - 10.1016/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1016/
"type": "article-journal",
"title": "Meta-EEGs: A structured approach for processing high-volume EEG data",
"container-title": "MethodsX",
"author": [
{
"family": "Handa",
"given": "Palak"
},
{
"family": "Joshi",
"given": "Manya"
},
{
"family": "Gupta",
"given": "Esha"
},
{
"family": "Woitek",
"given": "Ramona"
}
],
"container-title-short":
"volume": "17",
"page": "104005",
"DOI": "10.1016/
"PMID": "42327638",
"PMCID": "PMC13279890",
"ISSN": "2215-0161",
"publisher": "Elsevier",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
11
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1007/s00234-026-04103-8 [code]
- Enhanced detection of subtle cortical abnormalities in focal epilepsy using 7 T MRI surface-based models and graph neural networks.Journal: NeuroradiologyIn common: pandas, NumPy, epilepsy, EEG
- [2] doi:10.1371/journal.pone.0352191 [code]
- Bayesian Uncertainty-aware Deep Learning with noisy labels: Tackling annotation ambiguity in EEG seizure detection.Journal: PloS oneIn common: pandas, NumPy, epilepsy, EEG
- [3] doi:10.1038/s41598-026-43151-1 [code]
- Stabilizing fractional dynamical networks suppresses epileptic seizures.Journal: Scientific reportsIn common: pandas, NumPy, epilepsy, EEG
- [4] doi:10.1088/1741-2552/ae4d8c [code]
- Interpretable EEG biomarkers for neurological disease models in mice using bag-of-waves classifiers.Journal: Journal of neural engineeringIn common: pandas, NumPy, epilepsy, EEG
- [5] doi:10.1002/ana.78203 [code]
- AI-Driven Mapping of Seizure Spread Patterns.Journal: Annals of neurologyIn common: pandas, NumPy, epilepsy, EEG
- [6] doi:10.1038/s41593-026-02258-4 [code]
- Laminar organization of cellular microcircuits modulating human interictal epileptiform discharges.Journal: Nature neuroscienceIn common: pandas, NumPy, epilepsy, EEG
- [7] doi:10.1038/s41598-026-44063-w [code]
- Neuronal silence as a predictive biomarker and target for epileptic seizures suppression.Journal: Scientific reportsIn common: pandas, NumPy, epilepsy, EEG
- [8] doi:10.1093/braincomms/fcag120 [code]
- The heartbeat evoked potential and the prediction of functional seizure semiology.Journal: Brain communicationsIn common: pandas, NumPy, epilepsy, EEG
- [9] doi:10.1038/s41467-026-70287-5 [code]
- Cortical-limbic circuit dynamics of approach-avoidance conflict in humans.Journal: Nature communicationsIn common: pandas, NumPy, epilepsy, EEG
- [10] doi:10.1016/j.isci.2026.117446 [code]
- Volume-inflation registration (INFREG) for morphometric analysis of human focal cortical dysplasia type II.Journal: iScienceIn common: pandas, NumPy, epilepsy
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 4 scripts, and 3 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:e0c917c825fdf6b0…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
