Skip to content

Make projection reconstruction public; allow projector selection; add optional forward/rank control #14208

Description

@BabaSanfour

Describe the new feature or enhancement

  • Promote projection reconstruction (_reconstruct_proj()) to a public method and return the reconstructed numerical data through the normal MNE object API then make the plotting call the same public implementation
  • Allow users to select which projector or projectors to apply.
  • Optionally accept an mne.Forward or explicit lead field and keep forward=None as the current geometry-based MNE method
  • Optionally accept an integer reconstruction rank.

This would be helpful for anyone who wants to use the reconstruction outside of the figure. Projector selection would be useful when info has multiple projections. This will help deduplicate code between mne-python and mne-denoise, easier for maintenance and replication. See content below or mne-denoise issue #32.

Describe your proposed implementation

The API could look like this

reconstructed = evoked.copy().reconstruct_proj(
      projs=selected_projs,
      mode="accurate",
      origin="auto",
  )

or

  reconstructed = evoked.copy().reconstruct_proj(
      projs=selected_projs,
      forward=forward,
      rank=40,
  )

if you provide an explicit field.

Describe possible alternatives

I did not think about one, I will investigate the mne code further and add more details in the discussion.

Additional context

Currently projection reconstruction is private _reconstruct_proj(), accessible only through plotting options (evoked.plot(proj="reconstruct")). It also applies all projectors stored in info. This is linked to the discussion in mne-denoise issue #32 and builds the SSP-SIR and SOUND implementations in mne-denoise PR #46.

Activity

  1. larsoner commented on Aug 25, 2026

    @larsoner
    Member

    I think both of those are okay/reasonable changes, feel free to work on this!

  2. moved this from Ideas to In Progress in 2026 MNE-Python Maintainers Sprinton Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions