ClandininLab / flystim

Visual stimulus generator for neuroscience experiments
MIT License
4 stars 2 forks source link

Basic CAVE and self-check capabilities #4

Closed sgherbst closed 5 years ago

sgherbst commented 5 years ago

This PR adds two preliminary features:

  1. Beginnings of VR support for arbitrary 3D objects rendered onto one or more sub-screens, each representing an arbitrary physical screen. This is mostly in flystim/cave.py.
  2. First self-checking test to examine the graphics produced by a stimulus (flystim/tests/test_color_cube.py). This test renders a multi-colored cube onto 3 sub-screens, each representing a different screen and eye position. When run as a self-checking test, the scene is rendered once and returns a PIL Image that is compared against the reference image in flystim/tests/data/color_cube.png. The test can also be manual fashion, which will pop up a Qt window containing the rendered scene (make sure line 42 of the test is uncommented and run directly as "python tests/test_color_cube.py"). In this case, it can be interesting to rotate the cube to get a sense for its volume; this can be done by setting omega to a value other than zero.