jstout211 / enigma_MEG

Other
9 stars 1 forks source link

Rank Calculation for beamformer #8

Closed jstout211 closed 1 year ago

jstout211 commented 1 year ago
    proc.do_proc_allsteps()
  File "/vf/users/MEGmodules/modules/enigma_meg0.2_extras/enigma_MEG/enigmeg/process_meg.py", line 504, in do_proc_allsteps
    self.do_beamformer()
  File "/vf/users/MEGmodules/modules/enigma_meg0.2_extras/enigma_MEG/enigmeg/process_meg.py", line 374, in do_beamformer
    if epo_rank < noise_rank:
TypeError: '<' not supported between instances of 'dict' and 'dict'

Solution - set the rank according to sensor type

            if 'mag' in epo_rank:
                if epo_rank['mag'] < noise_rank['mag']:
                    noise_rank['mag']=epo_rank['mag']
            if 'grad' in epo_rank:
                if epo_rank['grad'] < noise_rank['grad']:
                    noise_rank['grad']=epo_rank['grad']
jstout211 commented 1 year ago

Verified this is sufficient