# closed-loop pupil control, pilot v3 # goal: hold pupil at target by nudging patch luminance import pylink import numpy as np from psychopy import visual, core target_mm = 4.5 # from pilot, feels comfortable lum_step = 0.02 tracker = pylink.EyeLink() tracker.openDataFile('plyfaa_pilot.edf') def current_pupil(): sample = tracker.getNewestSample() if sample is None: return None return sample.getRightEye().getPupilSize() def nudge(now, target): # pupil too big → brighten the patch, and vice versa return -np.sign(now - target) * lum_step # main loop, TODO: smooth this, way too jumpy right now while core.getTime() < 300: p = current_pupil() if p is not None: patch.opacity += nudge(p, target_mm) core.wait(0.05) # note to self: re-check sign convention before friday
# closed-loop pupil control, pilot v3 # goal: hold pupil at target by nudging patch luminance import pylink import numpy as np from psychopy import visual, core target_mm = 4.5 # from pilot, feels comfortable lum_step = 0.02 tracker = pylink.EyeLink() tracker.openDataFile('plyfaa_pilot.edf') def current_pupil(): sample = tracker.getNewestSample() if sample is None: return None return sample.getRightEye().getPupilSize() def nudge(now, target): # pupil too big → brighten the patch, and vice versa return -np.sign(now - target) * lum_step # main loop, TODO: smooth this, way too jumpy right now while core.getTime() < 300: p = current_pupil() if p is not None: patch.opacity += nudge(p, target_mm) core.wait(0.05) # note to self: re-check sign convention before friday
# closed-loop pupil control, pilot v3 # goal: hold pupil at target by nudging patch luminance import pylink import numpy as np from psychopy import visual, core target_mm = 4.5 # from pilot, feels comfortable lum_step = 0.02 tracker = pylink.EyeLink() tracker.openDataFile('plyfaa_pilot.edf') def current_pupil(): sample = tracker.getNewestSample() if sample is None: return None return sample.getRightEye().getPupilSize() def nudge(now, target): # pupil too big → brighten the patch, and vice versa return -np.sign(now - target) * lum_step # main loop, TODO: smooth this, way too jumpy right now while core.getTime() < 300: p = current_pupil() if p is not None: patch.opacity += nudge(p, target_mm) core.wait(0.05) # note to self: re-check sign convention before friday
# closed-loop pupil control, pilot v3 # goal: hold pupil at target by nudging patch luminance import pylink import numpy as np from psychopy import visual, core target_mm = 4.5 # from pilot, feels comfortable lum_step = 0.02 tracker = pylink.EyeLink() tracker.openDataFile('plyfaa_pilot.edf') def current_pupil(): sample = tracker.getNewestSample() if sample is None: return None return sample.getRightEye().getPupilSize() def nudge(now, target): # pupil too big → brighten the patch, and vice versa return -np.sign(now - target) * lum_step # main loop, TODO: smooth this, way too jumpy right now while core.getTime() < 300: p = current_pupil() if p is not None: patch.opacity += nudge(p, target_mm) core.wait(0.05) # note to self: re-check sign convention before friday
# closed-loop pupil control, pilot v3 # goal: hold pupil at target by nudging patch luminance import pylink import numpy as np from psychopy import visual, core target_mm = 4.5 # from pilot, feels comfortable lum_step = 0.02 tracker = pylink.EyeLink() tracker.openDataFile('plyfaa_pilot.edf') def current_pupil(): sample = tracker.getNewestSample() if sample is None: return None return sample.getRightEye().getPupilSize() def nudge(now, target): # pupil too big → brighten the patch, and vice versa return -np.sign(now - target) * lum_step # main loop, TODO: smooth this, way too jumpy right now while core.getTime() < 300: p = current_pupil() if p is not None: patch.opacity += nudge(p, target_mm) core.wait(0.05) # note to self: re-check sign convention before friday
# closed-loop pupil control, pilot v3 # goal: hold pupil at target by nudging patch luminance import pylink import numpy as np from psychopy import visual, core target_mm = 4.5 # from pilot, feels comfortable lum_step = 0.02 tracker = pylink.EyeLink() tracker.openDataFile('plyfaa_pilot.edf') def current_pupil(): sample = tracker.getNewestSample() if sample is None: return None return sample.getRightEye().getPupilSize() def nudge(now, target): # pupil too big → brighten the patch, and vice versa return -np.sign(now - target) * lum_step # main loop, TODO: smooth this, way too jumpy right now while core.getTime() < 300: p = current_pupil() if p is not None: patch.opacity += nudge(p, target_mm) core.wait(0.05) # note to self: re-check sign convention before friday
# closed-loop pupil control, pilot v3 # goal: hold pupil at target by nudging patch luminance import pylink import numpy as np from psychopy import visual, core target_mm = 4.5 # from pilot, feels comfortable lum_step = 0.02 tracker = pylink.EyeLink() tracker.openDataFile('plyfaa_pilot.edf') def current_pupil(): sample = tracker.getNewestSample() if sample is None: return None return sample.getRightEye().getPupilSize() def nudge(now, target): # pupil too big → brighten the patch, and vice versa return -np.sign(now - target) * lum_step # main loop, TODO: smooth this, way too jumpy right now while core.getTime() < 300: p = current_pupil() if p is not None: patch.opacity += nudge(p, target_mm) core.wait(0.05) # note to self: re-check sign convention before friday
# closed-loop pupil control, pilot v3 # goal: hold pupil at target by nudging patch luminance import pylink import numpy as np from psychopy import visual, core target_mm = 4.5 # from pilot, feels comfortable lum_step = 0.02 tracker = pylink.EyeLink() tracker.openDataFile('plyfaa_pilot.edf') def current_pupil(): sample = tracker.getNewestSample() if sample is None: return None return sample.getRightEye().getPupilSize() def nudge(now, target): # pupil too big → brighten the patch, and vice versa return -np.sign(now - target) * lum_step # main loop, TODO: smooth this, way too jumpy right now while core.getTime() < 300: p = current_pupil() if p is not None: patch.opacity += nudge(p, target_mm) core.wait(0.05) # note to self: re-check sign convention before friday
I'm fascinated by the eyes and what they reveal about our perception.
I'm an incoming PhD student in Dr. Timothy Brady's Visual and Memory Lab at UC San Diego. Currently, I'm a Research Fellow at the National Institutes of Health in Dr. Peter Bandettini's lab, where I'm investigating how we can control pupil size in real time to improve our perception. Previously, I built decoding pipelines for BCIs as a Simons Foundation Fellow under Dr. Sergey Stavisky, and investigated visual perception at the University of Oxford advised by Dr. Hannah Smithson.
I completed my Bachelor's in Cognitive Science from UC Davis in 2 years. And spent most of that time learning as much as I could about eye-tracking, EEG, and visual cognition, finding my way into as many research research opportunities as I could.