{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":59093,"databundleVersionId":7469972,"sourceType":"competition"}],"dockerImageVersionId":30635,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# Background\n\n","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2024-01-11T11:08:50.524270Z","iopub.execute_input":"2024-01-11T11:08:50.524678Z","iopub.status.idle":"2024-01-11T11:09:18.343462Z","shell.execute_reply.started":"2024-01-11T11:08:50.524647Z","shell.execute_reply":"2024-01-11T11:09:18.341791Z"}}},{"cell_type":"markdown","source":"## What is EEG? \n*See ref 1 & 2*\n\nElectroencephalography (EEG) uses non-invasive electrodes placed on the scalp and measures the current produced during excitation of groups of neurons. The weak electrical current that these groups of neurons produce is massively amplified, resulting in an EEG recording.\n\nThe waves that we see in an EEG recording are sinusoidal in nature, and they are normally measured from peak to trough. There are four main classifications for EEG brain wave patterns: \n\n1. Beta waves - more than 13Hz\n2. Alpha waves - 8-13Hz\n3. Theta waves - 4-8Hz\n4. Delta waves - 0.5-4Hz\n\nDepending on the state of the subject one waveform will be more dominant thatn the rest (ex: beta waves dominate during wakefulness, delta waves dominate during non-REM deep sleep). \n","metadata":{}},{"cell_type":"markdown","source":"## Harmful EEG Patterns\n\n*See ref 3*\n\nNote: All EEG patterns will not be perfectly rhythmic and will have some background noise. The waves are determined by the predominant pattern. \n\nArrythmic or polymorphic patterns mean that there is pathology there - just not associated with seizures.\n\n### Helpful measurement terms \n\n<u>**Voltage**</u>\n\n- Absolute voltage (A) is measured peak to trough\n- Relative voltage (A/A<sub>b</sub>) is the voltage of discharge amplitude (A) compared with the background amplitude (A<sub>b</sub>)\n\n<u>**Phase**</u>\n\n- Area under the pattern curve on one side of the baseline (midline of the reading)\n\n### Patterns associated with seizures\n\nGeneral Absence Seizures show a cortical-wide change in brain wave amplitude to ~3Hz continuously for at least 5 minutes until the seizure ends.\n\nFor any of these patterns to be a bona fide pattern, they need to occur at least 6 times one after another.\n\n<u>__Periodic discharges__</u>\n\nPeriodic discharges with intervals between them\n\nFeatures: \n- Phase (area under curve on one side of the baseline): ≤0.5s regardless of phases or >0.5s and have ≤3 phases\n\n**Generalized Periodic Discharges (GPD)**: Across both hemispheres and electrodes, there is a time-locked pattern. Pathological GPDs often have long intervals between discharges. \n\n**Lateralised Periodic Discharges (LPD)**: Periodic discharges in one hemisphere of the brain. LPDs are associated with seizures but can also occur without seizures.\n\nNote: Propagation from one side of the brain to the other would take the form of a time-locked discharge on both sides, not to be confused with LPDs (read below) that can be asynchronous.\n \n<u>__Rhythmic Delta Activity__</u>\n\nDischarges with no intervals. If not rhythmic nor periodic, these can be classified as arrythmic, irregular or polymorphic\n\n**Generalised rhythmic delta activity (GRDA)**: Periodic discharges across all electrodes.\n\n**Lateralised rhythmic delta activity (LRDA)**: One sided rhythmic delta waves. Very high association with seizures.\n\n<u>__Highly epileptiform bursts__</u>: \n\nBursts are patterns that are longer than 1 second (longer than PDs) and have more than 4 phases (PDs longer than 1 second must have less than 3 phases).\n\nWithin at least 50% of the bursts, there are there are 2 or more epileptiform discharges.\n\n<u>**Spike and Wave (rare)**</u>\n\nTight spikes and a longer wave afterwards, with no intervals\n\n<u>**Sporadic epileptiform discharges**</u>\n\nNon-rhythmic and non-periodic epileptiform discharges that are associated with epilepsy, occurring before or after seizures.\n\n### Features that make these patterns more \"seizure-like\"\n\nAssociated with more severe seizures and poorer patient outcomes.\n\n<u>__Plus modifiers__</u>\n\nFeatures affecting *amplitude*\n\n- **+S** - means that there are frequent and/or sharp spikes superimposed (timelocked) onto a delta wave rhythm ONLY. Spikes dissipate once the RDA is over.\n- **+F** - Fast frequency (theta or faster) superimposed (timelocked) onto RDAs and PDs. The fast frequencies dissipate once the RDA or PD is over. \n- **+R** - superimposed rhythmic delta activity (or a similar looking pattern) on a PD ONLY. Basically when PD and RDA occur at the same time.\n\n<u>__Evolving or fluctuating modifiers__</u>\n\nFeatures affecting *frequency, location, and/or morphology*. If absent, the pattern is static.\n\n**Evolving**\n\nEvolving patterns must have 2 changes in at least one of the following features:\n- Frequency has ≥2 consecutive increases or decreases of more than 0.5 seconds (2--> 2.5 --> 3.5)\n- Morphology has ≥2 consecutive changes to a novel morphology (ex: smooth to bumpy to spikey)\n- The changes spread into or out of ≥2 different electrode locations (ex: same pattern moves or spreads from the frontal to parietal electrodes, or from one hemishpere to another).\n\nFor a seizure, pattern must be evolving for ≥ 10s, and reach > 4Hz. Otherwise class as 'other'. Note: you can have an evolving RDA without a seizure <10s, <4Hz. \n\nOn Spectograms, the changes in frequency look like diagonals.\n\n**Fluctuating** \n\nIf not evolving, fluctuating must have at least 3 changes in one of the following characteristics: \n- ≥ 3 Frequency changes by ≥0.5/s (4Hz--> 2Hz--> 4Hz--> 2Hz)\n- ≥ 3 Morphology changes\n- ≥ 3 location changes \n\n<u>**Sharpness**</u>\n\nSharp \n- 70-200ms\n\nSpiky\n- <70ms \n\nWhere the predominant phase has the greatest amplitude.\n\n\n\n\n","metadata":{}},{"cell_type":"markdown","source":"## References\n\n1. Teplan, M. (2002). Fundamentals of EEG measurement. Measurement science review, 2(2), 1-11.\n2. Hirsch, L. J., LaRoche, S. M., Gaspard, N., Gerard, E., Svoronos, A., Herman, S. T., ... & Drislane, F. W. (2013). American clinical neurophysiology society’s standardized critical care EEG terminology: 2012 version. Journal of clinical neurophysiology, 30(1), 1-27.\n3. Britton JW, Frey LC, Hopp JLet al., authors; St. Louis EK, Frey LC, editors. Electroencephalography (EEG): An Introductory Text and Atlas of Normal and Abnormal Findings in Adults, Children, and Infants [Internet]. Chicago: American Epilepsy Society; 2016. EEG in the Epilepsies. Available from: https://www.ncbi.nlm.nih.gov/books/NBK390347/","metadata":{}},{"cell_type":"markdown","source":"","metadata":{}}]}