A method for mitigating changes in pupil size of an eye during a diagnostic procedure, the method comprising: obtaining a first image of the eye with an imaging device of an optical sensor of a diagnostic and/or treatment system; obtaining a second image of the eye with the imaging device at a first illumination level; determining a change in pupil size between the first and second image; determining, with a processor of the diagnosing and/or treating system, a desired optical light output corresponding to a second illumination level in response to the change in pupil size so as to induce a desired pupillary response mitigating the change in pupil size; and directing the desired optical light output from a variable illumination source to the eye, wherein determining the desired optical light output in response to the change in pupil size further comprises: determining an increase in optical light output to induce pupil constriction in response to an increase in pupil size so as to mitigate the increase in pupil size, or determining a decrease in optical light output to induce pupil dilation in response to a decrease in pupil size so as to mitigate the decrease in pupil size, wherein the induced dilation preferably corresponds roughly to the measured decrease in pupil size, and the induced constriction corresponds roughly to the measured increase in pupil size, so as to induce a pupillary response with the directed desired optical output so as to mitigate the change in pupil size. obtaining a first image of the eye with an imaging device of an optical sensor of a diagnostic and/or treatment system; obtaining a second image of the eye with the imaging device at a first illumination level; determining a change in pupil size between the first and second image; determining, with a processor of the diagnosing and/or treating system, a desired optical light output corresponding to a second illumination level in response to the change in pupil size so as to induce a desired pupillary response mitigating the change in pupil size; and directing the desired optical light output from a variable illumination source to the eye, wherein determining the desired optical light output in response to the change in pupil size further comprises: determining an increase in optical light output to induce pupil constriction in response to an increase in pupil size so as to mitigate the increase in pupil size, or determining a decrease in optical light output to induce pupil dilation in response to a decrease in pupil size so as to mitigate the decrease in pupil size, determining an increase in optical light output to induce pupil constriction in response to an increase in pupil size so as to mitigate the increase in pupil size, or determining a decrease in optical light output to induce pupil dilation in response to a decrease in pupil size so as to mitigate the decrease in pupil size, wherein the induced dilation preferably corresponds roughly to the measured decrease in pupil size, and the induced constriction corresponds roughly to the measured increase in pupil size, so as to induce a pupillary response with the directed desired optical output so as to mitigate the change in pupil size.