-
Notifications
You must be signed in to change notification settings - Fork 7
Artifacts: Eye movements, power line noise #165
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
base: main
Are you sure you want to change the base?
Conversation
maanikmarathe
commented
Sep 30, 2025
- Simulation for eye-movement and power line noise artifacts.
- Provide a modified hartmut-eyemodel with spherical eyes and with only eye-sources.
- Provide example EEG-eyetracking data from real dataset.
- Provide an example A-to-Z simulation function containing EEG, artifacts, and noise.
…on for eyemovement sim
behinger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just some thought - internet is crappy, sorry if something got lost
src/simulation.jl
Outdated
| # PLN simulation assumes that the sampling frequency of the final signal is the same as the sampling frequency of the other signals (eeg/artifacts). TODO: declare this more explicitly in the docstring. | ||
|
|
||
| println("Simulating EEG with no noise...") | ||
| eeg_signal,evts = simulate(rng,d,c,o,NoNoise()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be simulate(sim)
src/simulation.jl
Outdated
| println("Simulating EEG with no noise...") | ||
| eeg_signal,evts = simulate(rng,d,c,o,NoNoise()); | ||
|
|
||
| sim_artifacts = [x for x in s if !(x isa PowerLineNoise)] # ignore PLN for now, it is handled separately since it needs to know the length of the final signal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I handled such cases in the past, that a length(x::AbstractContinuousSignal) needs to be defined (e.g. for AbstractComponents - could this be a solution? I dont want any ContinuousSignal be treated "special"
src/simulation.jl
Outdated
| end | ||
|
|
||
| # pad all signals to the same length (max length of all signals) | ||
| max_cols = maximum([size(mat, 2) for mat in combined_signals]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this work? just a tad simpler:
max(size.(combined_signals,2))
src/simulation.jl
Outdated
| println("Simulating EEG with no noise...") | ||
| eeg_signal,evts = simulate(rng,d,c,o,NoNoise()); | ||
|
|
||
| sim_artifacts = [x for x in s if !(x isa PowerLineNoise)] # ignore PLN for now, it is handled separately since it needs to know the length of the final signal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I handled such cases in the past, that a length(x::AbstractContinuousSignal) needs to be defined (e.g. for AbstractComponents - could this be a solution? I dont want any ContinuousSignal be treated "special"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also thinking, if an AbstractConitnuousSignal can be generated with arbitrary length (like powernoise), one could basically return a generator, or a functioncall or whatever to be filled in later, after the "fixed-length" signals have been generated (at that point, you have the maxlength).
This is an alternative to requiring a defined length(x::AbstractcontinuousSignal)
src/simulation.jl
Outdated
| end | ||
|
|
||
| # pad all signals to the same length (max length of all signals) | ||
| max_cols = maximum([size(mat, 2) for mat in combined_signals]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this work? just a tad simpler:
max(size.(combined_signals,2))