diff --git a/.coveragerc b/.coveragerc index 254e846..04fd49b 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,5 +1,5 @@ [run] -source = Almkanal +source = almkanal omit = *__init__* - Almkanal/tests/* \ No newline at end of file + AlmKanal/tests/* \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8b1d8e6..e489273 100644 --- a/.gitignore +++ b/.gitignore @@ -29,7 +29,7 @@ __pycache__ dist # Ignore ruff stuff -.ruff_cache# pixi environments +# pixi environments .pixi *.egg-info *.lcov @@ -39,3 +39,7 @@ dist test_data old data_old + +.mypy_cache +.pytest_cache +.ruff_cache diff --git a/__pycache__/AlmKanal.cpython-312.pyc b/__pycache__/AlmKanal.cpython-312.pyc deleted file mode 100644 index 6476e30..0000000 Binary files a/__pycache__/AlmKanal.cpython-312.pyc and /dev/null differ diff --git a/__pycache__/raw_cleaner.cpython-312.pyc b/__pycache__/raw_cleaner.cpython-312.pyc deleted file mode 100644 index 5dec68f..0000000 Binary files a/__pycache__/raw_cleaner.cpython-312.pyc and /dev/null differ diff --git a/template_pipelines/markov_pipeline.py b/template_pipelines/markov_pipeline.py index 1a26fea..49e83ad 100644 --- a/template_pipelines/markov_pipeline.py +++ b/template_pipelines/markov_pipeline.py @@ -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, @@ -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, diff --git a/template_pipelines/resting_pipeline.py b/template_pipelines/resting_pipeline.py index 8d0f793..dac0fda 100644 --- a/template_pipelines/resting_pipeline.py +++ b/template_pipelines/resting_pipeline.py @@ -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,