Skip to content

Issue: Save outputs of source reconstruction needed to perform source-space analyses #21

@cedricfoucault

Description

@cedricfoucault

Related to #17.

In order to perform analyses of MEG data in source space, we need to use certain outputs from the source reconstruction which are currently not saved by the source reconstruction script. The present issue is to save these outputs so that we can retrieve them in further analysis scripts.

I identified that the following outputs of source reconstruction should be saved.

  1. The Beamformer object. In the current code, this is the object that's returned when we call osl.beamforming.make_lcmv(), which osl's equivalent to mne.beamformer.make_lcmv().

This is the relevant line of the source-recon script:

filters = beamforming.make_lcmv(
 //...

This can be saved directly by calling filters.save() (see Beamformer.save)

We can then use this object to transform sensor-space data into source-space data (see e.g. beamformer.apply_lcmv).

  1. The SourceEstimate objects that correspond to the projection of the MEG channel time series data in sensor space. In the current code, these are the objects obtained when we call beamforming.apply_lcmv(), which osl's equivalent of mne.beamformer.apply_lcmv() / mne.beamformer.apply_lcmv_raw().

These are computed by the following line of the source-recon script:
stc = beamforming.apply_lcmv(data, filters)

These can be saved directly by calling stc.save() (see mne.SourceEstimate.save)

Metadata

Metadata

Assignees

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