- Overview
- Configuration
- Acquisition Delay
- General Comments
- Fill Fraction (and True Ms/Line)
- Scan Delay
- Practical Procedures for Optimizing the Live Scan Params
- Initial Measurement of the Acquisition Delay
- Optimizing Sawtooth Scans
- Fill Fraction Adjustment
- Going Further
- Optimizing Bidirectional Scans
- Final (or initial) Acquisition Delay measurement
- Fill Fraction optimization
- Scan Param Array
- Min Zoom
Overview
As described above, the Acquisition Period portion of the X command signal consists of a linear ramp. To achieve optimal and correct imaging, it is required that:
- The physical scanner position ('response') must follow the ramp exactly for the duration of the Acquisition Period, save for some delay relative to the X command signal
- This delay must be known (in order to properly digitize the input signal(s))
Configuration
For both Sawtooth and Bidirectional modes, ScanImage requires three Configuration parameters be set to meet these requriments: Acquisition Delay, Scan Delay, and Fill Fraction. They are defined as follows:
- Acquisition Delay: The delay (in microseconds) between the Acquisition Period of the X command signal and the (matching) physical scanner 'response'
Fill Fraction: The fraction of the X command signal Line Period ( True Ms/Line) occupied by the Acquisition Period portion of the signal.
- Scan Delay: The time (in microseconds) to 'extend' at the beginning of each Line Period the linear ramp of the X command signal Acquisition Period, allowing the physical scanner 'response' to be settled at the start of its matching (but delayed) Acquisition Period, following the Turnaround or Flyback time
Their meanings are illustrated here:
Acquisition Delay
Bidirectional Scans
For Bidirectional scans, properly setting the Acquisition Delay is essential to correctly process the input data. As illustrated below, an incorrect setting of this value causes every-other-line to be misaligned in the image:
The correct value of acquisition delay must be set to correctly form an image when using bidirectional scans
Sawtooth Scans
For Sawtooth scans, the effect of setting the Acquisition Delay slightly incorrectly does not produce such a dramatic image artifact – this is the key advantage of Sawtooth scans.
However, setting the value correctly remains important to ensure the acquired data is correctly aligned with the intended scan range and to avoid a 'reflected image' appearing on either side:
General Comments
Fill Fraction (and True Ms/Line)
Formal Definition
Recall that the Acquisition Period – the period during which input data is processed – is defined as:
The value 0.8192 represents one of the available Fill Fraction values in ScanImage, which is defined formally as:
The Fill Fraction value simply specifies the fraction of the Line Period ( True Ms/Line) occupied by the Acquisition Period.
Effect of Fill Fraction Selection
Rearranging the above, we obtain the following:
We see therefore that the Fill Fraction determines how the True Ms/Line value differs, if at all, from the Nominal Ms/Line. The value 0.8192 is simply a reference value at which the True Ms/Line equals the user-configuredNominal Ms/Line. ScanImage allows selection among a list of possible Fill Fraction values.
(Increasing/decreasing) the Fill Fraction value away from 0.8192 directly (decreases/increases) the True Ms/Line value away from the Nominal Ms/Line value.
The value of Fill Fraction must practically be chosen to allow the physical scanner sufficient time for flyback/turnaround and to ensure the physical scanner 'response' is 'settled' by the start of the Acquisition Window.
Effect of Fill Fraction on X Command Signal
For Bidirectional scans, the Fill Fraction is sufficient (along with the Scan Amplitude X and Nominal Ms/Line) to compute the X command signal to generate. The linear ramp of the Acquisition Period is simply extended in duration – symmetrically about the Scan Range (2 * Scan Amplitude X ) scanned during this period – to reach the True Ms/Line.
For Sawtooth scans, the Fill Fraction is not sufficient to fully specify the X command signal to be generated by ScanImage. Because of the command signal's asymmetry, an additional parameter – the Scan Delay – is required, as described below.
Scan Delay
A physical scanner requires time to 'settle' on the linear ramp of the Acquisition Period – i.e. there should be no discernible 'ripple' and the slope of the 'response' must match that of the X command signal – at the completion of the flyback or turnaround. To help achieve this, ScanImage extends the linear ramp prior to the Acquisition Period, at the start of each Line Period.
Bidirectional Scans
For Bidirectional scans, the X scan command outside of the Acquisition Period is determined wholly by the Fill Fraction, which extends the Acquisition Period ramp symmetrically to fill the Line Period ( True Ms/Line). Since half of this extension occurs prior to the Acquisition Period (and the other half after), the Scan Period is a read-only parameter computed simply as:
Sawtooth Scans
For Sawtooth scans, the Scan Delay is a user-specified parameter. It is specified as a time, occurring at the start of each Line Period, during which the X command signal follows the same linear slope which occurs during the Acquisition Period. The Scan Delay also implicitly specifies the amplitude by which the X command signal is extended beyond the Scan Range (2 * Scan Amplitude X ).
ScanImage fills in the remainder of the Line Period ( True Ms/Line) outside of the Acquisition Period and the Scan Delay with the Flyback Time, using a smooth sinusoidal function.
Practical Procedures for Optimizing the Live Scan Params
The following practical procedures have been developed based on experiences in the developers' laboratories:
- Initial Measurement of the Acquisition Delay
- Optimization of Sawtooth scan parameters
- Optimization of Bidirectional scan parameters
It is recommended to first measure the Acquisition Delay and then follow either or both of the scan parameter optimization procedures as required, depending on the type(s) of scanning to be used in actual experiments.
The procedure provided for initially measuring the Acquisition Delay is the fastest and most reliable, but may not be possible or desirable for all users. If so, the procedure for optimizing Bidirectional scan parameters should be followed to determine the Acquisition Delay, even if Bidirectional scanning will not actually be used.
Initial Measurement of the Acquisition Delay
If your physical scanner system provides a feedback signal indicating the scanner's actual position in real-time (the 671xx and 673xx servos from Cambridge Technology provide a POS OUT signal), then measuring the Acquisition Delay is straightforward and should be done first, using an oscilloscope.
The procedure is as follows:
- Operate the scanner at a low rate and observe (e.g. with an oscilloscope) the response and X command waveforms simultaneously (i.e., 'tee' off the X command output channel). If needed, adjust the scaling for the response waveform so that the slopes of the two waveforms, during the main ramp, are matched.
- Measure the time lag between the X command signal and the response, measuring during the main ramp (i.e. the Acquisition Period) of both signals, at some amplitude crossing both ramps (e.g. the zero-crossing).
This is illustrated here:
The acquisition delay can be estimated visually by viewing the X command and 'response' signals together
This time lag represents a good estimate of the Acquisition Delay that should be used for ScanImage Configurations. The value can later be refined during imaging tests as described below.
Optimizing Sawtooth Scans
The procedure for optimizing Sawtooth scans is aimed at determining the proper Scan Delay and Fill Fraction values for the particular Line Period ( Nominal Ms/Line) and Zoom level being optimized.
Recall that the Scan Delay is intended to allow the physical scanner to settle on the intended linear ramp by the start of the Acquisition Period, i.e. all 'ripple' associated with the change in direction following the Flyback Time should have subsided. It is therefore natural to match this value to the small-angle settling time of the physical scanner system – a basic characteristic of any scanner system. If specified by the physical scanner manufacturer, it would be reasonable to simply set the Scan Delay to match this value.
Another approach, in many ways preferable, is to recognize that the small-angle settling time is related to the measured Acquisition Delay. In particular, it can be computed that the settling time is equal to (2 * Acquisition Delay*)*. Therefore, it is recommended as a starting point to simply employ the constraint:
Fill Fraction Adjustment
Following this, only one free parameter remains – the Fill Fraction. It is desirable to employ the highest value for Fill Fraction as supported by the physical scanner – this allows the greatest utilization of input signal as well as the highest Frame Rate. The Fill Fraction value can be optimized while live imaging, i.e. using FOCUS mode, as follows:
- Ensure the Nominal Ms/Line, Zoom, and Scan Amplitude X are set to the desired values to be configured.
Select the lowest (or a known low) value of Fill Fraction.
Increase the Fill Fraction one step at time until a reflection of the image appears on the right side of the displayed image
- Reduce the Fill Fraction one step back so the reflection disappears
- Reduce the Acquisition Delay slightly – the reflection should again appear on the right with only a small adjustment. After verifying this, increase the Acquisition Delay value until the reflection just disappears (i.e. only a fine step or two beyond this point).
At this point, all three of the Live Scan Parameters have been set and the Configuration can be considered fairly optimized – the highest imaging speed has been achieved that should allow:
- The full scan specified by Scan Amplitude X and Zoom to be covered during the Acquisition Period, and
- No position 'ripple' to occur within the Acquisition Period
Going Further
In some circumstances, however, it may be possible to exceed the Fill Fraction obtained by the procedure given. The procedure described employs the minimum required Scan Delay given the known or determined small-angle settling time of the physical scanner system. Any additional available time at a given Fill Fraction is allocated to the Flyback Time. By maximizing the Flyback Time, the procedure employed has allowed the X command function to utilize the least acceleration/velocity for each Fill Fraction, has avoided reaching the physical scanner's systems limits (nonlinearities) to the greatest extent possible (including the possibility of exciting any dangerous resonances, etc, if the system is not well-safeguarded).
If the physical scanner can tolerate being more strongly driven, it can be advantageous to reduce the Flyback Time, by simply increasing the Scan Delay and repeating the procedure above to find the optimal Fill Fraction at the higherScan Delay value. As the Scan Delay is increased, it may be possible to reach a limit on the where the Flyback Time disappears entirely in the X command signal. Such an extreme command signal, and the response for a 6210H galvo/671xx servo from Cambridge Technology, is shown here:
The extreme-case of zero-flyback-time is used for the X command signal; the response from this system exhibits slew-rate limiting, but nonetheless achieves a faster settling than is achieved using a 'softer' X command signal (i.e. lower Scan Delay)
Of course, stretching the performance further in this fashion requires more attention and understanding of the Physical Scanner Limits. In particular, thermal limits become an increasing concern with such strongly driving Xcommand signals.
Optimizing Bidirectional Scans
For bidirectional scanning, the Scan Delay becomes a read-only parameter – the non-acquiring time specified by the Fill Fraction simply extends the linear ramp of the X command signal symmetrically (i.e. in both directions) about the Acquisition Period . Therefore only the Acquisition Delay and Fill Fraction need to be optimized at a given Nominal Ms/Line and Zoom level.
Final (or initial) Acquisition Delay measurement
First, the Acquisition Delay value should be refined (or measured for the first time, if not done already). The procedure is as follows:
- Select the lowest Fill Fraction value available
- Commence live imaging of a test specimen using FOCUS mode
- Set the Acquisition Delay to the initially measured value, if available.
- Adjust the Acquisition Delay value while live imaging, until the every-other-line artifact is minimized or eliminated. Use the Fine control to achieve the best correction.
The following tips and warnings should be noted:
For the fastest adjustment of Acquisition Delay, the options Blank Flyback and Staircase Cmd should be disabled temporarily (if they were in force). These options force the Y and Pockels command signals, respectively, to be recomputed following an Acqusisition Delay adjustment. With both options disabled, no command waveforms need to be updated when Acquisition Delay is changed, and scanning continues uninterrupted.
It is important to avoid any detector saturation from the test specimen image (as can occur when using bright test objects, such as fluorescent beads). With some photodetectors, or their associated electronics, saturation can have a lingering effect which will create a pronounced every-other-line saturation artifact. Accidentally attempting to compensate such an effect will lead to an incorrect determination of the Acquisition Delay.
If there is notable variation in the optimal Acquisition Delay between the center and edges of the test specimen image, then the Fill Fraction is too high. If this occurs at the lowest possible value, then it will not be possible to fully optimize scanning at the current Nominal Ms/Line value.
To visualize the image adjustment with the finest detail, it can be useful to use the Display Zoom SI3.6_ImageControls feature on the *IMAGE CONTROLS* panel. It may also be useful/required to increase thePixels/Line value above what will actually be configured.
The Acquisition Delay value determined at various Zoom or Nominal Ms/Line levels should not vary substantially. Any significant variation in the Acquisition Delay is an indication
Fill Fraction optimization
Following this, the Fill Fraction should be optimized by increasing the value one step at a time, slightly adjusting the Acquisition Delay at each level to minimize the every-other-line image artifact by employing live-imaging as above, until a desired level is achieved, or one of the following limits is reached:
- A concrete Physical scanner limit is reached – i.e., current drive limit or thermal limit
- Every-other-line artifact becomes unevenly corrected throughout the field-of-view – i.e. the optimal Acquisition Delay differs between the center and one or both edges of the field-of-view.
Scan Param Array
Ideally, the physical scanner system would be linear, so that changes to the amplitude of the X command signal would produce a completely proportional response of the physical scanner position. In reality, however, physical scanners have nonlinearities, so that the response is amplitude-dependent.
As a result, the optimal values for the Live Scan Params may vary for different scan amplitudes. To address this issue, ScanImage provides the capability to store multiple values for each of the parameters, associated with differentZoom levels. These multiple values are stored all together as part of the ScanImage Configuration.
The Scan Param Array refers to this set of multiple values for each parameters. The length of the array is user-set as the Constant @ Zoom >= value. Values for each of the Live Scan Params are stored for Zoom levels ranging from 1 to this value. At higher Zoom levels, the values stored at this level are used.
During ScanImage operation, when the Zoom is altered – including during live scanning in FOCUS mode – the current values for each of the Live Scan Params are automatically updated according to the values stored in the Scan Param Array.
Min Zoom
Because of physical scanner considerations – such as current drive limits, servo slew rate limits, or thermal limits – it is sometimes required or desired when configuring the fastest scans (smallest Nominal Ms/Line values), to prevent scans from occurring at Zoom levels below a specified level.
The Min Zoom level prevents the Zoom from reducing below the specified level for a given Configuration.