Clinical background

Deep intracerebral recordings
Stereoelectroencephalography (SEEG) is an invasive procedure in which we record intracerebral activity in patients via deep electrodes. This technique, widely used in the diagnosis or treatment of neurological conditions such as epilepsy or Parkinson's disease, combines the advantages of high spatial and temporal accuracy.

These two images are made using visbrain (python).

Drug resistant epilepsy
Patients included in these studies suffer from a drug-resistant form of epilepsy. They have generally been clinically followed for several years but the non-invasive investigations have not led to the localization of the epileptogenic zone. The severity of the disorder is such that doctors must consider a surgical procedure aiming the resection of this area. Surgery can only be performed under certain conditions: the area must remain very localized and have to be non-functional or associated with processes that do not affect the patient's quality of life if it is removed.

Nature of assumptions and measures
The implantation of the electrodes is guided by clinical hypotheses only and the research hypotheses do not influence their location. The cerebral signal of patients is recorded 24/7 for almost two weeks. The patient is thus registered during phases of activity, rest, sleep... Neurologists and researchers analyze the signal in order to find elements of answer on the origin of epilepsy for some and how the brain works for others. Nurses and doctors constantly monitor the patient to avoid injury in the event of a crisis.

Data processing
The platinum-irridium electrodes are composed of two types of channels: macroelectrodes that can capture the signal of thousands of neurons at a frequency of 512Hz to 2KHz and microelectrodes that can record the signal of single neurons, also called single units, at 30KHz. These last recordings correspond to a tenth of a millisecond of time precision and to a micrometer of spatial accuracy. 

The size of the data is colossal and their complexity is immense. Their analysis requires the use of computer and mathematical tools, which we develop in the laboratory. These help us to answer clinical and fundamental questions.


The tools presented below could be developed thanks to a collaborative work between researchers, engineers, doctors, students... Most of those tools are still under developpement. Python is the language mainly used.

Automatic detection & visualization of pathological rapid brain oscillations

Developped by: GARDY Ludovic
With the help of:
CUROT Jonathan (acquisition, processing, interpretation)
Fundings: Federal University of Toulouse & Région Occitanie
Direction: CerCo - CNRS, ENAC - BARBEAU Emmanuel, HURTER Christophe
Year: 2020

This tool allows the automatic detection and visualization of pathological brain signals in epilepsy. Targeted high-frequency oscillations are very difficult to detect and sort through the enormous amount of non-pathological signals and electrical, neural, or motion artifacts. The 3 panels on the left show the same 400 ms signal with the raw signal at the top, the filtered signal between 200Hz and 600Hz in the middle, and the time-frequency transformation of the signal (continuous wavelets) at the bottom. The right panel shows the normalized spectral density as well as the results of different measurements to characterize pathological oscillations.

Basic interactions allow the user to navigate in the signal spatially and temporally, to zoom in/out...

More advanced interactions allow to filter the signal in one or several frequency bands, to normalize the signal, to modify the label of the detected event (pathological/non-pathological/artefact...) in the database, to identify the beginning and the end of an event in the signal...

A Deep Learning algorithm is also connected to this interface and allows to detect, index and visualize pathological events in raw SEEG recordings.

Automatic detection & real time display of epileptic spikes

Developped by: GARDY Ludovic
FundingsFederal University of Toulouse & Région Occitanie
Direction: CerCo - CNRS, ENAC - BARBEAU Emmanuel, HURTER Christophe
Year: 2019

This tool allows the automatic detection andreal-time visualization of epileptic spikes, markers of the epileptic network. The detection of these pathological epileptic spikes is based on density estimation by kernel. The temporal signal is thus transformed into an image so that a two-dimensional kernel can be applied and the density can be evaluated. In a paper we proposed in 2019, accepted in 2020 (Gardy et al., 2020), we showed that the detection of epileptic spikes by density estimation was an efficient method and relatively resistant to background noise in the signal.

On the interface, the user has many possibilities of interaction, filtering, kernel creation... The detected pathological events are automatically recorded, the interface being more of a control and parameterization tool.

Medical Imaging Visualization

Developed by : GARDY Ludovic
Fundings: Université Fédérale Toulouse Midi-Pyrénées & Région Occitanie
Direction: CerCo, CNRS, ENAC -  BARBEAU Emmanuel, HURTER Christophe
Year: 2018
GUI: Tkinter

