Skip to content

Source recon group processing (e.g., sign flip) after individual processing #383

@matsvanes

Description

@matsvanes

Currently it is not possible to do sign flipping in the same config as source recon - because it requires that all subjects already have been source localized. Our config structures aim to remove as many layers of scripts as possible, and I think it would be great if we could combine these steps in one config.
I can think of three options:

  1. have a group processing stage, similar to the preprocessing module, e.g.:
config = """
    source_recon:
    - save_polhemus_from_pos: {}
    - fix_headshape_points: {}
    - compute_surfaces:
        include_nose: False
    - coregister:
        use_nose: False
        use_headshape: True
    - forward_model:
        model: Single Layer
    - beamform_and_parcellate:
        freq_range: [1, 45]
        chantypes: mag
        rank: {mag: 120}
        parcellation_file: aal_cortical_merged_8mm_stacked.nii.gz
        method: spatial_basis
        orthogonalisation: symmetric
    group:
    - find_template_subject: {}
    - fix_sign_ambiguity:
        n_embeddings: 15
        standardize: True
        n_init: 3
        n_iter: 2500
        max_flips: 20
"""
  1. Internally, check if sign flipping is in the config, and if so, delay its use till all previous steps have completed. This is probably the least robust way to do it.
  2. Call source_recon twice, e.g.:
config = """
    source_recon:
    - save_polhemus_from_pos: {}
    - fix_headshape_points: {}
    - compute_surfaces:
        include_nose: False
    - coregister:
        use_nose: False
        use_headshape: True
    - forward_model:
        model: Single Layer
    - beamform_and_parcellate:
        freq_range: [1, 45]
        chantypes: mag
        rank: {mag: 120}
        parcellation_file: aal_cortical_merged_8mm_stacked.nii.gz
        method: spatial_basis
        orthogonalisation: symmetric
    source_recon:
    - find_template_subject: {}     
    - fix_sign_ambiguity:
        n_embeddings: 15
        standardize: True
        n_init: 3
        n_iter: 2500
        max_flips: 20
"""

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions