jstout211 / enigma_MEG

Other
9 stars 1 forks source link

enigma_QA_prep #44

Open jstout211 opened 1 year ago

jstout211 commented 1 year ago

Code doesn't seem to work for the CAMCAN or MOUS datasets

jstout211 commented 1 year ago

Also - n_jobs needs to have a default value.

Traceback (most recent call last): File "/home/jstout/miniconda3/envs/enigma_meg_test/bin/enigma_prep_QA.py", line 7, in exec(compile(f.read(), file, 'exec')) File "/home/jstout/src/enigma_MEG/enigmeg/QA/enigma_prep_QA.py", line 89, in subjstruct = process(subject=subjid, ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jstout/src/enigma_MEG/enigmeg/process_meg.py", line 153, in init self._n_jobs = int(os.environ['n_jobs'])


  File "<frozen os>", line 679, in __getitem__
KeyError: 'n_jobs'
(enigma_meg_test) jstout@kani:~/ds004215$ enigma_prep_QA.py -bids_root $(pwd) -subjid sub-ON02747 -session 01 -run 01 
jstout211 commented 1 year ago

Removing 5 compensators from info because not all compensation channels were picked. Using multitaper spectrum estimation with 7 DPSS windows /home/jstout/src/enigma_MEG/enigmeg/QA/enigma_QA_functions.py:214: RuntimeWarning: in version 1.5, the default behavior of Spectrum.plot() will change so that bad channels will be shown by default. To keep the old default behavior (and silence this warning), explicitly pass picks='data', exclude='bads'. fig = epochs.compute_psd(fmin=subjstruct.proc_vars['fmin'],fmax=subjstruct.proc_vars['fmax']).plot(picks='meg') Averaging across epochs... Traceback (most recent call last): File "/home/jstout/miniconda3/envs/enigma_meg_test/bin/enigma_prep_QA.py", line 7, in exec(compile(f.read(), file, 'exec')) File "/home/jstout/src/enigma_MEG/enigmeg/QA/enigma_prep_QA.py", line 102, in _prepare_QA(subjstruct) File "/home/jstout/src/enigma_MEG/enigmeg/QA/enigma_prep_QA.py", line 28, in _prepare_QA gen_epo_pngs(subjstruct) File "/home/jstout/src/enigma_MEG/enigmeg/QA/enigma_QA_functions.py", line 215, in gen_epo_pngs fig.savefig(figname_epo_psd, dpi=300, bbox_inches='tight') File "/home/jstout/miniconda3/envs/enigma_meg_test/lib/python3.11/site-packages/matplotlib/figure.py", line 3378, in savefig self.canvas.print_figure(fname, **kwargs) File "/home/jstout/miniconda3/envs/enigma_meg_test/lib/python3.11/site-packages/matplotlib/backend_bases.py", line 2353, in print_figure restore_bbox = _tight_bbox.adjust_bbox( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jstout/miniconda3/envs/enigma_meg_test/lib/python3.11/site-packages/matplotlib/_tight_bbox.py", line 28, in adjust_bbox ax.apply_aspect(locator(ax, None)) ^^^^^^^^^^^^^^^^^ File "/home/jstout/miniconda3/envs/enigma_meg_test/lib/python3.11/site-packages/mpl_toolkits/axes_grid1/inset_locator.py", line 73, in call bbox = self.get_window_extent(renderer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jstout/miniconda3/envs/enigma_meg_test/lib/python3.11/site-packages/matplotlib/offsetbox.py", line 399, in get_window_extent renderer = self.figure._get_renderer() ^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute '_get_renderer'

nugenta commented 1 year ago

Fixed the n_jobs issue in e44bf5c

nugenta commented 1 year ago

enigma_prep_qa.py issue is machine specific, works running locally on a MacBook pro