This is a relatively simple tool for visualizing structural imagery snapshots in different planes. Options allow to interact with the images at a basic level: rotations, zoom, displacement, coloring...

Currently available:

  • Display and navigation in MRI T1, T2, FLAIR, CT scan volumes...
  • Supported formats: DICOM and NIFTI
  • Visualization in the 3 sectional planes: axial, coronal, sagittal.
  • Access to the semiology via the patient video corresponding to the recording in EEG and SEEG.

Planned improvements:

  • Treatment of functional imaging.
  • Normalization and superimposition of MRI and CT images to facilitate the localization of the intracerebral electrodes in brain structures.
  • Interaction with the visualization of the EEG signal.

EEG signal visualization & interaction

Developed by: GARDY Ludovic
Fundings and direction: CerCo, CNRS - REDDY Leila, BARBEAU Emmanuel
Year: 2018
GUI: Tkinter

The purpose of this tool is to visualize the intracerebral signal of the macro or micro electrodes. A particular thing about this tool is that it allows, in addition to the cerebral signal, to visualize events such as the appearance of stimuli presented to the patient. The meaning of these stimuli also appears to the user, for example, in the image below the blue and red vertical lines represent 2 different conditions in a task of visual perception and mental imagery. Dashed lines represent sub-conditions.

Interactions allow the user to navigate the signal, to zoom in / out, to choose the electrode he wants to visualize... All without typing a line of code thanks to the graphic window developed to facilitate the use, mainly the interaction.

Field potentials visualization & interaction

Developed by: GARDY Ludovic
With the help of: DEUDON Martin
Fundings and direction: CerCo, CNRS - REDDY Leila, BARBEAU Emmanuel
Year: 2018
GUI: Tkinter

This tool is intended to process and analyze the signal in order to interpret the processes in progress when the patient is subjected to a cognitive task. In the example presented here as in the one seen above, the task was composed of two conditions. A relatively large panel of operations can be implemented from this window for signal analysis. I will present here some possibilities.

  • 1. Visualization of ERPs and traces (epochs)

    - Visualization of the ERPs with a more or less large time scale.
    - Two conditions, from which the two curves?
    - Ability to graphically add unique events (epochs) in addition to the average signal (ERP).
    - Ability to navigate through the channels and to interact with the graph.
  • 2. Dissimilarity matrices (RDM) Representational Similarity Analysis (RSA)

    - Correlation matrices between different stimuli (R - 1 = dissimilarity).
    - Ability to navigate through the channels and to interact with the graph.
    - Calculation of global correlation matrices taking into account several channels, for example belonging to the same brain area.
    - Representational analysis comparing matrices of dissimilarities from several brain regions of interest.
    • 3. Multi Variate Pattern Analysis (MVPA)

      - Supervised machine learning algorithms
      - Classification of complex elements with more than 100 dimensions composed with the multi-channel cerebral signal.
      - Pattern recognition.
      - Temporal generalization.
      - Weight of features.
      - Options : Principal Component Analysis (PCA), Recursive Feature Elimination (RFE), mean pattern removal, random chance level...

    Signal neuronal visualization

    Developed by: GARDY Ludovic & DEUDON Martin
    With the help of: DESPOUY Elodie
    Fundings and direction: TMBI, CerCo, CNRS - THORPE Simon, BARBEAU Emmanuel
    Year: 2017
    GUI: Tkinter

    This software has been specially developed for the study of micro electrodes, ie the single units signal. Before reaching the stage of visualizing the spiking activity of the neurons, several steps of cleaning, filtering and extracting the data are necessary. Artifact rejection and micro signal visualization was done here using MicMac software (matlab). Spike sorting was done with Spiking Circus software (matlab & python). Only after this, the data could be imported into the software.

    • Visualization of the list of neurons detected in spike sorting, according to their reference electrode.
    • Choosing a particular neuron.
    • Visualization of individual spikes (raster plot) according to the presentation of a stimulus (y-axis) and time (x-axis). The dotted red line represents the moment of appearance of the stimulus.
    • Visualization of the shape and amplitude of the neuronal signal captured by the tetrode.
    • Calculation and visualization of the number of spikes according to the number of presentations of a stimulus.
    • Statistical calculations mainly descriptive.