Skip to content

Commit

Permalink
seeg need filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronearlerichardson committed Jan 16, 2024
1 parent 9ef0b4e commit 2dd371e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 26 deletions.
Binary file removed examples/filt.png
Binary file not shown.
30 changes: 4 additions & 26 deletions examples/plot_clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@

import mne
import os
from ieeg.io import raw_from_layout, save_derivative
from ieeg.io import save_derivative
from ieeg.mt_filter import line_filter
from ieeg.viz.utils import figure_compare
from bids import BIDSLayout

# %%
# Set up paths
Expand All @@ -31,12 +30,8 @@
# Load Data
# ---------

bids_root = mne.datasets.epilepsy_ecog.data_path()
layout = BIDSLayout(bids_root)
raw = raw_from_layout(layout,
subject="pt1",
preload=True,
extension=".vhdr")
misc_path = mne.datasets.misc.data_path()
raw = mne.io.read_raw(misc_path / 'seeg' / 'sample_seeg_ieeg.fif', preload=True)

# %%
# Filter Data
Expand All @@ -62,28 +57,11 @@
proj=True,
fmax=250)

# %%
# Our Data Unfiltered
# -------------------
#
# .. image:: ../../examples/unfilt.png
# :width: 400
# :alt: Unfiltered
#

# %%
# Our Data Filtered
# -----------------
#
# .. image:: ../../examples/filt.png
# :width: 400
# :alt: Filtered
#

# %%
# Save the Data
# -------------
# Save your line noise cleaned data to `bids_root`/derivatives/test folder
bids_root = mne.datasets.epilepsy_ecog.data_path()

# Check if derivatives folder exists and create if not
if not os.path.exists(os.path.join(bids_root, "derivatives")):
Expand Down
Binary file removed examples/unfilt.png
Binary file not shown.

0 comments on commit 2dd371e

Please sign in to comment.