Skip to content

Commit

Permalink
dropped stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidtfa committed Dec 3, 2024
1 parent c78c497 commit c514e5a
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 43 deletions.
4 changes: 2 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[run]
source = Almkanal
source = almkanal
omit =
*__init__*
Almkanal/tests/*
AlmKanal/tests/*
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ __pycache__
dist

# Ignore ruff stuff
.ruff_cache# pixi environments
# pixi environments
.pixi
*.egg-info
*.lcov
Expand All @@ -39,3 +39,7 @@ dist
test_data
old
data_old

.mypy_cache
.pytest_cache
.ruff_cache
Binary file removed __pycache__/AlmKanal.cpython-312.pyc
Binary file not shown.
Binary file removed __pycache__/raw_cleaner.cpython-312.pyc
Binary file not shown.
41 changes: 20 additions & 21 deletions template_pipelines/markov_pipeline.py
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
#Basic Resting state analysis pipeline
# Basic Resting state analysis pipeline
from pathlib import Path

import joblib
import mne
from almkanal import AlmKanal
from plus_slurm import Job
import joblib
from pathlib import Path

class RestingPipe(Job):
from almkanal import AlmKanal


class RestingPipe(Job):
job_data_folder = 'data_meg'

def run(self,
subject_id: str,
data_path: str,
subjects_dir: str,
empty_room_path: str,
lp: float = 100,
hp: float = 0.1,
) -> None:
def run(
self,
subject_id: str,
data_path: str,
subjects_dir: str,
empty_room_path: str,
lp: float = 100,
hp: float = 0.1,
) -> None:
full_path = Path(data_path) / subject_id + '_resting.fif'
raw = mne.io.read_raw(full_path, preload=True)

ak = AlmKanal(raw=raw)
# do raw preproc
ak.do_maxwell()
#% filter
# % filter
ak.raw.filter(l_freq=hp, h_freq=lp)
#% run_ica
# % run_ica
ak.do_ica()
# % do fwd model
ak.do_fwd_model(subject_id=subject_id,
subjects_dir=subjects_dir,
redo_hdm=True)
ak.do_fwd_model(subject_id=subject_id, subjects_dir=subjects_dir, redo_hdm=True)
# % do epochs
#TODO: This is a placeholder built the proper one from here
# TODO: This is a placeholder built the proper one from here
ak.do_events()
event_dict = {
'Auditory/Left': 1,
Expand All @@ -44,7 +44,6 @@ def run(self,

ak.do_epochs(event_id=event_dict)


# % go 2 source
stc = ak.do_src(
subject_id=subject_id,
Expand Down
38 changes: 19 additions & 19 deletions template_pipelines/resting_pipeline.py
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
#Basic Resting state analysis pipeline
# Basic Resting state analysis pipeline
from pathlib import Path

import joblib
import mne
from almkanal import AlmKanal
from plus_slurm import Job
import joblib
from pathlib import Path

class RestingPipe(Job):
from almkanal import AlmKanal


class RestingPipe(Job):
job_data_folder = 'data_meg'

def run(self,
subject_id: str,
data_path: str,
subjects_dir: str,
empty_room_path: str,
lp: float = 100,
hp: float = 0.1,
) -> None:
def run(
self,
subject_id: str,
data_path: str,
subjects_dir: str,
empty_room_path: str,
lp: float = 100,
hp: float = 0.1,
) -> None:
full_path = Path(data_path) / subject_id + '_resting.fif'
raw = mne.io.read_raw(full_path, preload=True)

ak = AlmKanal(raw=raw)
# do raw preproc
ak.do_maxwell()
#% filter
# % filter
ak.raw.filter(l_freq=hp, h_freq=lp)
#% run_ica
# % run_ica
ak.do_ica()
# % do fwd model
ak.do_fwd_model(subject_id=subject_id,
subjects_dir=subjects_dir,
redo_hdm=True)
ak.do_fwd_model(subject_id=subject_id, subjects_dir=subjects_dir, redo_hdm=True)
# % go 2 source
stc = ak.do_src(
subject_id=subject_id,
Expand Down

0 comments on commit c514e5a

Please sign in to comment.