Skip to content

Photocell_and_DIN

Jin Jeon edited this page Nov 1, 2018 · 11 revisions

EGI provides manual specifically for AV device setup:
https://drive.google.com/file/d/0B388xdH0Vxl2VUxEWVRHMzFKUlk/view

You should have completed physical setup of photocell and NetStation DIN setup.

Overview

Photocell measures the change in contrast of color. So, if placed flat, perpendicularly on the stimulus monitor, it will send a digital input signal (DIN) to NetStation. Photocell is an optional device, which is primarily used to provide second-hand measurement for stimuli onset timing.

From page 23:

During testing with the AV Device, stimuli detected by a photocell or speaker are converted from analog to digital form and transmitted to the amplifier as DIN events by way of the DIN patch cable.

There are three DIN lights, with each representing different duration values.

  • DIN1 is for CRT monitors
  • DIN2 is for auditory stimuli
  • DIN3 is for LCD monitors, so we want DIN3. This will be setup in NetStation

AV/Photocell Test

This will guide you through testing if the AV device/photocell is properly connected. The pyns_photocell.py file here simply blinks 5 white rectangles. If you have photocell properly placed on top of the white area, you should be seeing DIN3 event logged in NetStation whenever the square blinks.

  1. Clone the repository if you haven't done so by:
git clone https://github.com/vucml/psychopynetstation.git
  1. Navigate to basic folder and open pyns_photocell.py in PsychoPy

  2. Once the coder view shows the code, you can change Custom Vars section if you want to change duration, number of blinks, etc

  3. Before running the code, make sure you loaded proper acquisition setup, and is turned on

  4. Run the code, and you should see DIN3 marked in the event panel as the white rectangle blinks