Using an Adaptive Thresholding Algorithm to Detect CA1 Hippocampal Sharp Wave Ripples. Jay Patel. Michigan State University

Similar documents
Supplementary materials

STANDARD SCORES AND THE NORMAL DISTRIBUTION

1. What are the differences and similarities among transverse, longitudinal, and surface waves?

Similarly to elastic waves, sound and other propagated waves are graphically shown by the graph:

Chapter 11 Waves. Waves transport energy without transporting matter. The intensity is the average power per unit area. It is measured in W/m 2.

Nortek Technical Note No.: TN-021. Chesapeake Bay AWAC Evaluation

Lab 1. Adiabatic and reversible compression of a gas

PUV Wave Directional Spectra How PUV Wave Analysis Works

5.1 Introduction. Learning Objectives

Electromyographic (EMG) Decomposition. Tutorial. Hamid R. Marateb, PhD; Kevin C. McGill, PhD

Lecture 8. Sound Waves Superposition and Standing Waves

SCIENTIFIC COMMITTEE SEVENTH REGULAR SESSION August 2011 Pohnpei, Federated States of Micronesia

BLOCKAGE LOCATION THE PULSE METHOD

Currents measurements in the coast of Montevideo, Uruguay

Influence of rounding corners on unsteady flow and heat transfer around a square cylinder

Conditions for occurrence of vortex shedding on a large cable stayed bridge. Full scale data from monitoring system

Bloodpressure measurement, improvement of oscillometric method.

A Hare-Lynx Simulation Model

Chapter 2: Modeling Distributions of Data

Tutorial for the. Total Vertical Uncertainty Analysis Tool in NaviModel3

4-3 Rate of Change and Slope. Warm Up. 1. Find the x- and y-intercepts of 2x 5y = 20. Describe the correlation shown by the scatter plot. 2.

Questions. Background. Equipment. Activities LAB 3. WAVES

Standing Waves in a String

TRIAXYS Acoustic Doppler Current Profiler Comparison Study

SEA-LEVEL AND SEA-STATE MEASUREMENTS WITH RADAR LEVEL SENSORS. Dr. Ulrich Barjenbruch 1 and Jens Wilhelmi 2

LAB 10 Waves and Resonance

New power in production logging

Observations of noise generated by nonlinear internal waves on the continental shelf during the SW06 experiment

Wave phenomena in a ripple tank

Pressure coefficient on flat roofs of rectangular buildings

Lab 12 Standing Waves

Section 1 Types of Waves. Distinguish between mechanical waves and electromagnetic waves.

The pth percentile of a distribution is the value with p percent of the observations less than it.

Lesson 14: Simple harmonic motion, Waves (Sections )

Open Research Online The Open University s repository of research publications and other research outputs

LABORATORY EXERCISE 1 CONTROL VALVE CHARACTERISTICS

Lab 12 Standing Waves

Vibration Analysis and Test of Backup Roll in Temper Mill

An experimental study of internal wave generation through evanescent regions

OPERATIONAL AMV PRODUCTS DERIVED WITH METEOSAT-6 RAPID SCAN DATA. Arthur de Smet. EUMETSAT, Am Kavalleriesand 31, D Darmstadt, Germany ABSTRACT

INSTRUMENT INSTRUMENTAL ERROR (of full scale) INSTRUMENTAL RESOLUTION. Tutorial simulation. Tutorial simulation

Emerging Crash Trend Analysis. Mark Logan Department of Main Roads, Queensland. Patrick McShane Queensland Transport

Observing Waves, Their Properties, and Relationships

PAPER 2 THEORY QUESTIONS

Wind Flow Validation Summary

Laboratory Hardware. Custom Gas Chromatography Solutions WASSON - ECE INSTRUMENTATION. Custom solutions for your analytical needs.

Module 9. Advanced Data Processing

Catenary Mooring Chain Eigen Modes and the Effects on Fatigue Life

