Skip to content

Commit

Permalink
just doing fwd for now
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidtfa committed Dec 3, 2024
1 parent b9a5eae commit 26e67b7
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 7 deletions.
14 changes: 14 additions & 0 deletions tests/test_epoched.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import mne
from almkanal.almkanal import AlmKanal

def test_src(gen_mne_data_epochs): #, ch_picks
data_path = mne.datasets.sample.data_path()
meg_path = data_path / 'MEG' / 'sample'
ak = AlmKanal(epoched=gen_mne_data_epochs)

fwd_fname = meg_path / 'sample_audvis-meg-vol-7-fwd.fif'
fwd = mne.read_forward_solution(fwd_fname)
ak.pick_dict['meg'] = 'mag'
ak.fwd = fwd

ak.do_src()
32 changes: 25 additions & 7 deletions tests/test_raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,27 @@ def test_ica(gen_mne_data_raw, train, eog, ecg, resample_freq, threshold):
resample_freq=resample_freq,
threshold=threshold
)


def test_double_ica(gen_mne_data_raw):

ak = AlmKanal(raw=gen_mne_data_raw)
ak.do_ica(n_components=10,
train=False,
eog=True,
ecg=False,
resample_freq=100,
threshold=0.4
)

ak.do_ica(n_components=10,
train=False,
eog=True,
ecg=False,
resample_freq=100,
threshold=0.4
)


def test_epoching(gen_mne_data_raw):
ak = AlmKanal(raw=gen_mne_data_raw)
Expand All @@ -46,13 +67,10 @@ def test_fwd(gen_mne_data_raw):
ak.do_fwd_model(subject_id='sample',
subjects_dir='./')

# data_path = mne.datasets.sample.data_path()
# meg_path = data_path / 'MEG' / 'sample'
# raw_fname = meg_path / 'sample_audvis_raw.fif'
# ak.do_src(subject_id = 'sample',
# subjects_dir = './',
# return_parc=True,
# empty_room_path=raw_fname,)
ak.pick_dict['meg'] = 'mag'
ak.do_src(subject_id = 'sample',
subjects_dir = './',
return_parc=True,)



Expand Down

0 comments on commit 26e67b7

Please sign in to comment.