Skip to content

Commit

Permalink
add missing n_sbs to csp average section
Browse files Browse the repository at this point in the history
  • Loading branch information
SophieHerbst committed Mar 29, 2024
1 parent 96251a8 commit 9804d6b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mne_bids_pipeline/_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ def add_csp_grand_average(
import matplotlib.pyplot as plt # nested import to help joblib

# First, plot decoding scores across frequency bins (entire epochs).
section = "Decoding: CSP"
section = f"Decoding: CSP, N = {len(cfg.subjects)}"
freq_name_to_bins_map, _ = _handle_csp_args(
cfg.decoding_csp_times,
cfg.decoding_csp_freqs,
Expand Down
40 changes: 40 additions & 0 deletions mne_bids_pipeline/steps/source/tmp_inv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#%%
import mne
from mne.minimum_norm import (
apply_inverse,
make_inverse_operator,
write_inverse_operator,
)
from mne_bids import BIDSPath
#%%
# noise cov file
fname_info = '/Volumes/neurospin/meg/meg_tmp/TimeInWM_Izem_2019/BIDS_anonymized/derivatives/sub-748/meg/sub-748_task-rest_proc-clean_raw.fif'
fname_cov = '/Volumes/neurospin/meg/meg_tmp/TimeInWM_Izem_2019/BIDS_anonymized/derivatives/sub-748/meg/sub-748_task-rest_proc-clean_cov.fif'
fname_fwd = '/Volumes/neurospin/meg/meg_tmp/TimeInWM_Izem_2019/BIDS_anonymized/derivatives/sub-748/meg/sub-748_task-tiwm_fwd.fif'

info = mne.io.read_info(fname_info)
cov = mne.read_cov(fname_cov)
forward = mne.read_forward_solution(fname_fwd)

#%%
inverse_operator = make_inverse_operator(
info, forward, cov, loose=cfg.loose, depth=cfg.depth, rank="info"

#%%
import config_sophie_mac as config

#%%
bids_path = BIDSPath(
subject='sub-748',
session='',
task=cfg.task,
acquisition=cfg.acq,
run=None,
recording=cfg.rec,
space=cfg.space,
extension=".fif",
datatype=cfg.datatype,
root=cfg.deriv_root,
check=False,
)
# %%

0 comments on commit 9804d6b

Please sign in to comment.