Laboratory Hardware. Custom Gas Chromatography Solutions WASSON - ECE INSTRUMENTATION. Engineered Solutions, Guaranteed Results.

EEC 686/785 Modeling & Performance Evaluation of Computer Systems. Lecture 6. Wenbing Zhao. Department of Electrical and Computer Engineering

Measuring Sound Speed in Gas Mixtures Using a Photoacoustic Generator

IHS AP Statistics Chapter 2 Modeling Distributions of Data MP1

Table of Contents. Chapter: Waves. Section 1: The Nature of Waves. Section 2: Wave Properties. Section 3: The Behavior of Waves

Chapter 19: Vibrations And Waves

DEPARTMENT OF THE NAVY DIVISION NEWPORT OFFICE OF COUNSEL PHONE: FAX: DSN:

Chapter 11 Waves. Waves transport energy without transporting matter. The intensity is the average power per unit area. It is measured in W/m 2.

Overview. 2 Module 13: Advanced Data Processing

WAVES. Pulses are disturbances or a single wave motion. A continuous production of pulses will give rise to a progressive wave (wave train).

CHAPTER 8 (SECTIONS 8.1 AND 8.2) WAVE PROPERTIES, SOUND

Outline. Terminology. EEC 686/785 Modeling & Performance Evaluation of Computer Systems. Lecture 6. Steps in Capacity Planning and Management

Dick Bowdler Acoustic Consultant

% per year Age (years)

CORRELATION BETWEEN SONAR ECHOES AND SEA BOTTOM TOPOGRAPHY

Hardware Triaxial and Consolidation Testing Systems Pressure Measurement and Control

x 2 = (60 m) 2 + (60 m) 2 x 2 = 3600 m m 2 x = m

Slide 1 / The distance traveled by a wave in one period is called? Frequency Period Speed of wave Wavelength Amplitude

Reliable Real-Time Recognition of Motion Related Human Activities using MEMS Inertial Sensors

Organizing Quantitative Data

Kinematics Lab #1: Walking the Graphs Results and Discussion. By: Alex Liu Teacher: Mr. Chung Due: October 28, 2010 SPH3U1-01

Advanced Test Equipment Rentals ATEC (2832) OMS 600

Sontek RiverSurveyor Test Plan Prepared by David S. Mueller, OSW February 20, 2004

Strand E. Waves. Unit 1. Measuring Waves. Text. Types of Wave 2 Measuring Waves 6 Phase 10

Calibration Summary of Test Report No.: Sample

Chapter 19: Vibrations and Waves

Lab #21 - ORR: Resonance Tube

ZIN Technologies PHi Engineering Support. PHi-RPT CFD Analysis of Large Bubble Mixing. June 26, 2006

Appendix 5: Currents in Minas Basin. (Oceans Ltd. 2009)

Resonance in Transverse Waves. Regents Physics

CHAPTER 1 Exploring Data

Special edition paper

Analysis of Traditional Yaw Measurements

Waves. harmonic wave wave equation one dimensional wave equation principle of wave fronts plane waves law of reflection

Modelling and Simulation of Environmental Disturbances

EFFECTS OF SIDEWALL OPENINGS ON THE WIND LOADS ON PIPE-FRAMED GREENHOUSES

Introduction to Pattern Recognition

The below identified patent application is available for licensing. Requests for information should be addressed to:

EXSC 408L Fall '03 Problem Set #2 Linear Motion. Linear Motion

Somnosurfin : What Do Waves Have To Do With Sleep? Student Information Page 3D

Name: Section: Date: Wave Review

Examples of Carter Corrected DBDB-V Applied to Acoustic Propagation Modeling

ABSTRACT. KEY WORDS: coral reef, storm waves, infragravity waves, power plant, cooling water, field observation. INTRODUCTION FIELD OBSERVATION

Figure SM1: Front panel of the multipatcher software graphic user interface (GUI) at the beginning of multipatcher operation.

