- 
                Notifications
    You must be signed in to change notification settings 
- Fork 7
OnsetFormulas, Sequences, and Component Functions - v0.4.0 -> actually v0.5.0 #104
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
Co-authored-by: Judith Schepers <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ShiftOnsetByOne
| ) | ||
| ) | 
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 🐶
| ) | |
| ) | |
| ), | |
| ), | 
| # 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.
[JuliaFormatter] reported by reviewdog 🐶
| onsets[stepsize+1:stepsize:end] .+= 2 .* maxlength(simulation.components) | |
| onsets[(stepsize+1):stepsize:end] .+= 2 .* maxlength(simulation.components) | 
Co-authored-by: Judith Schepers <[email protected]>
…more comments to the code
…_continuoustime calculation
…tion of component offsets and sequences
…tead of a vector and adapt tests and max length continuoustime accordingly
Co-authored-by: Judith Schepers <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
| comb = vcat(gt_effects, ef) | ||
| plot_erp(comb; mapping = (; color = :type, col = :condition)) | ||
|  | ||
| # The simulated ground truth marginal effects, and the fitted marginal effects look similar as expected, but the fitted has some additional noise because of finite data (also as expected). No newline at end of file | 
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 🐶
| # The simulated ground truth marginal effects, and the fitted marginal effects look similar as expected, but the fitted has some additional noise because of finite data (also as expected). | |
| # The simulated ground truth marginal effects, and the fitted marginal effects look similar as expected, but the fitted has some additional noise because of finite data (also as expected). | |
| 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. | |
| off = get_offset(component) - minoffset(simulation.components) | ||
|  | ||
|  | ||
| @views epoch_data[1+off:length(component)+off, :] .+= | 
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 🐶
| @views epoch_data[1+off:length(component)+off, :] .+= | |
| @views epoch_data[(1+off):(length(component)+off), :] .+= | 
| @debug "3D Array" | ||
| @views epoch_data[:, 1:length(c), :] .+= simulate_component(rng, c, simulation) | ||
| off = get_offset(component) - minoffset(simulation.components) | ||
| @views epoch_data[:, 1+off:length(component)+off, :] .+= | 
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 🐶
| @views epoch_data[:, 1+off:length(component)+off, :] .+= | |
| @views epoch_data[:, (1+off):(length(component)+off), :] .+= | 
| o.offset_β | ||
|  | ||
| return Int.( | ||
| round.(reduce(vcat, rand.(deepcopy(rng), range.(offsets, offsets .+ widths), 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 🐶
| round.(reduce(vcat, rand.(deepcopy(rng), range.(offsets, offsets .+ widths), 1))) | |
| round.(reduce(vcat, rand.(deepcopy(rng), range.(offsets, offsets .+ widths), 1))), | 
| e, | ||
| s, | ||
| one_onset:one_onset+max_length_component-1, | ||
| one_onset+minoffset(simulation.components):one_onset+max_length_component-1+maxoffset( | 
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 🐶
| one_onset+minoffset(simulation.components):one_onset+max_length_component-1+maxoffset( | |
| (one_onset+minoffset(simulation.components)):(one_onset+max_length_component-1+maxoffset( | 
| one_onset:one_onset+max_length_component-1, | ||
| one_onset+minoffset(simulation.components):one_onset+max_length_component-1+maxoffset( | ||
| 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.
[JuliaFormatter] reported by reviewdog 🐶
| ), | |
| )), | 
        
          
                test/sequence.jl
              
                Outdated
          
        
      | ) | ||
| s, e = simulate(design, c, NoOnset(); return_epoched = true) | ||
| @test size(s) == (40, 6) | ||
| end No newline at end of file | 
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 | |
Co-authored-by: Benedikt Ehinger <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Fix hanning function - include bases.jl tests Closes #122
Allow multiple different components in a sequence
New Features:
SequenceDesignwhich 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