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

ENH: allow setting the std parameter using SourceEstimate #67

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

ctrltz
Copy link
Owner

@ctrltz ctrltz commented Jan 28, 2025

No description provided.

@ctrltz ctrltz requested a review from astudenova February 5, 2025 15:32
# vertices of the patch
if isinstance(stds, mne.SourceEstimate):
std = _get_param_from_stc(stds, [(src_idx, vertno)])
patch_stds.append(std.mean())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a misunderstanding. I thought we are populating std from the center of the patch to all other points. Could you clarify this and also under which circumstances the std.mean() could be applied?


def prepare_source_estimate(data, vertices):
vertices = [np.array(el) for el in vertices]
return mne.SourceEstimate(np.array(data), vertices, tmin=0, tstep=0.01)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add subject="fsaverage"

@@ -107,3 +107,8 @@ def prepare_point_source(name, src_idx=0, vertno=0, n_samples=100):
def prepare_patch_source(name, src_idx=0, vertno=[0, 1], n_samples=100):
waveform = np.ones((n_samples,))
return PatchSource(name, src_idx, vertno, waveform)


def prepare_source_estimate(data, vertices):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a useful function. You use the same in dummy. Maybe, it could go to utils.py?

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

Successfully merging this pull request may close these issues.

2 participants