def test_monitorGetGammaAndGrid():
 newGrid = numpy.array([[0, 150, 2.0], [0, 30, 2.0], [0, 110, 2.0], [0, 10, 2.0]])
 mon = monitors.Monitor('test')
 mon.setGammaGrid(newGrid)
 mon.setGamma([3, 3, 3])
 win = visual.Window([100, 100], monitor=mon, autoLog=False)
 assert numpy.alltrue((win.gamma == numpy.array([2.0, 2.0, 2.0])))

def test_monitorGetGammaAndGrid ( ) : newGrid = numpy . array ( [ [ 0 , 150 , 2.0 ] , [ 0 , 30 , 2.0 ] , [ 0 , 110 , 2.0 ] , [ 0 , 10 , 2.0 ] ] ) mon = monitors . Monitor ( 'test' ) mon . setGammaGrid ( newGrid ) mon . setGamma ( [ 3 , 3 , 3 ] ) win = visual . Window ( [ 100 , 100 ] , monitor = mon , autoLog = False ) assert numpy . alltrue ( ( win . gamma == numpy . array ( [ 2.0 , 2.0 , 2.0 ] ) ) )
test what happens if gamma and gammagrid are both present .