Apply LCMV to raw data

  • MNE version: 1.3.1
  • operating system: Windows 10

Hi MNE community,

I am taking my first steps with MNE-python and approaching the source reconstruction. More specifically, I am trying to apply the LCMV beamformer to raw data, but I am having some issues.

One of the main critical points regards the empty room data preprocessing. Essentially, I am not able to obtain the same rank for the empty room data and the raw data, which is a problem when I try to compute the LCMV. I am trying to preprocess the empty room data in the same way, so I marked the same bad channels and applied a passband filter 1-148Hz, but I have some problems with MaxFilter. Indeed, when I try to apply the MaxFilter to the empty room data, it doesn’t allow me to add the same head_pos and coord_frame = ‘head’ as suggested. How can I solve this point?
I also used ICA on my data. Should I apply it to the empty room data using the same parameters and just remove the same amount of components as I did for the raw data of that specific subject?

One last point is the noise and data covariance matrix estimation. I am using the code below to compute them, but I would like to check that it is correct. As far as I understand, I should estimate the rank based on the empty room data and then use it for both matrices. Have I understood it correctly?

rank = mne.compute_rank(raw_empty_room, tol=1e-6, tol_kind='relative')

data_cov = mne.compute_raw_covariance(raw, method='shrunk',tmin=0, tmax=None, rank = rank, verbose=True)

noise_cov = mne.compute_raw_covariance(raw_empty_room,method='shrunk',tmin=0, tmax=None,rank=rank,verbose=True)

data_cov.plot(epochs.info)
noise_cov.plot(raw_empty_room.info)

Thank you so much for your help!

Eleonora