Skip to content
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

set maxwell ignore_ref parameter #1058

Open
harrisonritz opened this issue Feb 23, 2025 · 3 comments
Open

set maxwell ignore_ref parameter #1058

harrisonritz opened this issue Feb 23, 2025 · 3 comments

Comments

@harrisonritz
Copy link

Request to add mf_ignore_ref to the list of Maxwell parameters (refer to maxwell docs).

Wasn't clear how to add new parameters to the config.
Tried this below, but mf_ignore_ref isn't getting added to the config file.
The error message was: 'types.SimpleNamespace' object has no attribute 'mf_ignore_ref'
Would love pointers on this so I can customize further.

added mf_ignore_ref = True to my config.

added to _config.py:

mf_ignore_ref: bool = False
"""
Ignore reference channels in Maxwell filtering.

???+ example "Example"
    ```python
    mf_ignore_ref = True
    ```
"""

added to _01_data_quality.py:

(
        auto_noisy_chs,
        auto_flat_chs,
        auto_scores,
    ) = mne.preprocessing.find_bad_channels_maxwell(
        raw=raw_filt,
        calibration=cfg.mf_cal_fname,
        cross_talk=cfg.mf_ctc_fname,
        origin=cfg.mf_head_origin,
        ignore_ref=cfg.mf_ignore_ref,
        coord_frame="head",
        return_scores=True,
        h_freq=None,  # we filtered manually above
    )
Copy link

welcome bot commented Feb 23, 2025

Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴🏽‍♂️

@drammock
Copy link
Member

Does #1038 cover your use case?

@harrisonritz
Copy link
Author

not quite. It doesn't cover find_bad_channels_maxwell in _01_data_quality.py. However, it does show me the last step to adding parameters (using the get_config functions within each preprocessing step).

dumb question: mf_extra_kws is not yet available in the conda-forge release. Can I still access the CLI from a cloned version of the repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants