If you have a question or issue with MNE-Python, please include the following info:
- MNE version: e.g. 1.4.2
- operating system: e.g. macOS Ventura 13.0
# load inverse operator
inverse_operator_file = (
sample_data_folder / "MEG" / "sample" / "sample_audvis-meg-oct-6-meg-inv.fif"
)
inv_operator = mne.minimum_norm.read_inverse_operator(inverse_operator_file)
# set signal-to-noise ratio (SNR) to compute regularization parameter (λ²)
snr = 3.0
lambda2 = 1.0 / snr**2
# generate the source time course (STC)
stc = mne.minimum_norm.apply_inverse(
vis_evoked, inv_operator, lambda2=lambda2, method="MNE"
) # or dSPM, sLORETA, eLORETA
# path to subjects' MRI files
subjects_dir = sample_data_folder / "subjects"
print(stc.data)
# plot the STC
stc.plot(
initial_time=0.1, hemi="split", views=["lat","med"], subjects_dir=subjects_dir
)
error message: zsh: floating point exception /Users/frankyang/opt/anaconda3/bin/python
I basically just copy paste the code from the MNE notebook to my own python IDE VSS. I also downloaded all the dependencies following the command in the tutorial.