Overview
ScanImage uses a galvanometer in conjunction with a resonant scanner to form a rectangular image. After capturing the last line of the frame, the galvanometer must return to capture the first line of the next frame. This movement is called Flyback, and the flyback duration is a function of (among other parameters) the angular velocity of the galvanometer and the total angular displacement of the flyback. ScanImage accounts for the time necessary for this flyback to occur, so that artifacts due to flyback do not appear in the frame.
Flyback
Unlike the X command signal (in most cases), the flyback of the Y command signal is instantaneous (in all cases).
In reality, however, the flyback of the physical scanner will not follow this command. As a result, the physically scanned trajectory during frame scans must either coincide with first or final line of the Frame:
Laser scan trajectory during frame scans including Slow (Y) dimension flyback
Flyback on Final Line OFF
When Flyback on Final Line is disabled (default), the flyback of prior Frame is coincident with first line of succeeding Frame. In this mode, the beginning portion of the first line of eachFrame (starting with the second) contains the artifact of scanning diagonally across the field-of-view.
Flyback on Final Line ON
When Flyback on Final Line is enabled, the final line of each Frame is effectively skipped, and the (instantaneous) Y command signal flyback occurs immediately following the end of the second-to-last line in the Frame. In other words, the flyback is considered to comprise the entire Line Period of the final line.
Within the image display figures and in the saved image file, this simply moves the Y flyback artifact from the first line of image to the final line. Importantly, however, if Pockels modulation is enabled and the Blank Flyback option is enabled, then the Beam(s) will be 'blanked' during this entire Line Period.
In addition, when Flyback on Final Line is enabled, the option to Discard Flyback Line becomes available, which allows the final line to be discarded during processing, so that it does not appear in either the image display figures or in the saved image file. In other words, the displayed/stored lines per Frame is one less than configured Lines/Frame.