Skip to content

Commit

Permalink
fix rng docs
Browse files Browse the repository at this point in the history
  • Loading branch information
behinger committed Nov 28, 2024
1 parent 1966fbe commit fa6f78b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/literate/HowTo/sequence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ using StableRNGs
design = SingleSubjectDesign(conditions = Dict(:condition => ["one", "two"]))
generate_events(design)
# Next we use the `SequenceDesign` and nest our initial design in it. "`SR_`" is code for an "`S`" event and an "`R`" event - only single letter events are supported! The "`_`" is a signal for the Onset generator to generate a bigger pause - no overlap between adjacend "`SR`" pairs
design = SequenceDesign(design, "SR_", StableRNG(1))
generate_events(design)
design = SequenceDesign(design, "SR_")
generate_events(StableRNG(1), design)
# The main thing that happened is that the design was repeated for every event (each 'letter') of the sequence, and an `eventtype` column was added.
# !!! hint
# more advaned sequences are possible as well, like "SR{1,3}", or "A[BC]". Infinite sequences are **not** possible like "AB*".

# Finally, let's repeat the current design 4 times
design = RepeatDesign(design, 4)
generate_events(design)
generate_events(StableRNG(1), design)

# This results in 16 trials that nicely follow our sequence

Expand Down

0 comments on commit fa6f78b

Please sign in to comment.