-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
52 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from dataclasses import dataclass | ||
|
||
@dataclass | ||
class TrialParams: | ||
""" | ||
Encapsulates parameters for defining trials in EEG experiments. | ||
This dataclass provides a structured way to define and manage trial-specific | ||
parameters, particularly timing information, for EEG studies. It's designed | ||
to be flexible enough for use in various experimental paradigms, including | ||
but not limited to event-related designs. | ||
Attributes: | ||
iti (float): Inter-Trial Interval, in seconds. The base time between | ||
the end of one trial and the beginning of the next. | ||
jitter (float): Maximum random time, in seconds, added to the ITI. | ||
Used to prevent anticipatory responses and increase | ||
design efficiency in event-related paradigms. | ||
soa (float): Stimulus On Arrival, in seconds. The duration the | ||
stimulus is shown for until the trial ends. | ||
n_trials (int): The total number of trials in the experiment. | ||
Example: | ||
# Create parameters 1s ITI, up to 0.2s jitter, and 0.5s SOA for 100 trials. | ||
params = TrialParams(iti=1.0, jitter=0.2, soa=0.5, n_trials=100) | ||
""" | ||
|
||
iti: float | ||
jitter: float | ||
soa: float | ||
n_trials: int |