Meta-EEGs: A structured approach for processing high-volume EEG data.
One block of code here has a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 3 matches
- [1] § Method details › Meta-EEG of Siena Scalp EEG Database v1.0.0 ↔ code_siena.ipynb, lines 107 to 190 · score 0.58 · Siena DB, post ictal, lateralisation, localization, subfile, row · Report a mismatch
- [2] § Method details › Meta-EEG of CHB-MIT Scalp EEG Database v1.0.0.0 ↔ data_preprocess_chbmit.py, lines 11 to 27 · score 0.51 · CHB MIT DB, timestamp.csv, row · block
oscr:b:HC2ANQZ3NCWX1-K· Report a mismatch - [3] § Method details › Meta-EEG of CHB-MIT Scalp EEG Database v1.0.0.0 ↔ code_chbmit.ipynb, lines 13 to 26 · score 0.51 · CHB MIT DB, timestamp.csv, patients · Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: 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.1016/j.mex.2025.103574 [code]
- MLSPred-bench: Transforming electroencephalography (EEG) datasets into machine learning-ready epileptic seizure prediction benchmarks.Journal: MethodsXIn common: pandas, NumPy, epilepsy, EEG, 1 reference
- [2] doi:10.1088/1741-2552/ade402 [code]
- Annotating neurophysiologic data at scale with optimized human input.Journal: Journal of neural engineeringIn common: pandas, NumPy, epilepsy, EEG, 1 reference
- [3] doi:10.1111/epi.18113 [code]
- SzCORE: Seizure Community Open-Source Research Evaluation framework for the validation of electroencephalography-b
ased automated seizure detection algorithms. Journal: EpilepsiaIn common: pandas, NumPy, epilepsy, EEG, 1 reference - [4] doi:10.3389/fnins.2023.1184990 [code]
- Utilizing risk-controlling prediction calibration to reduce false alarm rates in epileptic seizure prediction.Journal: Frontiers in neuroscienceIn common: pandas, NumPy, epilepsy, EEG, 1 reference
- [5] doi:10.3389/fnins.2024.1472747 [code]
- Using Long Short-Term Memory (LSTM) recurrent neural networks to classify unprocessed EEG for seizure prediction.Journal: Frontiers in neuroscienceIn common: NumPy, epilepsy, EEG, 1 reference
- [6] doi:10.3390/s26030863
- Explainable AI-Enhanced Ensemble Protocol Using Gradient-Boosted Models for Zero-False-Alarm Seizure Detection from EEG.Journal: Sensors (Basel, Switzerland)In common: epilepsy, EEG, 1 reference
- [7] doi:10.3390/brainsci15080842
- Automated Detection of Epileptic Seizures in EEG Signals via Micro-Capsule Networks.Journal: Brain sciencesIn common: epilepsy, EEG, 1 reference
- [8] doi:10.1186/s12962-024-00568-7 [code]
- Economic aspects of prolonged home video-EEG monitoring: a simulation study.Journal: Cost effectiveness and resource allocation : C/EIn common: epilepsy, EEG, 1 reference
- [9] doi:10.1038/s41598-024-60996-6 [code]
- Diagnostic biomarker discovery from brain EEG data using LSTM, reservoir-SNN, and NeuCube methods in a pilot study comparing epilepsy and migraine.Journal: Scientific reportsIn common: epilepsy, EEG, 1 reference
- [10] doi:10.3389/fphys.2023.1248899
- PreEpiSeizures: description and outcomes of physiological data acquisition using wearable devices during video-EEG monitoring in people with epilepsy.Journal: Frontiers in physiologyIn common: epilepsy, EEG, 1 reference
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:57bee32c207074f6…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1016/j.mex.2026.104005)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1016/j.mex.2026.104005.svg
:target: https://openscicode.org/badge/doi/10.1016/j.mex.2026.104005
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1016/j.mex.2026.104005"><img src="https://openscicode.org/badge/doi/10.1016/j.mex.2026.104005.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
