3
views
0
recommends
+1 Recommend
0 collections
    0
    shares
      • Record: found
      • Abstract: found
      • Article: found
      Is Open Access

      Ratcave: A 3D graphics python package for cognitive psychology experiments

      research-article
      ,
      Behavior Research Methods
      Springer US
      3D graphics, Python, Stimulus software, Vision, 3D

      Read this article at

      Bookmark
          There is no author summary for this article yet. Authors can add summaries to their articles on ScienceOpen to make them more accessible to a non-specialist audience.

          Abstract

          We present here a free, open source Python 3D graphics library called Ratcave that extends existing Python psychology stimulus software by allowing scientists to load, display, and transform 3D stimuli created in 3D modeling software. This library makes 3D programming intuitive to new users by providing 3D graphics engine concepts (Mesh, Scene, Light, and Camera classes) that can be manipulated using an interface similar to existing 2D stimulus libraries. In addition, the use of modern OpenGL constructs by Ratcave helps scientists create fast, hardware-accelerated dynamic stimuli using the same intuitive high-level, lightweight interface. Because Ratcave supplements, rather than replaces, existing Python stimulus libraries, scientists can continue to use their preferred libraries by simply adding Ratcave graphics to their existing experiments. We hope this tool will be useful both as a stimulus library and as an example of how tightly-focused libraries can add quality to the existing scientific open-source software ecosystem.

          Electronic supplementary material

          The online version of this article (10.3758/s13428-019-01245-x) contains supplementary material, which is available to authorized users.

          Related collections

          Most cited references3

          • Record: found
          • Abstract: found
          • Article: not found

          Vision Egg: an Open-Source Library for Realtime Visual Stimulus Generation

          Modern computer hardware makes it possible to produce visual stimuli in ways not previously possible. Arbitrary scenes, from traditional sinusoidal gratings to naturalistic 3D scenes can now be specified on a frame-by-frame basis in realtime. A programming library called the Vision Egg that aims to make it easy to take advantage of these innovations. The Vision Egg is a free, open-source library making use of OpenGL and written in the high-level language Python with extensions in C. Careful attention has been paid to the issues of luminance and temporal calibration, and several interfacing techniques to input devices such as mice, movement tracking systems, and digital triggers are discussed. Together, these make the Vision Egg suitable for many psychophysical, electrophysiological, and behavioral experiments. This software is available for free download at visionegg.org.
            Bookmark
            • Record: found
            • Abstract: found
            • Article: not found

            Expyriment: a Python library for cognitive and neuroscientific experiments.

            Expyriment is an open-source and platform-independent lightweight Python library for designing and conducting timing-critical behavioral and neuroimaging experiments. The major goal is to provide a well-structured Python library for script-based experiment development, with a high priority being the readability of the resulting program code. Expyriment has been tested extensively under Linux and Windows and is an all-in-one solution, as it handles stimulus presentation, the recording of input/output events, communication with other devices, and the collection and preprocessing of data. Furthermore, it offers a hierarchical design structure, which allows for an intuitive transition from the experimental design to a running program. It is therefore also suited for students, as well as for experimental psychologists and neuroscientists with little programming experience.
              Bookmark
              • Record: found
              • Abstract: found
              • Article: not found

              A Primer of Visual Stimulus Presentation Software

              The visual system has been the most widely studied sensory system in neuroscience during the last decades. A reliable and flexible visual stimulus presentation tool is one of the most important prerequisites for a thorough analysis of its sensory processing characteristics. While almost all sensory systems labs have created some home-grown solutions, these are not easily transferable from one lab to another or from one presentation platform to another. In addition, several stimuli are hard to generate with the desired accuracy in timing, color and luminance, 3D rendering or stereopsis. Vision Egg (Straw, 2008) is a more widely used software library, designed originally to probe the visual system of the fly. It is an open source and platform-independent software package built on top of Python (as the programming language) and OpenGL (for graphics instructions). For a well versed programmer, Vision Egg achieves its goals very well, providing a powerful and highly optimized system for visual stimulus presentation and interactions with hardware – including the ability to run experiments remotely across a network (via TCP/IP). While historically the Vision Egg software strongly adheres to an object-oriented model of programming this can be hard to understand for relatively inexperienced programmers. For instance, the temporal control of experiments in Vision Egg is predominantly through the use of presentation loops, whereby the user sets an object to run for a given length of time, attaches stimuli to it, assigns it to a screen, and then tells the object to “go”. This “mainloop-and-callback” mechanism of flow control has advantages where stimuli continue to run between trials. The alternative, however, of an explicit sequence of control statements can also be implemented (see Figure 2 of Straw, 2008). Table 1 (adapted from Peirce, 2007) gives a comparison of various features of four well known stimulus presentation programs. Two of these (Vision Egg and PsychoPy) have very similar philosophies, are both implemented in Python, and differed originally in their low-latency real-time capabilities. The most substantive differences between them today are that Vision Egg offers relatively simple perspective corrected stimuli utilizing the 3D nature of OpenGL, while PsychoPy has an automated luminance calibration utility and interfaces more easily with certain types of hardware. Furthermore, the primary development platform of the Vision Egg is GNU/Linux, while it appears to be Windows for PsychoPy. Table 1 Comparison of several frequently used software packages for visual stimulus presentation. Vision Egg PsychoPy Psychtoolbox Presentation Full source code ✓✓ ✓✓ ✓ (None for Matlab) – Platform independent ✓✓ ✓✓ ✓✓ – Usability ✓ ✓✓ ✓✓ ✓✓ Automated calibration – ✓✓✓ ✓ – Stimuli in realtime ✓✓ ✓✓ ✓ – Hardware interfaces ✓✓ ✓✓ ✓✓ ✓✓ Community size ✓✓ ✓✓ ✓✓ ✓✓ Free ✓✓ (Python, OpenGL) ✓ (Python) ✓ (Requires Matlab) – Another interesting issue discussed shortly in Straw's paper is the feasibility of setting up a stimulus library in form of a database that could be downloaded and used with different presentation environments. As everyone who has developed databases knows, there is more involved in such a project than just storing bitmaps (or sequences thereof) of a standard number of pixels. For example, the issues of frame rate, display luminance and position calibration, and synchronization with data acquisition and other hardware would all need to be addressed. Even further, the creation of a universal language for specifying sensory stimuli would be of great interest. Altogether this paper by Straw on the Vision Egg gives a fairly technical account of many relevant hardware and software considerations, but is nevertheless a well readable primer of considerations when deciding on what visual stimulus software to choose or extend.
                Bookmark

                Author and article information

                Contributors
                +49 (0)89 2180-74805 , sirota@biologie.uni-muenchen.de
                Journal
                Behav Res Methods
                Behav Res Methods
                Behavior Research Methods
                Springer US (New York )
                1554-351X
                1554-3528
                6 May 2019
                6 May 2019
                2019
                : 51
                : 5
                : 2085-2093
                Affiliations
                GRID grid.5252.0, ISNI 0000 0004 1936 973X, Bernstein Centre for Computational Neuroscience, Graduate School of Systemic Neurosciences, Faculty of Medicine, , Ludwig-Maximillians-Üniversität München, ; Großhaderner Straße 2, 82152 Planegg, Germany
                Article
                1245
                10.3758/s13428-019-01245-x
                6797704
                31062192
                7b24a847-a6b9-47b7-ae3f-9a25e920f865
                © The Author(s) 2019

                Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License ( http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

                History
                Categories
                Article
                Custom metadata
                © The Psychonomic Society, Inc. 2019

                Clinical Psychology & Psychiatry
                3d graphics,python,stimulus software,vision,3d
                Clinical Psychology & Psychiatry
                3d graphics, python, stimulus software, vision, 3d

                Comments

                Comment on this article