Skip to content

Commit

Permalink
Minor adds + cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jstout211 committed Oct 25, 2024
1 parent a00080c commit 2453097
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 128 deletions.
2 changes: 2 additions & 0 deletions nih2mne/GUI/qa_bids_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,8 @@ def subject_qa_POPUP(bids_info, text_item='Select'):
[sg.Text(f'{bids_info}')],
# [sg.Listbox(data, size=(20,5), key='SELECTED')],
[sg.Button('Plot MEG',key='-PLOT_MEG-'), sg.Combo(bids_info.meg_list, key='-MEG_SELECTION-')],

[sg.Button('Process Freesurfer', key='-PROC_FS-')]
]
window = sg.Window('POPUP', layout).Finalize()
meg_selection = None
Expand Down
25 changes: 24 additions & 1 deletion nih2mne/GUI/qt_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,18 @@
TODO --
check the MEG datasets and assess bad subjs data (bad chans etc)
launch single subject check from push button
Layout:
BIDS_project_window:
Freesurfer - Run all outstanding freesurfer processing
MRIprep - Run all mri preprocessing on outstanding subjects
MEGNET - not implemented currently
Next/Prev - Page Numbers
Subject_Tile:
BIDS_root lookup
QA file - QA-s the MEG tasks per subject
Subject_GUI:
Subject specific parameters. Summary+Triax+3Dcoreg+MEG plotting
"""

Expand All @@ -21,6 +32,7 @@
import numpy as np
from nih2mne.utilities.montages import montages
from nih2mne.dataQA.qa_config_reader import qa_dataset, read_yml
import glob



Expand Down Expand Up @@ -271,6 +283,17 @@ def setup_full_layout(self):
self.b_task_chooser.addItems(self.task_set)
self.b_task_chooser.currentIndexChanged.connect(self.filter_task_qa_vis)
top_buttons_layout.addWidget(self.b_task_chooser)
self.b_out_project_chooser = QComboBox()
#Add Project output directory
# tmp_ = glob.glob('*', root_dir=op.join(self.bids_project.bids_root, 'derivatives'))
# derivatives_dirs = [i for i in tmp_ if op.isdir(op.join(self.bids_project.bids_root, 'derivatives', i))]
# for i in ['freesurfer', 'megQA']:
# if i in derivatives_dirs: derivatives_dirs.remove(i)
# self.b_out_project_chooser.addItems(derivatives_dirs)
# top_buttons_layout.addWidget(self.b_out_project_chooser)



main_layout.addLayout(top_buttons_layout)

# Add Subject Chooser Grid Layer
Expand Down
17 changes: 0 additions & 17 deletions nih2mne/dataQA/qa_config_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,3 @@ def qa_dataset(raw, task_type=None, qa_dict=None):










#%% Testing
def test_yaml_read():
from nih2mne.dataQA.qa_config_reader import read_yml
import nih2mne
fname = op.join(nih2mne.__path__[0], 'dataQA', 'config_template.yml')
dat = read_yml(fname)
assert dat['airpuff']['stim']==425
assert dat['airpuff']['missingstim'] ==75
assert 'haririhammer' in dat.keys()

110 changes: 0 additions & 110 deletions nih2mne/make_mri_json.py

This file was deleted.

0 comments on commit 2453097

Please sign in to comment.