-
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
sequence #83
base: main
Are you sure you want to change the base?
Conversation
docs/literate/HowTo/sequence.jl
Outdated
UniformOnset(offset = 10, width = 100), | ||
NoNoise(), | ||
) | ||
lines(data) |
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 🐶
lines(data) | |
lines(data) |
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.` |
src/design.jl
Outdated
Base.size(design::RepeatDesign{SequenceDesign{SingleSubjectDesign}}) = | ||
size(design.design) .* design.repeat | ||
|
||
Base.size(design::SubselectDesign) = 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 🐶
Base.size(design::SubselectDesign) = size(generate_events(design), 1) | |
Base.size(design::SubselectDesign) = 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 🐶
src/sequence.jl
Outdated
@info str | ||
end | ||
return rand_re(Automa.compile(RE(str))) | ||
end |
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 🐶
end | |
end |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #83 +/- ##
==========================================
- Coverage 72.70% 64.85% -7.85%
==========================================
Files 10 11 +1
Lines 359 498 +139
==========================================
+ Hits 261 323 +62
- Misses 98 175 +77 ☔ View full report in Codecov by Sentry. |
docs/literate/HowTo/sequence.jl
Outdated
lines(data) | ||
vlines!(evts.latency, color = (:gray, 0.5)) | ||
xlims!(0, 500) | ||
current_figure() |
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 🐶
current_figure() | |
current_figure() |
# 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) |
end | ||
@test length(UnfoldSim.sequencestring(StableRNG(1), "A{10,10}")) == 10 | ||
@test length(UnfoldSim.sequencestring(StableRNG(1), "A{10,10}B")) == 11 | ||
@test length(UnfoldSim.sequencestring(StableRNG(1), "A{10,20}")) >= 10 |
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 🐶
@test length(UnfoldSim.sequencestring(StableRNG(1), "A{10,20}")) >= 10 | |
@test length(UnfoldSim.sequencestring(StableRNG(1), "A{10,20}")) >= 10 |
src/onset.jl
Outdated
# add to every stepsize onset the maxlength of the response | ||
#@debug onsets[stepsize:stepsize:end] | ||
@debug stepsize | ||
onsets[stepsize+1:stepsize:end] .= 2 .* maxlength(simulation.components) |
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.
…d added collapsible setup blocks
Co-authored-by: Benedikt Ehinger <[email protected]>
Co-authored-by: Benedikt Ehinger <[email protected]>
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.` |
|
||
|
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 🐶
end | ||
@test length(UnfoldSim.sequencestring(StableRNG(1), "A{10,10}")) == 10 | ||
@test length(UnfoldSim.sequencestring(StableRNG(1), "A{10,10}B")) == 11 | ||
@test length(UnfoldSim.sequencestring(StableRNG(1), "A{10,20}")) >= 10 |
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 🐶
@test length(UnfoldSim.sequencestring(StableRNG(1), "A{10,20}")) >= 10 | |
@test length(UnfoldSim.sequencestring(StableRNG(1), "A{10,20}")) >= 10 |
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. |
# 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) |
Lot's of things already working.
e.g. 'AAB_', or 'A[AB]'
what is not working yet is 'A{2,4}' - the sequence is parsed correctly but we get an error in allocation for the epochs. still needs to be fixed
check out the docs entrance (still pretty barebone)