Devices, systems, and methods perform diagnostic and/or treatment procedures on an eye using a pupilometer to determine a change in pupil size, a processor and a variable illumination source. In response to a change in pupil size as determined by the pupilometer, the processor may determine an optical light output sufficient to induce a pupillary response and mitigate the change in pupil size. The system directs the desired optical light output to the eye with the variable illumination source optionally to prevent the pupil size from exceeding certain limits so as to improve torsional tracking of markers of the eye.