Section 4.2. Travelling Waves

A CO 2 Waveform Simulator For Evaluation and Testing of Respiratory Gas Analyzers

(c) The hospital decided to collect the data from the first 50 patients admitted on July 4, 2010.

Walking with coffee: when and why coffee spills

6. An oscillator makes four vibrations in one second. What is its period and frequency?

3D Inversion in GM-SYS 3D Modelling

ECL Comfort 110, application 131 (valid as of software version 2.00)

LIFE TIME OF FREAK WAVES: EXPERIMENTAL INVESTIGATIONS

Transcription:

Using an Adaptive Thresholding Algorithm to Detect CA1 Hippocampal Sharp Wave Ripples Jay Patel Michigan State University Department of Physics and Astronomy, University of California, Los Angeles 2013 Summer REU Program August 30, 2013 Abstract Sharp wave ripples (high frequency events which occur in the CA1 hippocampal region of the brain) are detected using algorithms which automatically threshold the data at certain voltage values. Typically, detection algorithms use the same threshold throughout the entire voltage trace. The problem with this method is that the amplitude distribution of the noise is not constant in time; algorithms that employ constant thresholds may pick up false positives and false negatives when detecting ripples. False positives act to skew the interpretation of what ripples are; false negatives act to reduce the amount of valuable information we have on ripples. Using an algorithm with an adaptive threshold (which is designed to follow the noise level over time) greatly reduces the amount of false positives and may decrease the amount of false negatives. The total ripple "charge" (integral of ripple voltage [z-score] over time in ripple) in an interval of time where very few actual ripples occur is reduced by a factor of approximately four as compared to the case where a constant threshold is used. The total ripple charge in a temporal region where ripples readily occur increases by roughly five percent as compared to the constant threshold case. Using an adaptive threshold to reduce the amount of false positives and false negatives results in more accurate data on ripples which can potentially give us a better idea of how these brain patterns might form. I. Introduction Sharp wave ripple complexes are oscillatory current patterns which occur in the CA1 region of the hippocampus. Widespread neuron depolarization in the CA3 region of the hippocampus is thought to produce sharp waves which travel to the CA1 region via the Schaffer collateral pathway. The sharp wave is believed to provide ideal conditions for high frequency inhibitory neuron activity in CA1 which gives rise to the so-called sharp wave ripples (Taxidis et al., 2012). Ripples are usually 50-150ms in duration, 140-220 Hz in frequency (Sullivan et al., 2011). Ripples are important mainly because of their affiliation with hippocampal place cells (neurons which spike in only certain spatial locations). In rats, place cells have been shown to fire in a certain temporal order during spatial navigation tasks. Prior to the task, however, all of the place cells will fire in the same order on a compressed timescale coincident with a ripple (Diba and Buzsaki, 2007). Neuroscientists hypothesize that this may be important for memory consolidation (Girardeau et al., 2009). This feature makes it important for us to obtain meaningful data on ripples. In order to obtain good data, it s very important that we know when to call a high frequency oscillation a ripple and when to ignore it. This is the problem of thresholding. Upper thresholds are implemented to determine 1

