bfef95ab9f35e6d17a4114321a38b11fc1b7d908,tutorials/rhythm/plot_LaggedCoherence.py,,,#,31

Before Change


// Parameters for simulated signal
n_samples = 5000
fs = 1000
burst_freq = 10
burst_starts = [0, 3000]
burst_seconds = 1
burst_samples = burst_seconds*fs

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Design burst kernel
burst_kernel_t = create_times(burst_seconds, fs)
burst_kernel = 2*np.sin(burst_kernel_t*2*np.pi*burst_freq)

// Generate random signal with bursts
times = create_times(n_samples/fs, fs)
sig = np.random.randn(n_samples)
for ind in burst_starts:
    sig[ind:ind+burst_samples] += burst_kernel

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Plot example signal

After Change



// Set time and sampling rate
n_seconds_burst = 1
n_seconds_noise = 2
fs = 1000

// Create a times vector
times = create_times(n_seconds_burst + n_seconds_noise, fs)

// Simulate a signal component with an oscillation
components = {"sim_powerlaw" : {"exponent" : 0},
              "sim_oscillation" : {"freq" : 10}}
s1 = sim_combined(n_seconds_burst, fs, components, [0.1, 1])

// Simulate a signal component with just noise
s2 = sim_powerlaw(n_seconds_noise, fs, 0, variance=0.1)

// Join signals together to approximate a "burst"
sig = np.append(s1, s2)

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Plot example signal
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: neurodsp-tools/neurodsp
Commit Name: bfef95ab9f35e6d17a4114321a38b11fc1b7d908
Time: 2020-03-17
Author: tdonoghue@ucsd.edu
File Name: tutorials/rhythm/plot_LaggedCoherence.py
Class Name:
Method Name:


Project Name: bokeh/bokeh
Commit Name: ff7d1bec6d558c4467f29c2b4f5ef9a446f4665b
Time: 2017-03-22
Author: jsignell@gmail.com
File Name: examples/howto/server_embed/standalone_embed.py
Class Name:
Method Name: modify_doc


Project Name: bokeh/bokeh
Commit Name: ff7d1bec6d558c4467f29c2b4f5ef9a446f4665b
Time: 2017-03-22
Author: jsignell@gmail.com
File Name: examples/howto/server_embed/tornado_embed.py
Class Name:
Method Name: modify_doc