# simulate artefact-free continuous EEG data

**URL:** <https://mne.discourse.group/t/simulate-artefact-free-continuous-eeg-data/1631>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [October 4, 2018, 1:20pm UTC](https://mne.discourse.group/t/simulate-artefact-free-continuous-eeg-data/1631 "2018-10-04T13:20:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 4, 2018, 1:20pm UTC](https://mne.discourse.group/t/simulate-artefact-free-continuous-eeg-data/1631/1 "2018-10-04T13:20:53Z")

</div>

External Email - Use Caution

Dear MNE community,  
Is there a simple way to simulate clean resting-state EEG data with N  
electrodes?

Kind regards,  
Davide Aloi.  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20181004/63c297f9/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20181004/63c297f9/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 4, 2018, 1:24pm UTC](https://mne.discourse.group/t/simulate-artefact-free-continuous-eeg-data/1631/2 "2018-10-04T13:24:47Z")

</div>

External Email - Use Caution

Hi Davide,

You probably need to specify what feature (oscillation, 1/f spectrum etc)  
you precisely want to simulate.

Else you you can check this:  
[https://martinos.org/mne/dev/auto\_examples/io/plot\_objects\_from\_arrays.html](https://martinos.org/mne/dev/auto_examples/io/plot_objects_from_arrays.html)

Hope that helps

JR

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 4, 2018, 1:36pm UTC](https://mne.discourse.group/t/simulate-artefact-free-continuous-eeg-data/1631/3 "2018-10-04T13:36:47Z")

</div>

External Email - Use Caution

Thank you JR King.  
I want to calculate some functional connectivity measures and assess the  
effect of electrodes interpolation on these measures.  
What approach would you suggest?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 4, 2018, 1:48pm UTC](https://mne.discourse.group/t/simulate-artefact-free-continuous-eeg-data/1631/4 "2018-10-04T13:48:57Z")

</div>

External Email - Use Caution

Check the mne.simulation module:  
[https://martinos.org/mne/stable/auto\_examples/simulation/plot\_simulate\_raw\_data.html](https://martinos.org/mne/stable/auto_examples/simulation/plot_simulate_raw_data.html)

This shows how to create random sources and retrieve MEG signals.

Note that it may not be the most matured part of MNE, so... good luck 😉  
JR

JR

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 4, 2018, 2:00pm UTC](https://mne.discourse.group/t/simulate-artefact-free-continuous-eeg-data/1631/5 "2018-10-04T14:00:58Z")

</div>

Please modify the data\_fun function in  
[https://martinos.org/mne/stable/auto\_examples/simulation/plot\_simulate\_raw\_data.html](https://martinos.org/mne/stable/auto_examples/simulation/plot_simulate_raw_data.html)  
And create secnarios of different statistical dependencies between the  
four sources, like same or different phase betwen them.

Since electrode interpolation introduce zero lag connectivity, I think  
connectivity metrics like phase locking which are sensitive to zerolag  
will be effected more in comparsion to metrics like imaginary coherence  
which are insensitive to zero lag.

Hope this help

Sheraz
