synthetic sources with mne.simulation.SourceSimulator

I’m creating synthetic sources with source_simulator = mne.simulation.SourceSimulator(src, tstep=dt, duration=T).
The signals are added via

source_simulator.add_data(label, signal, events)

where signal is a scalar time array. What is the direction of current dipole moment in this case? Can I specify exact direction with 3D vector input?

All the best,
Tomasz

That’s quite important question regarding synthetic sources. Maybe developers may help?

the orientation is coming from the normal to the cortex as specified in the src object.

hope this helps

Alex

1 Like

Thank you Alex!

Where can I find the direction of the normal to the cortex surface? Can it be read from src?

Is there a way to create synthetic sources with arbitrary directions of dipoles?

All the best,
Tomasz

Dear Tomasz!

The complete documentation for the src object can be found here: mne.SourceSpaces — MNE 1.4.2 documentation

You can access the array of locations and directions from the object as: src[hemi]["rr"] for locations and src[hemi]["nn"] for surface normals.

Note that hemi can be 0 (left hemisphere) or 1(right hemisphere), this is correct only for surface source space.

Hope this helps.
Urban

2 Likes

Dear Urban,
thank you, this solved the problem. I hope I can also modify SourceSimulator to obtain arbitrary direction of current dipoles.

All the best,
Tomasz