PiVR has been developed by David Tadres and Matthieu Louis (Louis Lab).
10. PiVR software documentation
INCOMPLETE, WORK IN PROGRESS You can find the source code here: https://gitlab.com/LouisLab/pivr
10.1. PiVR GUI source code
This page contains the classes used to construct the graphical user interface (GUI).
- class start_GUI.PiVR(*args, **kwargs)[source]
This class initializes the GUI the user will see. There are several different frames (e.g. “Tracking” vs “Virtual Arena”) that are all created differently.
To do this, the “PiVR” class calls a number of other classes. To help with this the following three “helper” classes are important:
“CommonVariables” contains variables that are true between frames,
“SubFrames” helps with the creation of the different frames and finally
“CommonFunction” which contains functions that are called in different frames.
The actual frames (e.g. “TrackingFrame”) are then created by “constructor” classes which call different components of the three classes described above.
The “helper” classes are necessary as they can save variables and functions between different frames (similar to global variables). For example, if the user would select at particular folder to save all the experimental data, the “CommonVariables” class saves this folder when the user is then switching from, for example, the “Tracking” frame to the “Virtual Arena” frame.
- access_subframes(page_name)[source]
The function above returns the instance of the currently active (=in foreground) window
- call_start_experiment_function(page_name)[source]
The function above will be called by the button that says ‘start experiment’. It will look in the currently active frame for a function called ‘start_experiment_function’.
- show_frame(page_name)[source]
The function above is called when the user presses on a different frame. It takes the selected frame and raises it to the top.
In addition, it saves the current page name which is needed to pass around as a reference to the currently active frame when calling functions that are generally called, such as starting an experiment!