VirtualBrainLab/Glue

Graph specification notes

Closed this issue · 1 comments

https://github.com/jsongraph/json-graph-specification for JSON graph spec format

An experiment is a set of graphs defining the relationships between the StartExperiment event and EndExperiment event. An experiment consists of recursive experiments or blocks of trials. A block of trials

Graphs

  • ExperimentGraph (StartExperiment -> EndExperiment)
  • BlockGraph (StartBlockA -> EndBlockA)
  • TrialGraph (StartTrialA -> EndTrialA, also Update->, LateUpdate->, FixedUpdate->)

An ExperimentGraph defines a full experiment, and can include instructions, blocks of trials, etc. A BlockGraph defines a set of trials. Usually a set of variables will be initialized at the start of the block. The TrialGraph defines what happens within each trial and how the trial ends. Within the TrialGraph the Update nodes allow you to evaluate logic on every frame.

Nodes

Inside of the graphs are nodes which define the logic of the experiment.

Objects

Objects include 2D and 3D stimuli that are visible (or invisible) in the scene. Objects have properties:

Object properties

All objects have an on/off property and transform (position, rotation, scale, parent) and then custom properties depending on their type. The gabor, for example, would have a spatial frequency, sigma, and contrast.

The active main camera is also an object and can be manipulated as well.

Input

Input nodes receive input from the keyboard, mouse, and controllers.

Logic

Logic nodes check if something is true about a variable and then generate a boolean

Time

Time nodes check the elapsed time since some event.

Math

Math nodes do calculations and conversions.

I/O

SerialPort, Socket, and ZeroMQ nodes allow you to communicate with other local and remote servers and push and pull information to them.

Variables

In your graphs you'll be defining variables. Under the hood, the variables are stored in a VariableManager global class that everybody has access to. All variables are held in dictionaries and accessed via strings. When a graph is initialized, pointers are created to variables whenever possible to minimize overhead.