Skip to content

Conversation

@maanikmarathe
Copy link
Collaborator

  • 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.

Copy link
Member

@behinger behinger left a 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

# 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());
Copy link
Member

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)

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
Copy link
Member

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"

end

# pad all signals to the same length (max length of all signals)
max_cols = maximum([size(mat, 2) for mat in combined_signals])
Copy link
Member

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))

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
Copy link
Member

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"

Copy link
Member

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)

end

# pad all signals to the same length (max length of all signals)
max_cols = maximum([size(mat, 2) for mat in combined_signals])
Copy link
Member

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))

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