S470

To import S470, you can either use:

from psychopy_gammasci.gammasci import S470

or, any time after psychopy.plugins.activatePlugins has been called:

from psychopy.hardware.gammasci import S470
class psychopy_gammasci.gammasci.S470(port: str, n_repeat: int = 10, baudrate=38400)[source]

Gamma Scientific flexOptometer S470, S480, S490

You need to connect a S470 to the serial (RS232) port. This class expects a baudrate of 38400, which can be set in the device’s menu.

usage:

phot = S470(port)
lum = phot.getLum()
Parameters:

port: string

the serial port to connect with the photometer. Typically COM1 on Windows and /dev/ttyUSB0 or /dev/ttyS470 on Linux.

n_repeat: int

number of repeated measures to average for getLum

driverFor = ['s470', 's480', 's490']
getLum() float[source]

Return the average luminance of repeated measures.

The number of repetitions is controlled by .n_repeat. The returned luminance is set to .lastLum. This method is required by psychopy.

longName = 'Gamma Scientific S470/S480/S490'
measure(n_measures: int = 1) list[source]

Measure luminances from the serial port.

read_line() str[source]

Read a line from the serial port.


Back to top