whether or not an oscillation is a ripple by looking at how high the peak value of the RMS of the oscillation is. Once the upper threshold picks out the ripples, a lower threshold is used to determine where the ripple begins and where it ends. Having too large of an upper threshold will cause the algorithm to miss ripples (many false negatives). A very small upper threshold will cause the algorithm to obtain too many false positives. A medium upper threshold is hard to determine. The median of the data is changing as a function of time, so a medium threshold at one point in time may not be "medium" at another point in time (figure 1). This paper will address this issue and provide a possible solution to the problem: an adaptive threshold. the purpose of an adaptive threshold is to follow how the data changes over time, and then compensate for that change in order to pick out ripples and determine where they start or end with a higher degree of precision. If an adaptive threshold is used, then the total ripple charge during periods of increased median should decrease. Decreasing the amount of supposed ripples during periods of time where ripples are obviously not happening will rid the ripple data of false positives, resulting in more accurate numerical data (magnitude, frequency, duration, etc.) on ripples. This, in turn, will allow us to make more accurate conclusions about ripples. II. Methods Rats were implanted in the CA1 region of the hippocampus with drives containing 22 13 micrometer thick independently adjustable nichrome tetrodes. Prior to immersion, the tetrodes were plated with a gold-carbon nanotube solution (3:1 gold:carbon ratio), such that the impedance for 1 khz signals was around 100-200 kohm. Voltage signals from tetrodes implanted in CA1 were recorded continuously using a Neuralynx data acquisition system. The sampling rate used was 40 khz and the signal was bandpassed between.1 Hz and 9 khz. The data was then downsampled to a sampling rate of 1.25 khz for analysis in Python 2.7. The signal was then bandpass filtered in the range of 80 Hz-250 Hz (n=11). The high frequency filtered signal was z-scored to put it units of standard deviations. Then, the signal was Hilbert transformed to obtain its envelope. Once the envelope was obtained, it was run through a smoothing function which convolves a signal with a Gaussian function with a window size of approximately 41ms. The smoothed signal was then run through a peak finding algorithm, which recorded information on where the peaks were in time. The data set containing the peak information was run through a sliding window histogram function which used a window size of 10s, a step (overlap) of 5s, and a voltage (measured in standard deviations) bin size of 200. The histograms of the peak amplitudes for each 5s period were then plotted side by side from the initial time to the final time (roughly 3742s total) of the voltage trace (figure 1). The sliding window mean was then calculated for the smoothed signal over all time using a window size of 10s and a step (overlap) of 5s. The mean as a function of time was then multiplied by constants 2.7 and 1.6 to obtain the upper and lower adaptive thresholds, respectively, which were then plotted against the sliding window histogram over time along with corresponding constant thresholds. The constant upper and lower thresholds used were 2.7 multiplied by the mean of the mean as a function of time and 1.6 multiplied by the mean of the mean as a function of time, respectively. A spectrogram of the raw voltage trace was taken (NFFT=65536, overlap=58982) (figure 4). 2

will not pick up those ripples (figure 1); as a result the number of ripples in interval 2 using an adaptive threshold is much lower (figure 3). The adaptive upper threshold results in a ripple charge decrease in interval 2 by a factor of nearly 4 (table 1). The adaptive threshold in interval 1 results in roughly 5 percent more ripple charge than in the constant threshold case (table 1). The constant threshold remains above the adaptive threshold from 6664s to 6983s (figure 1). Figure 1: Sliding window histogram. Horizontal axis depicts time. Vertical axis depicts amplitude in sigma. Color axis depicts log (base 10) of the number of peaks in a given bin. Interval 1 is from 6384s to 6589s. Interval 2 is from 6549s to 6664s. The top and bottom green lines represent the upper and lower constant thresholds, respectively. The top and bottom black lines represent the upper and lower adaptive thresholds, respectively. The upper and lower adaptive thresholds were designed to follow the edge of the blue and yellow regions of the distribution, respectively. III. Results Figure 2: Constant Thresholds: Histogram depicting the number of ripples in 5s wide time bins. Vertical axis is number of ripples, horizontal axis is time. Interval 1 and interval 2 (defined earlier) are shown adjacent to one another. Notice the large number of ripples in interval 2. Threshold Interval 1 Interval 2 Constant 42.967 10.147 Adaptive 45.263 2.577 Table 1: Interval Ripple Charge [sigma*s] for Thresholds. Interval 1 is in the time range 6384s- 6589s (figure 1). Interval 2 is in the time range 6549s-6664s (figure 1). The contour of the noise jumps significantly in amplitude in interval 2 (figure 1). The constant upper threshold cuts right through this, causing the algorithm to display a higher ripple count (figure 2). The adaptive upper threshold, however, increases as the contour of the noise increases, ensuring that the algorithm Figure 3: Adaptive Thresholds: histogram depicting the number of ripples in 5s wide time bins. Vertical axis is number of ripples, horizontal axis is time. Notice the vast decrease in ripple count during interval 1. This decrease is due to the adaptive nature of the upper threshold. 3

IV. Discussion The original problem was that the constant upper threshold in the ripple detection algorithm did not have a properly defined value at every point in time. At some times an upper threshold of 3 may not get any of the ripples in the data segment, whereas at other times an upper threshold of 3 may not only detect ripples, but may also mistake noise for ripples. The solution to the problem is to implement an adaptive upper threshold. An adaptive lower threshold is also needed, because ripples are defined to begin and end when the noise ends and begins, respectively. since the noise is shifting in amplitude over time (figure 1), so will the start and end points of the ripples. Naturally, the adaptive thresholds implemented in this project were designed to follow the contour of the noise such that during periods of high noise, the requirement for being a ripple was made higher. It is clear from interval 2 that keeping a constant threshold would allow more noise to be mistaken for ripples (figure 1). With an adaptive threshold, false positives (interval 2) are reduced by a significant amount (table 1). the adaptive lower threshold lies below the constant lower threshold for a significant fraction of the time. It is possible that the adaptive lower threshold is finding ripples where the constant lower threshold missed them. In interval 1, the ripple charge of potential false negatives that were recovered is roughly 5 percent of the total ripple charge in interval 1 during the constant threshold case. It is not entirely clear whether or not the adaptive threshold is picking up false negatives of the constant threshold case. It has been suggested that during REM sleep, ripple activity is less prominent than during slow Wave sleep. During REM sleep, theta wave activity is prominent (Diekelmann and Born, 2010). It is possible that interval 2 is actually the REM sleep state of the rat s sleep (figure 4). Notice how theta power is much higher during interval 2 than interval 1. Perhaps interval 1 is SWS, as this interval is characterized by high ripple activity (figure 1). If this is the case, then it makes sense that there would be little to no ripples during interval 2, as it would be the REM phase of sleep. Using a constant threshold, one would conclude that there are in fact many ripples during this phase (interval 2). This, however, would not be the case during REM sleep. Figure 4: spectrogram of the raw voltage trace over time. Vertical axis is frequency. Theta corresponds to 6-9Hz. Notice how the theta power is large during interval 2, and insignificant in interval 1. Periods of high theta power may be related to REM sleep. References [1] Diba K, Buzsaki G. (2007). Forward and reverse hippocampal place-cell sequences during ripples. Nature Neuroscience, 10(10):1241-1242. [2] Diekelmann S, Born J. (2010). The memory function of sleep. Nature Reviews Neuroscience, 11:114-126. [3] Girardeau G, Benchenane K, Wiener S I, Buzsaki G, Zugaro M B. (2009). Selective suppression of hippocampal ripples impairs spatial memory. Nature Neuroscience, 12:1222-1223. [4] Sullivan D, Csicsvari J, Mizuseki K, Montgomery S, Diba K, Buzsaki G. (2011). Relationships between hippocampal sharp waves, ripples and fast gamma oscillation: 4

influence of dentate and entorhinal cortical activity. J Neurosci., 31(23):8605-8616. [5] Taxidis J, Coombes S, Mason R, Owen Acknowledgements: MR. (2012). Modeling sharp wave-ripple complexes through a CA3-CA1 network model with chemical synapses. Hippocampus, 22(5):995-1017. This research was supported by the NSF. I would like to thank Mayank Mehta for encouraging me to think about problems, Jason Moore for educating me in various data analysis techniques, Zahra Aghajan for assisting me with the Neuralynx software files, and everyone else at the lab for answering my basic questions on neuroscience. 5