Package psychopy :: Package monitors :: Module calibTools
[frames] | no frames]

Module calibTools

source code

Tools to help with calibrations

Version: 1.62.02

Classes
  Photometer
DEPRECATED (v.1.60.00):
  Monitor
Creates a monitor object for storing calibration details.
  GammaCalculator
Class for managing gamma tables
Functions
 
findPR650(ports=None)
DEPRECATED (as of v.1.60.01).
source code
 
makeDKL2RGB(nm, powerRGB)
creates a 3x3 DKL->RGB conversion matrix from the spectral input powers
source code
 
makeLMS2RGB(nm, powerRGB)
Creates a 3x3 LMS->RGB conversion matrix from the spectral input powers
source code
 
getLumSeries(lumLevels=8, winSize=(800, 600), monitor=None, gamma=1.0, allGuns=True, useBits=False, autoMode='auto', stimSize=0.3, photometer=None)
Automatically measures a series of gun values and measures the luminance with a photometer.
source code
 
getLumSeriesPR650(lumLevels=8, winSize=(800, 600), monitor=None, gamma=1.0, allGuns=True, useBits=False, autoMode='auto', stimSize=0.3, photometer='COM1')
DEPRECATED (since v1.60.01): Use :class:`pscyhopy.monitors.getLumSeries()` instead
source code
 
getRGBspectra(stimSize=0.3, winSize=(800, 600), photometer='COM1')
getRGBspectra(stimSize=0.3, winSize=(800,600), photometer='COM1')
source code
 
DACrange(n)
returns an array of n DAC values spanning 0-255
source code
 
getAllMonitors()
Find the names of all monitors for which calibration files exist
source code
 
gammaFun(xx, minLum, maxLum, gamma, eq=1)
Returns gamma-transformed luminance values.
source code
 
gammaInvFun(yy, minLum, maxLum, gamma, eq=1)
Returns inverse gamma function for desired luminance values.
source code
 
strFromDate(date)
Simply returns a string with a std format from a date object
source code
Variables
  haveSerial = False
  DEBUG = False
  oldMonitorFolder = join(os.path.expanduser('~'), '.psychopy2',...
  monitorFolder = '/Users/jwp/.psychopy2/monitors'
  calibFiles = glob.glob('C:\Python24\Lib\site-packages\monitors...
  pr650code = {'00': 'OK', '10': 'Light Low', '18': 'Light Low',...
Function Details

findPR650(ports=None)

source code 
DEPRECATED (as of v.1.60.01). Use :func:`psychopy.hardware.findPhotometer()` instead, which
finds a wider range of devices   

getLumSeries(lumLevels=8, winSize=(800, 600), monitor=None, gamma=1.0, allGuns=True, useBits=False, autoMode='auto', stimSize=0.3, photometer=None)

source code 

Automatically measures a series of gun values and measures
the luminance with a photometer.

:Parameters:

    photometer : a photometer object 
        e.g. a :class:`~psychopy.hardware.pr.PR65` or
        :class:`~psychopy.hardware.minolta.LS100` from hardware.findPhotometer()
    
    lumLevels : (default=8) 
        array of values to test or single value for n evenly spaced test values
    
    gamma : (default=1.0) the gamma value at which to test
    
    autoMode : 'auto' or 'semi'(='auto')
        
        If 'auto' the program will present the screen
        and automatically take a measurement before moving on.
        
        If set to 'semi' the program will wait for a keypress before
        moving on but will not attempt to make a measurement (use this
        to make a measurement with your own device). 
        
        Any other value will simply move on without pausing on each screen (use this to see
        that the display is performing as expected).

getRGBspectra(stimSize=0.3, winSize=(800, 600), photometer='COM1')

source code 
usage:
getRGBspectra(stimSize=0.3, winSize=(800,600), photometer='COM1')
where:
'photometer' could be a photometer object or a serial port name on which a photometer

gammaFun(xx, minLum, maxLum, gamma, eq=1)

source code 

Returns gamma-transformed luminance values. y = gammaFun(x, minLum, maxLum, gamma)

a and b are calculated directly from minLum, maxLum, gamma Parameters:

  • xx are the input values (range 0-255 or 0.0-1.0)

  • params = [gamma, a, b]

  • eq determines the gamma equation used;

    eq==1[default]: yy = a + (b*xx)**gamma eq==2: yy = (a + b*xx)**gamma

gammaInvFun(yy, minLum, maxLum, gamma, eq=1)

source code 

Returns inverse gamma function for desired luminance values. x = gammaInvFun(y, minLum, maxLum, gamma)

a and b are calculated directly from minLum, maxLum, gamma Parameters:

  • xx are the input values (range 0-255 or 0.0-1.0)

  • minLum = the minimum luminance of your monitor

  • maxLum = the maximum luminance of your monitor (for this gun)

  • gamma = the value of gamma (for this gun)

  • eq determines the gamma equation used;

    eq==1[default]: yy = a + (b*xx)**gamma eq==2: yy = (a + b*xx)**gamma


Variables Details

oldMonitorFolder

Value:
join(os.path.expanduser('~'), '.psychopy2', 'monitors')

calibFiles

Value:
glob.glob('C:\Python24\Lib\site-packages\monitors\*.calib')

pr650code

Value:
{'00': 'OK', '10': 'Light Low', '18': 'Light Low', 'OK': '000\r\n'}