Closed catubc closed 3 years ago
Hi Cat, thanks for reaching out.
We recently restructured our code structure, which has generated some inconsistencies in our documentation. I just updated the README of the closed-loop to fix this.
In the "run_eyeloop.py"-file (within the eyeloop dir), import the closed-loop and calibration extractors:
from eyeloop.extractors.closed_loop import ClosedLoop_Extractor
from eyeloop.extractors.calibration import Calibration_Extractor
We'll have to obtain a calibration value for the closed-loop experiment. This is essentially the mean max dilated pupil size. Load the calibrator:
ENGINE.load_extractors(Calibration_Extractor(x=0, y=0, width = 100, height = 100))
Change class arguments to fit your setup. Calibrator should fill the monitor screen entirely.
Run eyeloop
eyeloop
Select the pupil and initiate tracking (press z, then y). This returns a calibration value (saved in file format {time_stamp}._cal_
).
Now, load the closed-loop Extractor and insert this value (found in {time_stamp}._cal_
) as the first parameter:
ENGINE.load_extractors(ClosedLoop_Extractor(*calibration-value*, x=0, y=0, w=100, h=100))
For example,
ENGINE.load_extractors(ClosedLoop_Extractor(794.58, x=0, y=0, w=100, h=100))
Test your closed-loop experiment:
eyeloop
Let me know how this goes!
Best, Simon Arvin
Thanks Simon, I will check this again.
Hi
Great tool, we are trying to use your tool at our lab and had a couple of questions.
python eyeloop.py
presumably has to be run from the command line? But how are the CAL values to be passed downstream to another method?
Is there a complete example python file that is available somewhere?
Thanks so much for this tool. Cat