|
33 | 33 | from fooof.bands import Bands |
34 | 34 |
|
35 | 35 | # Imports from NeuroDSP to simulate & plot time series |
36 | | -from neurodsp.sim import sim_powerlaw |
| 36 | +from neurodsp.sim import sim_powerlaw, set_random_seed |
37 | 37 | from neurodsp.filt import filter_signal |
38 | 38 | from neurodsp.plts import plot_time_series |
39 | | -from neurodsp.utils import create_times, set_random_seed |
| 39 | +from neurodsp.utils import create_times |
40 | 40 |
|
41 | 41 | ################################################################################################### |
42 | 42 |
|
|
96 | 96 | band_sig = filter_signal(sig, s_rate, 'bandpass', f_range) |
97 | 97 |
|
98 | 98 | # Plot the time series of the current band, and adjust plot aesthetics |
99 | | - plot_time_series(times, band_sig, title=label + ' ' + str(f_range), ax=ax) |
100 | | - ax.set_xlim(0, n_seconds); ax.set_ylim(-1, 1); ax.set_xlabel(''); |
| 99 | + plot_time_series(times, band_sig, title=label + ' ' + str(f_range), ax=ax, |
| 100 | + xlim=(0, n_seconds), ylim=(-1, 1), xlabel='') |
101 | 101 |
|
102 | 102 | ################################################################################################### |
103 | 103 | # |
|
159 | 159 | band_sig = filter_signal(sig_delta_ap, s_rate, 'bandpass', bands.beta) |
160 | 160 |
|
161 | 161 | # Plot the filtered time series |
162 | | -plot_time_series(times, band_sig) |
163 | | -plt.xlim(0, n_seconds); plt.ylim(-1, 1); |
| 162 | +plot_time_series(times, band_sig, xlim=(0, n_seconds), ylim=(-1, 1)) |
164 | 163 |
|
165 | 164 | ################################################################################################### |
166 | 165 | # |
|
177 | 176 | band_sig = filter_signal(sig_delta_ap, s_rate, 'bandpass', bands.high_gamma) |
178 | 177 |
|
179 | 178 | # Plot the filtered time series |
180 | | -plot_time_series(times, band_sig) |
181 | | -plt.xlim(0, n_seconds); plt.ylim(-1, 1); |
| 179 | +plot_time_series(times, band_sig, xlim=(0, n_seconds), ylim=(-1, 1)) |
182 | 180 |
|
183 | 181 | ################################################################################################### |
184 | 182 | # |
|
0 commit comments