PR655

To import PR655, you can either use:

from psychopy_photoresearch.pr import PR655

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

from psychopy.hardware.pr import PR655
class psychopy_photoresearch.pr.PR655(port)[source]

An interface to the PR655/PR670 via the serial port.

example usage:

from psychopy.hardware.pr import PR655
myPR655 = PR655(port)
myPR655.getLum()  # make a measurement
nm, power = myPR655.getLastSpectrum()  # get a power spectrum for the
            last measurement

NB psychopy.hardware.findPhotometer() will locate and return any supported device for you so you can also do:

from psychopy import hardware
phot = hardware.findPhotometer()
print(phot.getLum())
Troubleshooting:

If the device isn’t responding try turning it off and turning it on again, and/or disconnecting/reconnecting the USB cable. It may be that the port has become controlled by some other program.

driverFor = ['pr655', 'pr670']
endRemoteMode()[source]

Puts the colorimeter back into normal mode

getDeviceSN()[source]

Return the device serial number

getDeviceType()[source]

Return the device type (e.g. ‘PR-655’ or ‘PR-670’)

getLastColorTemp()[source]

Fetches (from the device) the color temperature (K) of the last measurement

Returns:

list: status, units, exponent, correlated color temp (Kelvins), CIE 1960 deviation

See also:

measure() automatically populates pr655.lastColorTemp with the color temp in Kelvins

getLastLum()

This retrieves the luminance (in cd/m**2) from the last call to .measure()

getLastSpectrum(parse=True)[source]

This retrieves the spectrum from the last call to measure()

If parse=True (default):

The format is a num array with 100 rows [nm, power]

otherwise:

The output will be the raw string from the PR650 and should then be passed to parseSpectrumOutput(). It’s more efficient to parse R,G,B strings at once than each individually.

getLastTristim()[source]

Fetches (from the device) the last CIE 1931 Tristimulus values

Returns:

list: status, units, Tristimulus Values

See also:

measure() automatically populates pr655.lastTristim with just the tristimulus coordinates

getLastUV()[source]

Fetches (from the device) the last CIE 1976 u,v coords

Returns:

list: status, units, Photometric brightness, u, v

See also:

measure() automatically populates pr655.lastUV with [u,v]

getLastXY()[source]

Fetches (from the device) the last CIE 1931 x,y coords

Returns:

list: status, units, Photometric brightness, x,y

See also:

measure() automatically populates pr655.lastXY with [x,y]

getLum()

Makes a measurement and returns the luminance value

getSpectrum(parse=True)

Makes a measurement and returns the current power spectrum

If parse=True (default):

The format is a num array with 100 rows [nm, power]

If parse=False (default):

The output will be the raw string from the PR650 and should then be passed to .parseSpectrumOutput(). It’s slightly more efficient to parse R,G,B strings at once than each individually.

longName = 'PR655/PR670'
measure(timeOut=30.0)[source]

Make a measurement with the device.

This automatically populates:

  • .lastLum

  • .lastSpectrum

  • .lastCIExy

  • .lastCIEuv

parseSpectrumOutput(rawStr)[source]

Parses the strings from the PR650 as received after sending the command ‘D5’. The input argument “rawStr” can be the output from a single phosphor spectrum measurement or a list of 3 such measurements [rawR, rawG, rawB].

sendMessage(message, timeout=0.5, DEBUG=False)

Send a command to the photometer and wait an allotted timeout for a response (Timeout should be long for low light measurements)

startRemoteMode()[source]

Sets the Colorimeter into remote mode


Back to top