-
Notifications
You must be signed in to change notification settings - Fork 4
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
OnsetFormulas, Sequences, and Component Functions - v0.4.0 #104
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Benedikt Ehinger <[email protected]>
Co-authored-by: Benedikt Ehinger <[email protected]>
xlims!(0, 500) | ||
current_figure() | ||
|
||
# As visible, the `R` response always follows the `S` response. Due to the "`_`" we have large breaks between the individual sequences. |
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.
[JuliaFormatter] reported by reviewdog 🐶
# As visible, the `R` response always follows the `S` response. Due to the "`_`" we have large breaks between the individual sequences. | |
# As visible, the `R` response always follows the `S` response. Due to the "`_`" we have large breaks between the individual sequences. |
axislegend(ax) | ||
f | ||
|
||
# Voila - the inter-onset intervals are `20` samples longer for condition `B`, exactly as specified.` |
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.
[JuliaFormatter] reported by reviewdog 🐶
# Voila - the inter-onset intervals are `20` samples longer for condition `B`, exactly as specified.` | |
# Voila - the inter-onset intervals are `20` samples longer for condition `B`, exactly as specified.` |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #104 +/- ##
===========================================
- Coverage 72.70% 61.86% -10.84%
===========================================
Files 10 11 +1
Lines 359 535 +176
===========================================
+ Hits 261 331 +70
- Misses 98 204 +106 ☔ View full report in Codecov by Sentry. |
|
||
|
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.
[JuliaFormatter] reported by reviewdog 🐶
@@ -62,7 +67,8 @@ function basis_shiftduration(evts, maxlength) | |||
end | |||
|
|||
# ## Simulate data with the new component type | |||
erp = UnfoldSim.simulate( | |||
erp = UnfoldSim.simulate_component( | |||
|
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.
[JuliaFormatter] reported by reviewdog 🐶
@@ -40,7 +40,9 @@ design_single_shuffled = SingleSubjectDesign(; | |||
:stimulus_type => ["natural", "artificial"], | |||
:contrast_level => range(0, 1, length = 3), | |||
), | |||
|
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.
[JuliaFormatter] reported by reviewdog 🐶
event_order_function = shuffle, | ||
|
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.
[JuliaFormatter] reported by reviewdog 🐶
@@ -46,11 +46,15 @@ makedocs(; | |||
"Overview: Noise types" => "./generated/reference/noisetypes.md", | |||
], | |||
"HowTo" => [ | |||
|
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.
[JuliaFormatter] reported by reviewdog 🐶
"Get multiple trials with identical subject/item combinations" => "./generated/HowTo/repeatTrials.md", | ||
"Define a new component (with variable duration and shift)" => "./generated/HowTo/newComponent.md", | ||
"Generate multi channel data" => "./generated/HowTo/multichannel.md", | ||
"Use existing experimental designs & onsets in the simulation" => "./generated/HowTo/predefinedData.md", | ||
"Produce specific sequences of events" => "./generated/HowTo/sequence.md", | ||
|
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.
[JuliaFormatter] reported by reviewdog 🐶
SequenceDesign{T}(d, s, sl) where {T<:AbstractDesign} = | ||
new(d, check_sequence(s), sl) |
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.
[JuliaFormatter] reported by reviewdog 🐶
SequenceDesign{T}(d, s, sl) where {T<:AbstractDesign} = | |
new(d, check_sequence(s), sl) | |
SequenceDesign{T}(d, s, sl) where {T<:AbstractDesign} = new(d, check_sequence(s), sl) |
SequenceDesign(design, sequence) = | ||
SequenceDesign(design = design, sequence = sequence) |
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.
[JuliaFormatter] reported by reviewdog 🐶
SequenceDesign(design, sequence) = | |
SequenceDesign(design = design, sequence = sequence) | |
SequenceDesign(design, sequence) = SequenceDesign(design = design, sequence = sequence) |
SequenceDesign(design, sequence) = | ||
SequenceDesign(design = design, sequence = sequence) | ||
|
||
generate_events(rng,design::SequenceDesign{MultiSubjectDesign}) = error("not yet implemented") |
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.
[JuliaFormatter] reported by reviewdog 🐶
generate_events(rng,design::SequenceDesign{MultiSubjectDesign}) = error("not yet implemented") | |
generate_events(rng, design::SequenceDesign{MultiSubjectDesign}) = | |
error("not yet implemented") |
function UnfoldSim.generate_events(rng::AbstractRNG, design::RepeatDesign) | ||
df = map(x -> generate_events(rng, design.design), 1:design.repeat) |> x -> vcat(x...) | ||
|
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.
[JuliaFormatter] reported by reviewdog 🐶
# No way to find out what size it is without actually generating first... | ||
Base.size( | ||
design::Union{<:SequenceDesign,<:SubselectDesign,<:RepeatDesign{<:SequenceDesign}}, | ||
) = size(generate_events(design), 1) |
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.
[JuliaFormatter] reported by reviewdog 🐶
) = size(generate_events(design), 1) | |
) = size(generate_events(design), 1) |
New Features:
SequenceDesign
which allows for fixed sequences e.g. Stimulus - Decision - Response, or Stim - Fix - Fix - Fix etc.@jschepers I think I added unittests for all new features + docstrings + tutorials
commit list