agricolab / ARtACS

Matlab modules for removal of periodic artifacts, even when non-stationary and non-sinusoidal. Developed with application for tACS-EEG in mind.
MIT License
1 stars 3 forks source link

Simulated data #2

Closed robertoguarnieri closed 5 years ago

robertoguarnieri commented 5 years ago

Is there a way to create a simulated data (eeg+tAcs stimulation)? Thanks

agricolab commented 5 years ago

Sure, the following snippet should simulate an evoked response overlaid with a strong artifact based on a sinus with some distortion of the waveform, but no saturation. The artifact amplitude is modulated by an Ornstein–Uhlenbeck process.

setup                = generate.generic();
signal = generate.recording(setup);

tweak the setup parameters according to your liking. They are explained somewhat in https://github.com/agricolab/ARtACS/blob/master/src/%2Bgenerate/generic.m generate.random() creates a random setup.

robertoguarnieri commented 5 years ago

Ok, thank you very much.

I applied the method. I generated a simulated signal. After that I correlated the filtered_signal with (noise+sum(echt) assuming that the last one is the signal without tACS artifact.

Hoewver the correlation is about 0.5 (not very high). Why/

Thanks

Kind Regards


Da: Robert Guggenberger notifications@github.com Inviato: lunedì 15 aprile 2019 16:50 A: agricolab/ARtACS Cc: roberto9110; Author Oggetto: Re: [agricolab/ARtACS] Simulated data (#2)

Sure, the following snippet should simulate an evoked response overlaid with a strong artifact based on a sinus with some distortion of the waveform, but no saturation. The artifact amplitude is modulated by an Ornstein–Uhlenbeck process.

setup = generate.generic();

signal = generate.recording(setup);

tweak the setup parameters according to your liking. They are explained somewhat in https://github.com/agricolab/ARtACS/blob/master/src/%2Bgenerate/generic.m generate.random() creates a random setup.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/agricolab/ARtACS/issues/2#issuecomment-483284373, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFeURGa24latoj-AWidBlqanasv88RIkks5vhJHDgaJpZM4cv7qO.

agricolab commented 5 years ago

probably because of residuals of the artifact.

agricolab commented 5 years ago

if you take a look at https://github.com/agricolab/ARtACS/blob/master/img/recovery_ecg.png

you can see that you have a terrible recovery of single trials also for real data.