OSCR

Meta-EEGs: A structured approach for processing high-volume EEG data.

Code ↔ Paper

3 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 3 matches
  1. [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. [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. [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

  1. # %%
  2. pip install pyEDFlib
  3. # %%
  4. # libraries installation
  5. from pyedflib import EdfReader
  6. from numpy import zeros, arange
  7. import csv
  8. import pandas as pd
  9. from csv import reader, writer
  10. import os
  11. # %%
  12. #paths defines
  13. Edfpath='edf_files/'
  14. tempath='temp/'
  15. # read the excel file made for patient data
  16. excelData=pd.read_csv('Siena DB timestamp.csv', header=None)
  17. total_no_of_edfs=50
  18. excelData
  19. # %% [markdown]
  20. # **ICTAL**
  21. # %%
  22. seizuren= 0
  23. for i in range(1,total_no_of_edfs):
  24. edfFile=excelData[1][i]
  25. patientno= excelData[0][i]
  26. subfile=excelData[1][i]
  27. seizure_type= excelData[4][i]
  28. localization=excelData[5][i]
  29. lateralization=excelData[6][i]
  30. # read Ictal start and end rows
  31. IctalS= int(excelData[15][i])
  32. IctalE= int(excelData[16][i])
  33. print(seizure_type,localization,lateralization,IctalS,IctalE)
  34. # read edf file
  35. f=EdfReader(Edfpath+ edfFile+'.edf')
  36. n = f.signals_in_file
  37. signal_labels = f.getSignalLabels()
  38. print(signal_labels)
  39. data = zeros((n,f.getNSamples()[0]))
  40. data
  41. for k in arange(n):
  42. data[k, :] = f.readSignal(k)
  43. #store all data
  44. data_eeg = data
  45. #close the edf file
  46. f._close()
  47. del f
  48. print(data_eeg.shape)
  49. df = pd.DataFrame(data_eeg)
  50. # convert the edf to csv file
  51. df.to_csv(tempath+'temp1.csv', index=False)
  52. total_cols= len(df.columns)
  53. print(total_cols)
  54. #cut the data for ictal
  55. cols=list(range(0,IctalS))
  56. df.drop(columns=cols, axis=1,inplace=True)
  57. cols=list(range(IctalE+1,total_cols))
  58. df.drop(columns=cols, axis=1,inplace=True)
  59. print(df.shape)
  60. # add class label
  61. df[len(df.columns)]=1
  62. #save the updated csv file
  63. df.to_csv(tempath+'temp2.csv', index=False)
  64. # create pateint specific folder
  65. folderpath = 'Generated siena db/Patient Inter Specific/'+seizure_type+'/'+localization+'/'+lateralization+'/'+'PN'+str(patientno)+'/'
  66. if not os.path.exists(folderpath):
  67. os.makedirs(folderpath)
  68. newpath= folderpath + 'Ictal' +'/'
  69. if not os.path.exists(newpath):
  70. os.makedirs(newpath)
  71. print(df.shape)
  72. # transpose the csv
  73. with open(tempath+'temp2.csv') as f, open(newpath + subfile +'_ictal.csv', 'w') as fw:
  74. writer(fw, delimiter=',').writerows(zip(*reader(f, delimiter=',')))
  75. df=pd.read_csv(newpath + subfile +'_ictal.csv', header=None)
  76. df.drop(columns=0, axis=1,inplace=True)
  77. print(df.shape)
  78. # Patient Non Specific
  79. newpath2= 'Generated siena db/Patient Non-Specific/Ictal/'
  80. if not os.path.exists(newpath2):
  81. os.makedirs(newpath2)
  82. df.to_csv(newpath + subfile +'_ictal.csv', index=False, header=False)
  83. df.to_csv(newpath2+str(i+seizuren)+'.csv', index=False, header=False)
  84. # %% [markdown]
  85. # **POST-ICTAL**
  86. # %%
  87. seizuren= 0
  88. for i in range(1,total_no_of_edfs):
  89. edfFile=excelData[1][i]
  90. patientno= excelData[0][i]
  91. subfile=excelData[1][i]
  92. seizure_type= excelData[4][i]
  93. localization=excelData[5][i]
  94. lateralization=excelData[6][i]
  95. # read Post Ictal start and end rows
  96. PostIctalS= int(excelData[19][i])
  97. PostIctalE= int(excelData[20][i])
  98. print(seizure_type,localization,lateralization,PostIctalS,PostIctalE)
  99. # read edf file
  100. f=EdfReader(Edfpath+ edfFile+'.edf')
  101. n = f.signals_in_file
  102. signal_labels = f.getSignalLabels()
  103. print(signal_labels)
  104. data = zeros((n,f.getNSamples()[0]))
  105. data
  106. for k in arange(n):
  107. data[k, :] = f.readSignal(k)
  108. #store all data
  109. data_eeg = data
  110. #close the edf file
  111. f._close()
  112. del f
  113. print(data_eeg.shape)
  114. df = pd.DataFrame(data_eeg)
  115. # convert the edf to csv file
  116. df.to_csv(tempath+'temp1.csv', index=False)
  117. total_cols= len(df.columns)
  118. print(total_cols)
  119. #cut the data for post-ictal
  120. cols=list(range(0,PostIctalS))
  121. df.drop(columns=cols, axis=1,inplace=True)
  122. cols=list(range(PostIctalE+1,total_cols))
  123. df.drop(columns=cols, axis=1,inplace=True)
  124. print(df.shape)
  125. # add class label
  126. df[len(df.columns)]=1
  127. #save the updated csv file
  128. df.to_csv(tempath+'temp2.csv', index=False)
  129. # create pateint specific folder
  130. folderpath = 'Generated siena db/Patient Inter Specific/'+seizure_type+'/'+localization+'/'+lateralization+'/'+'PN'+str(patientno)+'/'
  131. if not os.path.exists(folderpath):
  132. os.makedirs(folderpath)
  133. newpath= folderpath + 'Post-Ictal' +'/'
  134. if not os.path.exists(newpath):
  135. os.makedirs(newpath)
  136. print(df.shape)
  137. # transpose the csv
  138. with open(tempath+'temp2.csv') as f, open(newpath + subfile +'_post-ictal.csv', 'w') as fw:
  139. writer(fw, delimiter=',').writerows(zip(*reader(f, delimiter=',')))
  140. df=pd.read_csv(newpath + subfile +'_post-ictal.csv', header=None)
  141. df.drop(columns=0, axis=1,inplace=True)
  142. print(df.shape)
  143. # Patient Non Specific
  144. newpath2= 'Generated siena db/Patient Non-Specific/Post-Ictal/'
  145. if not os.path.exists(newpath2):
  146. os.makedirs(newpath2)
  147. df.to_csv(newpath + subfile +'_post-ictal.csv', index=False, header=False)
  148. df.to_csv(newpath2+str(i+seizuren)+'.csv', index=False, header=False)
  149. # %% [markdown]
  150. # **PRE_ICTAL**
  151. # %%
  152. seizuren= 0
  153. for i in range(1,total_no_of_edfs):
  154. edfFile=excelData[1][i]
  155. patientno= excelData[0][i]
  156. subfile=excelData[1][i]
  157. seizure_type= excelData[4][i]
  158. localization=excelData[5][i]
  159. lateralization=excelData[6][i]
  160. # read Pre Ictal start and end rows
  161. PreIctalS= int(excelData[23][i])
  162. PreIctalE= int(excelData[24][i])
  163. print(seizure_type,localization,lateralization,PreIctalS,PreIctalE)
  164. # read edf file
  165. f=EdfReader(Edfpath+ edfFile+'.edf')
  166. n = f.signals_in_file
  167. signal_labels = f.getSignalLabels()
  168. print(signal_labels)
  169. data = zeros((n,f.getNSamples()[0]))
  170. data
  171. for k in arange(n):
  172. data[k, :] = f.readSignal(k)
  173. #store all data
  174. data_eeg = data
  175. #close the edf file
  176. f._close()
  177. del f
  178. print(data_eeg.shape)
  179. df = pd.DataFrame(data_eeg)
  180. # convert the edf to csv file
  181. df.to_csv(tempath+'temp1.csv', index=False)
  182. total_cols= len(df.columns)
  183. print(total_cols)
  184. #cut the data for pre-ictal
  185. cols=list(range(0,PreIctalS))
  186. df.drop(columns=cols, axis=1,inplace=True)
  187. cols=list(range(PreIctalE+1,total_cols))
  188. df.drop(columns=cols, axis=1,inplace=True)
  189. print(df.shape)
  190. # add class label
  191. df[len(df.columns)]=1
  192. #save the updated csv file
  193. df.to_csv(tempath+'temp2.csv', index=False)
  194. # create pateint specific folder
  195. folderpath = 'Generated siena db/Patient Inter Specific/'+seizure_type+'/'+localization+'/'+lateralization+'/'+'PN'+str(patientno)+'/'
  196. if not os.path.exists(folderpath):
  197. os.makedirs(folderpath)
  198. newpath= folderpath + 'Pre-Ictal' +'/'
  199. if not os.path.exists(newpath):
  200. os.makedirs(newpath)
  201. print(df.shape)
  202. # transpose the csv
  203. with open(tempath+'temp2.csv') as f, open(newpath + subfile +'_pre-ictal.csv', 'w') as fw:
  204. writer(fw, delimiter=',').writerows(zip(*reader(f, delimiter=',')))
  205. df=pd.read_csv(newpath + subfile +'_pre-ictal.csv', header=None)
  206. df.drop(columns=0, axis=1,inplace=True)
  207. print(df.shape)
  208. # Patient Non Specific
  209. newpath2= 'Generated siena db/Patient Non-Specific/Pre-Ictal/'
  210. if not os.path.exists(newpath2):
  211. os.makedirs(newpath2)
  212. df.to_csv(newpath + subfile +'_pre-ictal.csv', index=False, header=False)
  213. df.to_csv(newpath2+str(i+seizuren)+'.csv', index=False, header=False)
  214. # %% [markdown]
  215. # **PERI_ICTAL**
  216. # %%
  217. seizuren= 0
  218. for i in range(1,total_no_of_edfs):
  219. edfFile=excelData[1][i]
  220. patientno= excelData[0][i]
  221. subfile=excelData[1][i]
  222. seizure_type= excelData[4][i]
  223. localization=excelData[5][i]
  224. lateralization=excelData[6][i]
  225. # read Peri Ictal start and end rows
  226. PeriIctalS= int(excelData[27][i])
  227. PeriIctalE= int(excelData[28][i])
  228. print(seizure_type,localization,lateralization,PeriIctalS,PeriIctalE)
  229. # read edf file
  230. f=EdfReader(Edfpath+ edfFile+'.edf')
  231. n = f.signals_in_file
  232. signal_labels = f.getSignalLabels()
  233. print(signal_labels)
  234. data = zeros((n,f.getNSamples()[0]))
  235. data
  236. for k in arange(n):
  237. data[k, :] = f.readSignal(k)
  238. #store all data
  239. data_eeg = data
  240. #close the edf file
  241. f._close()
  242. del f
  243. print(data_eeg.shape)
  244. df = pd.DataFrame(data_eeg)
  245. # convert the edf to csv file
  246. df.to_csv(tempath+'temp1.csv', index=False)
  247. total_cols= len(df.columns)
  248. print(total_cols)
  249. #cut the data for peri-ictal
  250. cols=list(range(0,PeriIctalS))
  251. df.drop(columns=cols, axis=1,inplace=True)
  252. cols=list(range(PeriIctalE+1,total_cols))
  253. df.drop(columns=cols, axis=1,inplace=True)
  254. print(df.shape)
  255. # add class label
  256. df[len(df.columns)]=1
  257. #save the updated csv file
  258. df.to_csv(tempath+'temp2.csv', index=False)
  259. # create pateint specific folder
  260. folderpath = 'Generated siena db/Patient Inter Specific/'+seizure_type+'/'+localization+'/'+lateralization+'/'+'PN'+str(patientno)+'/'
  261. if not os.path.exists(folderpath):
  262. os.makedirs(folderpath)
  263. newpath= folderpath + 'Peri-Ictal' +'/'
  264. if not os.path.exists(newpath):
  265. os.makedirs(newpath)
  266. print(df.shape)
  267. # transpose the csv
  268. with open(tempath+'temp2.csv') as f, open(newpath + subfile +'_peri-ictal.csv', 'w') as fw:
  269. writer(fw, delimiter=',').writerows(zip(*reader(f, delimiter=',')))
  270. df=pd.read_csv(newpath + subfile +'_peri-ictal.csv', header=None)
  271. df.drop(columns=0, axis=1,inplace=True)
  272. print(df.shape)
  273. # Patient Non Specific
  274. newpath2= 'Generated siena db/Patient Non-Specific/Peri-Ictal/'
  275. if not os.path.exists(newpath2):
  276. os.makedirs(newpath2)
  277. df.to_csv(newpath + subfile +'_peri-ictal.csv', index=False, header=False)
  278. df.to_csv(newpath2+str(i+seizuren)+'.csv', index=False, header=False)

code_siena.ipynb at commit d66f64f, no license · at the source

Overview

Authors: Palak Handa1, Manya Joshi2, Esha Gupta3, Ramona Woitek1
ORCID iDs: Palak Handa
  1. Research Center for Medical Image Analysis and Artificial Intelligence, Department of Medicine, Faculty of Medicine and Dentistry, Danube Private University, Krems, Austria
  2. Department of Artificial Intelligence and Data Science, Guru Gobind Singh Indraprastha University, New Delhi, India
  3. Expedia Group, Noida, India
Journal: MethodsX, volume 17, article 104005
Dates: received 27 February 2026; accepted 10 June 2026; published online 11 June 2026
Type: Research article · Language: English
License: CC BY-NC
Identifiers: DOI 10.1016/j.mex.2026.104005 · PMID 42327638 · PMCID PMC13279890 · OpenAlex W7164299352
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: EEG (modality), epilepsy (population)
Methods: Connectivity, Smoothing, state filtering, decompositions, Machine learning, Physiology & signal measures
Keywords: AI-EEG, Automated seizure detection, Automated epilepsy diagnosis, Meta-EEGs
Journal subjects: Neuroscience
Topic: EEG and Brain-Computer Interfaces (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Citations: not cited yet (Europe PMC); 20 references in the paper

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

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: d66f64fe4d6286272aae4122dc236bf60a01fe28, 28 August 2025
Languages: Jupyter (2), Python (2)
Size: 12 files, 4 scripts
Software Heritage: not archived
Found in: the text, “Method details”
Holds: README, 2 notebooks
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (2 files), pandas (2 files)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
5 files

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

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://doi.org/10.1016/j.mex.2026.104005

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/j.mex.2026.104005},
url = {https://doi.org/10.1016/j.mex.2026.104005},
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/06/11
VL - 17
SP - 104005
SN - 2215-0161
PB - Elsevier
DO - 10.1016/j.mex.2026.104005
UR - https://doi.org/10.1016/j.mex.2026.104005
LA - en
ER -

CSL-JSON

{
"id": "10.1016/j.mex.2026.104005",
"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": "MethodsX",
"volume": "17",
"page": "104005",
"DOI": "10.1016/j.mex.2026.104005",
"PMID": "42327638",
"PMCID": "PMC13279890",
"ISSN": "2215-0161",
"publisher": "Elsevier",
"URL": "https://doi.org/10.1016/j.mex.2026.104005",
"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: Neuroradiology
In 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 one
In common: pandas, NumPy, epilepsy, EEG
[3] doi:10.1038/s41598-026-43151-1 [code]
Stabilizing fractional dynamical networks suppresses epileptic seizures.
Journal: Scientific reports
In 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 engineering
In common: pandas, NumPy, epilepsy, EEG
[5] doi:10.1002/ana.78203 [code]
AI-Driven Mapping of Seizure Spread Patterns.
Journal: Annals of neurology
In 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 neuroscience
In 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 reports
In 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 communications
In 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 communications
In 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: iScience
In 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.

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.