Skip to content

SourceData class #14624

Backlog
Backlog

Description

@larsoner

*SourceEstimate has a lot of limitations, especially as we move forward with source data from multiple surfaces, etc. I think it's worth thinking about a new SourceData class (or better name?) that removes some limitations. Potential functionality we'd gain:

  • Store label-ized data and/or vertex-specific data (can be side-by-side)
  • Keep provenance about its type and operations done on it (and therefore whether additional operations are allowed)
  • (Optionally maybe) keep a compact and/or reversible representation of the data (like Kernel param for apply inverse #6609 ?), i.e., picked sensor time courses (or Fourier coeffs, or TFRs) plus an inversion kernel and/or labelizing kernel with on-demand computations
  • Support for time-series manipulations like on Raw (if valid for the given datatypes)
  • Nice plotting functions

And of course we'd want to not lose any functionality, so I/O round-trip etc. should be supported from the start.

I think this is a lot of potential work but remains a pain point. I routinely (re)write custom routines for saving labelized data, and still "source localize" and extract label time courses from np.eye in EvokedArray because of inefficiencies in the current way of doing things.

I thought we wrote about this somewhere already on GitHub but maybe not. Code and ideas from #6290 can be reused / reworked properly as part of this.

Activity

  1. drammock commented on Dec 1, 2026

    @drammock
    Member

    #10721 had some discussion about this (specifically for time-freq). And sourcespace classes were meant to be part of the Spectrum/TFR refactor (3rd bullet on this roadmap item) but that never happened. I'm not finding any other public discussion after a quick search.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions