Find Ripples

This analysis finds ripples in continuous channels using the algorithm described in Buzsaki lab GitHub repository function FindRipples.m.

Graphical display produced by this analysis shows ripple positions and durations.

This analysis can also add interval variables containing time intervals corresponding to ripples.

Parameters

Parameter

Description

Filter Frequency From

Minimum frequency (Hz) of the band-pass filter.

Filter Frequency To

Maximum frequency (Hz) of the band-pass filter.

Smooth Filter Width (seconds)

Width of the boxcar smooth filter.

Threshold to Start and End Ripple (number of standard deviations)

Threshold value to start and end ripples (see Algorithm below).

Minimum Ripple Peak Value (number of standard deviations)

Minimum ripple peak value (see Algorithm below).

Minimum Time Between Ripples (seconds)

Minimum time between ripples.

Minimum Ripple Duration (seconds)

Minimum ripple duration.

Maximum Ripple Duration (seconds)

Maximum ripple duration.

Select Data

If Select Data is From Time Range, only the data from the specified (by Select Data From and Select Data To parameters) time range will be used in analysis. See also Data Selection Options .

Select Data From

Start of the time range in seconds.

Select Data To

End of the time range in seconds.

Interval filter

Specifies the interval filter(s) that will be used to preselect data before analysis. See also Data Selection Options.

Summary of Numerical Results

The following information is available in the Summary of Numerical Results

Column

Description

Variable

Variable name.

Number of Ripples

Number of ripples found.

Ripples per Seconds

Number of ripples per second.

Mean Ripple Duration

Mean ripple duration.

Mean Ripple Amplitude

Mean ripple amplitude.

Mean Peak Amplitude

Mean peak amplitude.

Mean Peak Frequency

Mean peak frequency.

Algorithm

  1. Signal is bandpass filtered in [Freq_From, Freq_To] frequency range using the 3rd order Butterworth filter.

  2. The result of 1) is squared.

  3. The result of 2) is smoothed using boxcar filter of the specified length.

  4. The result of 3) is normalized to unity standard deviation: r4 = (r3-mean(r3))/std(r3).

  5. Ripple starts are time points where r4 crosses threshold going up.

  6. Ripple ends are time points where r4 crosses threshold going down.

  7. Incomplete ripples are removed.

  8. Ripples with short inter-ripple periods are merged.

  9. Ripples with a maximum value less than Minimum_Ripple_Peak_Value are discarded.

  10. Ripples that are way too long are discarded.

  11. Ripples that are too short are discarded.

  12. For each ripple, the following values are calculated:

  • Ripple duration

  • Average value of 1) within ripple (mean ripple amplitude)

  • Maximum value of 1) within ripple (peak ripple amplitude)

  • Spectrum of values of 1) within ripple is calculated using DFT with no pre-processing

  • Peak ripple frequency is calculated as the frequency value where the spectrum is maximum

  1. Values calculated in step 12) are averaged over all ripples for the current continuous channel.

Reference

Buzsaki lab GitHub repository function FindRipples.m.