Ejemplo n.º 1
0
# Print out burst statistic information
for key, val in burst_stats.items():
    print('{:15} \t: {}'.format(key, val))

###################################################################################################
# Burst detection applied to real recordings
# ------------------------------------------
#
# Next up, we'll load a sample of real neural data, and try out the burst detection.
#

###################################################################################################

# Download, if needed, and load example data file
sig = load_ndsp_data('sample_data_1.npy', folder='data')

# Set sampling rate, and create a times vector for plotting
fs = 1000
times = create_times(len(sig)/fs, fs)

###################################################################################################

# Set the frequency range to look for bursts
f_range = (8, 12)

# Detect bursts using the dual threshold algorithm
bursting = detect_bursts_dual_threshold(sig, fs, (3, 3), f_range)

###################################################################################################
Ejemplo n.º 2
0
# Import utilities for loading and plotting data
from neurodsp.utils import create_times
from neurodsp.utils.download import load_ndsp_data
from neurodsp.plts.time_series import plot_time_series, plot_instantaneous_measure

###################################################################################################
# Load example neural signal
# --------------------------
#
# First, we will load an example neural signal to use for our time-frequency measures.
#

###################################################################################################

# Load a neural signal, as well as a filtered version of the same signal
sig = load_ndsp_data('sample_data_1.npy', folder='data')
sig_filt_true = load_ndsp_data('sample_data_1_filt.npy', folder='data')

# Set sampling rate, and create a times vector for plotting
fs = 1000
times = create_times(len(sig) / fs, fs)

# Set the frequency range to be used
f_range = (13, 30)

###################################################################################################
#
# Throughout this example, we will use
# :func:`~neurodsp.plts.time_series.plot_time_series` to plot time series, and
# :func:`~neurodsp.plts.time_series.plot_instantaneous_measure`
# to plot instantaneous measures.