Skip to content

Out Of The Box: What Experiments are available?

JensBlack edited this page Sep 17, 2020 · 2 revisions

This guide explains the different EXPERIMENT modules that DLStream comes with and how to use them.

You can easily build these experiments by designing an experiment. If you have never used DLStream, make sure to check out: Introduction to experiments.

If you are looking for out-of-the-box modules for your next DLStream powered experiment, look no further.

If you want to create custom experiments, we recommend the wiki sections My first experiment and Adapting an existing experiment.

Experiments

BaseConditionalExperiment

Short discription: The BaseConditionalExperiment is a versatile experiment specifically created to allow conditional stimulation. It can be used with any trigger and -if sufficiently configured- is able to automatize stimulation on your device. It comes with the standard parameters:

INTERTRIAL_TIME is the minimum time in seconds between each repetition. Note, that a new event is only triggered when the condition is True.

EXP_LENGTH is the maximum amount of events, before the experiment is stopped, while EXP_TIME is the maximum time in seconds.

BaseConditionalExperiment

Example Config:

[EXPERIMENT]
BASE = BaseConditionalExperiment
EXPERIMENTER = Example

[BaseConditionalExperiment]
TRIGGER = BaseRegionTrigger
PROCESS = BaseProtocolProcess
INTERTRIAL_TIME = 40
EXP_LENGTH = 40
EXP_TIME = 3600

[BaseRegionTrigger]
TYPE = circle
CENTER = 550, 63
RADIUS = 30
BODYPARTS = neck
DEBUG = False

[BaseProtocolProcess]
TYPE = switch
STIMULATION = BaseStimulation

[BaseStimulation]
TYPE = NI
PORT = Dev1/PFI6
STIM_TIME = 3.5

BaseOptogeneticExperiment

Short discription: The BaseOptogeneticExperiment is an experiment specifically created to optogentically stimulate animals based on a conditional trigger (of your choice; e.g. the Callight experiment in our paper). Therefore, it uses same additional parameters, that are not specified in the BaseConditionalExperiment, such as mimumum/maximum stimulation time per event and maximum stimulation time in total.

BaseOptogeneticExperiment

Example Config:

[EXPERIMENT]
BASE = BaseOptogeneticExperiment
EXPERIMENTER = Example

[BaseOptogeneticExperiment]
TRIGGER = BaseRegionTrigger
INTERTRIAL_TIME = 40
MAX_STIM_TIME = 10
MIN_STIM_TIME = 3
MAX_TOTAL_STIM_TIME = 500
EXP_TIME = 3600
PROCESS = BaseProtocolProcess

[BaseRegionTrigger]
TYPE = circle
CENTER = 550, 63
RADIUS = 30
BODYPARTS = neck
DEBUG = False

[BaseProtocolProcess]
TYPE = switch
STIMULATION = BaseStimulation

[BaseStimulation]
TYPE = NI
PORT = Dev1/PFI6
STIM_TIME = 3.5

BaseTrialExperiment

Short discription: The BasTrialExperiment is an experiment specifically created to allow trial/task based experiments. A primary TRIGGER is used to initiate trials/task events in which an animal is presented with a STIMULATION, while a secondary TRIGGER (TRIAL_TRIGGER) is checking if the animal succeeds in a preset time after/during the stimulation (e.g. going to a reward location). It uses several new parameters that are explained below.

TRIAL_NAME is the name of the trial, which will be used to output trial information in the csv file.

TRIAL_TRIGGER is the trigger used within the trial to measure success or reaction during TRIAL_TIME

TRIAL_TIME is the time in seconds that limits the time the animal has to successfully "react" to the stimulus measured by TRIAL_TRIGGER

STIMULUS_TIME is the time in seconds that a STIMULATION is run. This is typically used in combination with BaseStimulation where a stimulation can be turned off and on with a TTL signal.

RESULT_FUNC (any/all) is a function that is used after TRIAL_TIME has passed and decides wheter any TRUE result from the TRIAL_TRIGGER will return as a success or if "all" frames during the time have to be TRUE. In theory this can be adapted to any function, but currently DLStream is only offering the two. Reach out if you are interested in other.

EXP_COMPLETION is the number of successful trials before the experiment ends automatically. Note, that this cannot be higher than the EXP_LENGTH parameter, that limits the total number of trials.

BaseTrialExperiment

[EXPERIMENT]
BASE = BaseTrialExperiment
EXPERIMENTER = Example

[BaseTrialExperiment]
TRIGGER = BaseScreenTrigger
PROCESS = BaseProtocolProcess
INTERTRIAL_TIME = 40
TRIAL_NAME = Trial
TRIAL_TRIGGER = BaseRegionTrigger
TRIAL_TIME = 10
STIMULUS_TIME = 10
RESULT_FUNC = any
EXP_LENGTH = 40
EXP_COMPLETION = 20
EXP_TIME = 6000

[BaseScreenTrigger]
ANGLE = 60
DIRECTION = North
BODYPARTS = nose, neck
DEBUG = False

[BaseProtocolProcess]
TYPE = trial
STIMULATION = ScreenStimulation

[ScreenStimulation]
TYPE = image
STIM_PATH = PATH_TO_IMAGE
BACKGROUND_PATH = PATH_TO_BACKGROUND

[BaseRegionTrigger]
TYPE = circle
CENTER = 550, 63
RADIUS = 30
BODYPARTS = neck
DEBUG = False