spiketools.utils.trials.split_trials_by_condition¶
- spiketools.utils.trials.split_trials_by_condition(trials, conditions)[source]¶
Split trial data by condition label.
- Parameters:
- trialslist or 2d array
Trial data. If list, each element should represent a trial. If array, each row should represent a trial.
- conditionslist
Condition labels for each trial.
- Returns:
- split_trialsdict
The trial data, organized by condition. Each key is a condition label with values as the data for that condition.