Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-dzaye committed Apr 18, 2023
1 parent b08f8e9 commit b3f2092
Show file tree
Hide file tree
Showing 10 changed files with 183 additions and 143 deletions.
2 changes: 1 addition & 1 deletion berlin_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"ECOG_R_4_5_SMC_AT",
"ECOG_R_5_6_SMC_AT"
],
"016": [
"EL016": [
"ECOG_R_1_2_SMC_AT",
"ECOG_R_2_3_SMC_AT",
"ECOG_R_3_4_SMC_AT",
Expand Down
10 changes: 9 additions & 1 deletion berlin_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def main():
for remove_subject in remove_subjects:
files = [file for file in files if remove_subject not in file]
files = preprocessing.pick_runs(files)
files_x = [f for f in files if "004" in f]
files_x = [f for f in files if "EL016" in f]

# Define variables
burst_char_pd_all = []
Expand Down Expand Up @@ -292,6 +292,7 @@ def statistic(x, y):
peak_13_off = psd_s13off[6:17]
peak_14_off = psd_s14off[3:14]
peak_15_off = psd_s15off[3:14]
peak_16_off = psd_s16off[8:19]
peak_g_off = psd_off[3:14]

peak_3_on = psd_s3on[3:14]
Expand All @@ -306,6 +307,7 @@ def statistic(x, y):
peak_13_on = psd_s13on[6:17]
peak_14_on = psd_s14on[7:18]
peak_15_on = psd_s15on[3:14]
peak_16_on = psd_s16on[8:19]
peak_g_on = psd_on[6:17]

plt.subplot(1,2,1)
Expand All @@ -321,6 +323,7 @@ def statistic(x, y):
plt.plot(x_ticks, peak_13_off, label='13')
plt.plot(x_ticks, peak_14_off, label='14')
plt.plot(x_ticks, peak_15_off, label='15')
plt.plot(x_ticks, peak_16_off, label='16')
plt.plot(x_ticks, peak_g_off, color='red', linewidth=3, path_effects=[SimpleLineShadow(shadow_color="red", linewidth=4),Normal()])
plt.legend(title="Theta", frameon=False)
plt.xlabel("Frequency (Hz)")
Expand All @@ -341,6 +344,7 @@ def statistic(x, y):
plt.plot(x_ticks, peak_13_on, label='13')
plt.plot(x_ticks, peak_14_on, label='14')
plt.plot(x_ticks, peak_15_on, label='15')
plt.plot(x_ticks, peak_16_on, label='16')
plt.plot(x_ticks, peak_g_on, color='red', linewidth=3, path_effects=[SimpleLineShadow(shadow_color="red", linewidth=4),Normal()])
plt.legend(title="Theta", frameon=False)
plt.xlabel("Frequency (Hz)")
Expand All @@ -367,6 +371,7 @@ def statistic(x, y):
peak_13_off = psd_s13off[18:29]
peak_14_off = psd_s14off[15:26]
peak_15_off = psd_s15off[12:23]
peak_16_off = psd_s16off[15:26]
peak_g_off = psd_off[17:28]

peak_3_on = psd_s3on[7:18]
Expand All @@ -381,6 +386,7 @@ def statistic(x, y):
peak_13_on = psd_s13on[19:30]
peak_14_on = psd_s14on[15:26]
peak_15_on = psd_s15on[16:27]
peak_16_on = psd_s16on[10:21]
peak_g_on = psd_on[17:28]

plt.subplot(1,2,1)
Expand All @@ -396,6 +402,7 @@ def statistic(x, y):
plt.plot(x_ticks, peak_13_off, label='13')
plt.plot(x_ticks, peak_14_off, label='14')
plt.plot(x_ticks, peak_15_off, label='15')
plt.plot(x_ticks, peak_16_off, label='16')
plt.plot(x_ticks, peak_g_off, color='red', linewidth=3, path_effects=[SimpleLineShadow(shadow_color="red", linewidth=5),Normal()])
plt.legend(title="Beta", frameon=False)
plt.xlabel("Frequency (Hz)")
Expand All @@ -416,6 +423,7 @@ def statistic(x, y):
plt.plot(x_ticks, peak_13_on, label='13')
plt.plot(x_ticks, peak_14_on, label='14')
plt.plot(x_ticks, peak_15_on, label='15')
plt.plot(x_ticks, peak_16_on, label='16')
plt.plot(x_ticks, peak_g_on, color='red', linewidth=3, path_effects=[SimpleLineShadow(shadow_color="red", linewidth=5),Normal()])
plt.legend(title="Beta", frameon=False)
plt.xlabel("Frequency (Hz)")
Expand Down
Binary file modified src/__pycache__/burst_calc.cpython-310.pyc
Binary file not shown.
Binary file modified src/__pycache__/pipeline.cpython-310.pyc
Binary file not shown.
Binary file modified src/__pycache__/plot_utils.cpython-310.pyc
Binary file not shown.
Binary file modified src/__pycache__/postprocessing.cpython-310.pyc
Binary file not shown.
Binary file modified src/__pycache__/preprocessing.cpython-310.pyc
Binary file not shown.
6 changes: 3 additions & 3 deletions src/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ def bursts_single_run(
raw_ecog_dow = preprocessing.downsample(raw_ecog_filt)

# plot recording and save annotation
# raw_ecog_dow.plot()
# print("done")
# raw_ecog_dow.annotations.save('sub-015_ses-EcogLfpMedOn01_task-Rest_acq-StimOff_run-1_annotations.csv', overwrite=True)
#raw_ecog_dow.plot()
#print("done")
# raw_ecog_dow.annotations.save('sub-EL016_ses-EcogLfpMedOn02_task-Rest_acq-StimOff_run-1_annotations.csv', overwrite=True)

signal, time = preprocessing.get_data(raw_ecog_dow)

Expand Down
Loading

0 comments on commit b3f2092

Please sign in to comment.