Stimulus Series List

This is to create a stimulus series, by loading parameters from either a csv file, or create a collection within Bonsai. The result is to have something similar to what is discussed in the Grating Series, without the custom nodes for grating stimuli, hence creating a convienient workflow from scratch. Similar to the grating stimuli, one can load the stimulus set either from a csv file or a collection. Loading from a csv file, can be generated without any additional nodes. While, the collection route makes it easier to edit the experimental parameters within Bonsai, this requires writing a custom code in C# that we will walk you through below. (you do not really need expertise in C# to be able to modify this for your own stimuli).

Stimulus series from CSV file

This is the workflow called “X” in the examples folder.

Here we start with the workflow at the end of Grating Series, and substitute the CreateGratingTrial & GratingSequence nodes with a CreateObservable group and a Concat:

Within the CreateObservable group:

We create a BehaviourSubject from the inputs to the group, i.e. the outputs of ExpressionTransform

Some of the parameters can be directly mapped to the the externalised properties of the DrawGratings node:

And here is an example where the parameter is converted into the correct units (degrees to radians):

Stimulus series using a collection

This is the workflow called “X” in the examples folder.

Here we start with the workflow from the start of Grating Series, and substitute the GratingSpecification node with a CSharpTransform like this:

and this is an example of the C# code in the extensions folder

Updated: