Skip to content
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

Open
wants to merge 40 commits into
base: main
Choose a base branch
from
Open

sequence #83

wants to merge 40 commits into from

Conversation

behinger
Copy link
Member

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)

  • unit-tests

UniformOnset(offset = 10, width = 100),
NoNoise(),
)
lines(data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
lines(data)
lines(data)

axislegend(ax)
f

# Voila - the inter-onset intervals are `20` samples longer for condition `B`, exactly as specified.`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
# 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
Base.size(design::SubselectDesign) = size(generate_events(design), 1)
Base.size(design::SubselectDesign) = size(generate_events(design), 1)

Comment on lines +177 to +178


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

src/sequence.jl Outdated
@info str
end
return rand_re(Automa.compile(RE(str)))
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
end
end

Copy link

codecov bot commented Feb 25, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 79 lines in your changes are missing coverage. Please review.

Project coverage is 64.85%. Comparing base (75e86a1) to head (7114cd6).
Report is 1 commits behind head on main.

Files Patch % Lines
src/component.jl 55.17% 26 Missing ⚠️
src/onset.jl 12.00% 22 Missing ⚠️
src/design.jl 35.48% 20 Missing ⚠️
src/sequence.jl 83.33% 5 Missing ⚠️
src/simulation.jl 61.53% 5 Missing ⚠️
src/predefinedSimulations.jl 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

lines(data)
vlines!(evts.latency, color = (:gray, 0.5))
xlims!(0, 500)
current_figure()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
) = 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
@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)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that most likely this line leads to severe issues in deconvolution, because then the inter-trial-interval is fixed instead of having a jitter!

grafik

axislegend(ax)
f

# Voila - the inter-onset intervals are `20` samples longer for condition `B`, exactly as specified.`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
# 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.`

Comment on lines +181 to +182


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
@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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
# 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
) = size(generate_events(design), 1)
) = size(generate_events(design), 1)

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