Ejemplo n.º 1
0
from achrolab.calibtubes import CalibTubes
from achrolab.colortable import ColorTable
from achrolab.colorentry import ColorEntry
from achrolab.calibrate import Calibrate

eyeone = EyeOne()

mywin = visual.Window([1024, 1536],
                      monitor='mymon',
                      color=(155, 155, 17),
                      screen=1,
                      colorSpace="rgb255",
                      allowGUI=False)

calibmonitor = CalibMonitor(eyeone, mywin)
calibtubes = CalibTubes(eyeone)

#calibtubes.is_calibrated = True
calibrate = Calibrate(calibmonitor, calibtubes)
colortable = ColorTable()

color1 = ColorEntry("color850",
                    patch_stim_value=eizoGS320.encode_color(850, 850))
color2 = ColorEntry("color600",
                    patch_stim_value=eizoGS320.encode_color(600, 600))
color3 = ColorEntry("color390",
                    patch_stim_value=eizoGS320.encode_color(390, 390))
color4 = ColorEntry("color621",
                    patch_stim_value=eizoGS320.encode_color(621, 621))

## MONITOR
Ejemplo n.º 2
0
from achrolab.eyeone.eyeone import EyeOne
from achrolab.calibtubes import CalibTubes

eyeone = EyeOne()
caltub = CalibTubes(eyeone)
caltub.calibrate(imi=0.5, n=500, each=5)
caltub.saveParameter("tube_calibration_75_absorption.pkl")

Ejemplo n.º 3
0
from achrolab.calibtubes import CalibTubes
from achrolab.eyeone.eyeone import EyeOne
import time
import random

eyeone = EyeOne(dummy=False)
caltub = CalibTubes(eyeone)
caltub.setVoltages((0xFFF, 0xFFF, 0xFFF))


voltages_g = []
xyY_g = []
spectra_g = []
random.seed(4)

for i in range(1):
    # measure_green=caltub.measureOneColorChannel(color="green", n=50, each=1)
    # voltages_g=voltages_g+measure_green[0]
    # xyY_g=xyY_g+measure_green[1]
    # spectra_g=spectra_g+measure_green[2]

    # def fun(self,step, i,n):
    #    return ((0xFFF - step * n)+(step*i))

    def fun(self, step, i, n):
        return random.randint(1024, 4095)

    measure_green = caltub.measureOneColorChannel(color="green", insertfunction=fun, n=5, each=1)

    voltages_g = voltages_g + measure_green[0]
    xyY_g = xyY_g + measure_green[1]
Ejemplo n.º 4
0
from stimuli import eizoGS320

from achrolab.eyeone.eyeone import EyeOne
from achrolab.calibmonitor import CalibMonitor
from achrolab.calibtubes import CalibTubes
from achrolab.colortable import ColorTable
from achrolab.colorentry import ColorEntry
from achrolab.calibrate import Calibrate

eyeone = EyeOne()

mywin = visual.Window([1024,1536], monitor='mymon', color=(155,155,17),
        screen=1, colorSpace="rgb255", allowGUI=False)

calibmonitor = CalibMonitor(eyeone, mywin)
calibtubes = CalibTubes(eyeone)

#calibtubes.is_calibrated = True
calibrate = Calibrate(calibmonitor, calibtubes)
colortable = ColorTable()

color1 = ColorEntry("color850", patch_stim_value=eizoGS320.encode_color(850, 850))
color2 = ColorEntry("color600", patch_stim_value=eizoGS320.encode_color(600, 600))
color3 = ColorEntry("color390", patch_stim_value=eizoGS320.encode_color(390, 390))
color4 = ColorEntry("color621", patch_stim_value=eizoGS320.encode_color(621, 621))

## MONITOR
#calibrate.calibmonitor.startMeasurement()
#calibrate._measureColorEntryMonitor(color1, n=20)
#calibrate._measureColorEntryMonitor(color2, n=20)
#calibrate._measureColorEntryMonitor(color3, n=20)
Ejemplo n.º 5
0
from achrolab.calibtubes import CalibTubes
from achrolab.eyeone.eyeone import EyeOne
import time
import random

eyeone = EyeOne(dummy=False)
caltub = CalibTubes(eyeone)
caltub.setVoltages((0xFFF, 0xFFF, 0xFFF))

voltages_g = []
xyY_g = []
spectra_g = []
random.seed(4)

for i in range(1):
    #measure_green=caltub.measureOneColorChannel(color="green", n=50, each=1)
    #voltages_g=voltages_g+measure_green[0]
    #xyY_g=xyY_g+measure_green[1]
    #spectra_g=spectra_g+measure_green[2]

    #def fun(self,step, i,n):
    #    return ((0xFFF - step * n)+(step*i))

    def fun(self, step, i, n):
        return random.randint(1024, 4095)

    measure_green = caltub.measureOneColorChannel(color="green",
                                                  insertfunction=fun,
                                                  n=5,
                                                  each=1)