-
Notifications
You must be signed in to change notification settings - Fork 12
Bilateral beamformer #426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Bilateral beamformer #426
Conversation
|
Looking good so far @woolrich. Can you add an example or FAQ to guide the user regarding parameter settings? Do you have some minimal code for us to test the functions? |
I pasted some example code in the first comment above. Wrt "an example", where would you recommend putting that? |
|
Added patch beamformer Example call: config = """ |
Added bilateral beamformer
Changed bem_display to show bilateral pairs
Changed bem_display to be a pass through call to coreg_display
Changed Beamformer report to include a bem_display
Some docs might need additional updating to make folks aware of existence of bilateral beamformer
Example run using Wakeman Henson:
import os.path as op
from osl_ephys import utils, source_recon, preprocessing
from osl_ephys.source_recon import beamforming, parcellation
setup dirs
data_dir = '/Users/woolrich/yale_workshop/3.SourceRecon/wake_hen'
recon_dir = op.join(data_dir, "recon")
out_dir = op.join(data_dir, "recon", "glm")
sub_name = "sub{sub_num}"
smri_files_path = op.join(data_dir, sub_name, "anatomy", "highres001.nii.gz")
smri_files = utils.Study(smri_files_path).get()
fif files
subject = "{subject}"
preproc_fif_files_path = op.join(data_dir, subject + "_meg", subject + "_meg_preproc_raw.fif")
preproc_fif_files = utils.Study(preproc_fif_files_path)
subjects = preproc_fif_files.fields['subject']
preproc_fif_files = preproc_fif_files.get()
config = """
source_recon:
- extract_polhemus_from_info: {}
- compute_surfaces:
include_nose: false
- coregister:
use_nose: false
use_headshape: false
- forward_model:
model: Single Layer
gridstep: 10
- beamform_and_parcellate:
freq_range: [3, 20]
chantypes: [mag, grad]
rank: {meg: 55}
use_bilateral_pairs: True
bilateral_tol: 5
parcellation_file: Glasser52_binary_space-MNI152NLin6_res-8x8x8.nii.gz
method: spatial_basis
orthogonalisation: None
"""
Run source batch
source_recon.run_src_batch(
config,
outdir=recon_dir,
subjects=subjects,
preproc_files=preproc_fif_files,
smri_files=smri_files,
)