osl_ephys.source_recon.minimum_norm =================================== .. py:module:: osl_ephys.source_recon.minimum_norm .. autoapi-nested-parse:: Minimum norm source localization using MNE-Python. Attributes ---------- .. autoapisummary:: osl_ephys.source_recon.minimum_norm.logger Functions --------- .. autoapisummary:: osl_ephys.source_recon.minimum_norm.get_mne_filenames osl_ephys.source_recon.minimum_norm.create_inverse_operator osl_ephys.source_recon.minimum_norm.apply_inverse_operator_surf osl_ephys.source_recon.minimum_norm.apply_inverse_operator_vol osl_ephys.source_recon.minimum_norm.calc_noise_cov osl_ephys.source_recon.minimum_norm.morph_surface Module Contents --------------- .. py:data:: logger :value: None .. py:function:: get_mne_filenames(subjects_dir, subject) Get minimum norm (MNE) filenames. Files will be in subjects_dir/subject/mne :param subjects_dir: Directory containing the subject directories. :type subjects_dir: string :param subject: Subject name. :type subject: string :returns: **filenames** -- A dict of files. :rtype: dict .. py:function:: create_inverse_operator(fwd, data, chantypes, rank, depth, loose, filename) Creates minimum norm (MNE) inverse operator. :param fwd: Forward model. :type fwd: mne forward model or str :param data: Preprocessed data. :type data: mne.io.Raw, mne.Epochs :param chantypes: List of channel types to include. :type chantypes: list :param rank: Rank of the data covariance matrix. :type rank: int :param depth: Depth weighting. :type depth: float :param loose: Loose parameter. :type loose: float :param inv_op_filename: Output filename. :type inv_op_filename: str .. py:function:: apply_inverse_operator_surf(outdir, subject, data, method, lambda2, pick_ori, inverse_operator=None, morph='fsaverage', save=False) Apply previously computed minimum norm inverse solution (surface). :param outdir: Output directory. :type outdir: str :param subject: Subject ID. :type subject: str :param data: Raw or Epochs object. :type data: mne.io.Raw, mne.Epochs :param inverse_operator: Inverse operator. :type inverse_operator: mne.minimum_norm.InverseOperator :param method: Inverse method. "MNE" | "dSPM" | "sLORETA" | "eLORETA". (or "mne" | "dspm" | "sloreta" | "eloreta"). :type method: str :param lambda2: Regularization parameter. :type lambda2: float :param pick_ori: Orientation to pick. :type pick_ori: str :param morph: Morph method, e.g. fsaverage. Can be False. :type morph: bool, str :param save: Save source estimate (default: False). :type save: bool .. py:function:: apply_inverse_operator_vol(outdir, subject, data, method, lambda2, pick_ori='pca', inverse_operator=None, transform=None) Apply previously computed minimum norm inverse solution (volumetric). :param outdir: Output directory. :type outdir: str :param subject: Subject ID. :type subject: str :param data: Raw or Epochs object. :type data: mne.io.Raw, mne.Epochs :param inverse_operator: Inverse operator. :type inverse_operator: mne.minimum_norm.InverseOperator :param method: Inverse method. "MNE" | "dSPM" | "sLORETA" | "eLORETA". (or "mne" | "dspm" | "sloreta" | "eloreta"). :type method: str :param lambda2: Regularization parameter. :type lambda2: float :param pick_ori: Orientation to pick. :type pick_ori: str :param transform: Should we standardise ('ztrans') or de-mean ('demean') the voxel time courses? If None, no transform is applied. :type transform: str, optional :returns: **ts** -- In native MRI space. :rtype: (voxels, time) array .. py:function:: calc_noise_cov(data, data_cov_rank, chantypes) Calculate noise covariance. :param raw: Raw object. :type raw: mne.io.Raw :param data_cov_rank: Rank of the data covariance matrix. :type data_cov_rank: int :param chantypes: List of channel types to include. :type chantypes: list .. py:function:: morph_surface(subjects_dir, subject, src_from, subject_to='fsaverage', src_to=None, spacing=None) Morph source space to another subject's surface. :param subject: Subject ID. :type subject: str :param subjects_dir: Subjects directory. :type subjects_dir: str :param src_from: Original source space. :type src_from: mne.SourceSpaces :param src_to: Destination source space. can be 'fsaverage' or a source space. :type src_to: str, mne.SourceSpaces