Beispiel #1
0
"""load calibration file and make transformations"""

info = rgb2sml_plus.openfile().splitlines()

calibinfo = info[0:2] + info[7:17]

calib = rgb2sml_plus.calibration(rgb2sml_plus.openfile())  # Load the parameters of the calibration file

transf = rgb2sml_plus.transformation(calib.A0(),
                                     calib.AMatrix(),
                                     calib.Gamma())  # Creates an object transf that has as methods all the needed transformations

gray_level = 0.66  # this is determined from the calibration file (rgb2lms)

# get the gray color in the center of the color space
ColorPicker = colorpalette_plus.ColorPicker(unit='rad')
Csml = ColorPicker.Csml
Crgb = ColorPicker.Crgb

win = visual.Window(unit='pix', size=[1200, 1200], allowGUI=True, colorSpace="rgb255", color=Crgb, fullscr=True)



"""main function: isoslant"""

def isoslant(c, r):


    def isodata(theta, numStim, shownum, lim=0.02, refresh=60):
        # baseC: basic color angle (picked from the color circle)
        # lim: the limit of luminance contrast you can reach; for scaling the mouse movement; or understood as mouse gain  <------------- can be adjusted
Beispiel #2
0
def color4plot(num):
    _, colorcodes = colorpalette_plus.ColorPicker().circolors(numStim=num)
    return [x / 255 for x in colorcodes]