From c514e5aed8282c0e0bf56839cbb8a15d53c46fc4 Mon Sep 17 00:00:00 2001 From: schmidtfa Date: Tue, 3 Dec 2024 12:43:39 +0000 Subject: [PATCH] dropped stuff --- .coveragerc | 4 +-- .gitignore | 6 +++- __pycache__/AlmKanal.cpython-312.pyc | Bin 9831 -> 0 bytes __pycache__/raw_cleaner.cpython-312.pyc | Bin 1485 -> 0 bytes template_pipelines/markov_pipeline.py | 41 ++++++++++++------------ template_pipelines/resting_pipeline.py | 38 +++++++++++----------- 6 files changed, 46 insertions(+), 43 deletions(-) delete mode 100644 __pycache__/AlmKanal.cpython-312.pyc delete mode 100644 __pycache__/raw_cleaner.cpython-312.pyc 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 6476e3084eb97f3797eeb06e0a73e52f6be5f8f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9831 zcmbVSNpKwJb?(`h?!ht`V6bDb5Q$!LY6e5(`-yPfB|QL|L!3P zq+vrYxjaZoCJ-k97&|4hDiwhtE249V=#zcOK~=c`0T{MgREeoD2jw&pQHjfyL*Dzl zXCXL@q%?=G-@kYN{oePMAOGz0c^SA4|LoMnO9Kq^?^wuR4wHHO55O!lA|qN7Owtmy zB&|`a1>ZX0|2~W}+^-|uEV3S;wqr5ZWOIAcH zl9ka)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~VgIq{^ zIT?@d8>~oHaJjN;RzVU6JR@bVBqiX$Bc7UVC@j0ZsRLI=FJhi~=;r9UZ~$OOFC_w3 z*b~v65F&%PfAKN&8XX-Oo%pM3cG3h)Zk1}cZ~=!B~4}s+6V&x+OgR_mQE*(FntHM^kF5aGI&ss zd?QD&?j{uIpW3%qf`O{ft!~Uig>Y9fmk;T2shnEh6%5K=ZwAK!DQg(@5_cU$TJG9-m{vy zyMMF&*qXh51!|6c<+eK7x4aHVN6rtizP4w-_S|7@Klo?+zhtW&2ehsoIUC#`cI{a0 zx^X7w03Nh=XaA~lvoYtw666wgt%^6jIS-b+OgCgGZk&0HqjNi%)($P$rnRz(&{6Z1Xt6nb|HWAy20~F`2{({`M8QEkq~dJE9F9~bIXz?8 zzd2}v6dTxbJb|S#OHIq8==1qb&V%BS|*Y4sk$lD9kxfh}X>3X&gjDAgV4DfO}z#0r&3b z4KO-F{t4<3=s{+LHgJR6<^W{3eNuvgANCN diff --git a/__pycache__/raw_cleaner.cpython-312.pyc b/__pycache__/raw_cleaner.cpython-312.pyc deleted file mode 100644 index 5dec68fb893f064d5fca70f0f981eaf18e5895c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1485 zcmaJ>&1)M+6ra^{3t57T8i^GeDezOS=!p$c;A^6r_N0asdY)M}W4fRl{D9?GadPQKWWrTLaKXV>8K{Q2$-_nyP$S>k0;3K(`C-+Mri%ip0qB2#eN;8)7 zNa>e>Q)$ep%sG7yIr^wSMG>89rnV79+o+<}F;5K|WO3KmJ>zcAcHN4^vStuqOK)Ps zvsu=%N$B`S=mb71nuhD_;n>lej%%}mi339P&~Oiug)9kmtDA&WQcQN?9Qz9X(2uCN@oiQ#ozI|&r+pv6SnY%$sE5))ELAvPSJX|YLy3b0={1B~^s4cpsr zOt~96E~$=hp~oJE%0n#WcbMh|E!gAg0cJ7~4{gi}$qs&05?$bgrkRM19_QUL2;sbA zD?%8P9aHD@Vhap2;EzeF027|M2}-D5;BHJZa4nYddMxktfcv?^+<#T%GXMU%&LzJ1 zn$&#bD{3dV%}*3K=oz?0FuxSj_$8AC1~(yO8djJ7t-V;UeMW3dYE5I$G5jhq+n!^E zwU!gsZoA$mhHtnv5J-oA#_(-i?Hoe+ocnkkPUclij$!%|jaHGW4b_dPvdMe(c68$w zfKetrcXN;*|G}N3@cZ54JCDPkcAqNmL~8as?Y?%j z@_1&TJyq96GE%cc^?G!5HJV@Meeqhfuo7Kak1Fqua`MdPKpPd&)a9d%C*>Q*t1#VH z2jXD+q)>YB(ctc&a4Mr>d7zyEM^q`)>svcJTU)Ikf8cHH!xmpg=;YQ8OSf&qs^6s%vH{=BltUaJaE%)RUX9cqR;=@^*Uad6XV)+-q%dOp;+-}O3& z_!4Br{Ow_>fZ#L-N8*UtWsl7Nf=GXyL7sso7|0C0e=?UHvp#*#_{> K@`g~3Gra_G>b!mc 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,