Beam Management

ScanImage uses Laser Beam Modulators to adjust the illumination intensity of the sample. Proper beam modulation ensures that the image contrast is sufficient, while preventing damage of the sample from overexposure.

The configuration of a beam modulator is described in the following section: Beam Modulator Configuration.


Pockels cell and AOMs exhibit non-linear modulation in relation to an analog control signal. To correct for this non-linearity, ScanImage can automatically calibrate a look up table (LUT) to linearize the beam modulation. The LUT calibration requires a photodiode in the beam path (see Beam Modulator Configuration).

Once devices are properly set up, they can be calibrated via the Power Controls window, or from the beam modulator’s widget. A successful calibration will run without any further notification to the user. To see the calibration curve, the user can click the Show LUT button from the widget.

../_images/beamModWidget-cal.png ../_images/beamModWidget-calcurve2.png

If the curve suggests there is an issue, corrections can be attempted and then additional calibrations can be run from the [Beam Modulator Name] LUT window.

Additionally, the user can measure and eliminate “dark current” or ADC offset of the photodiode in the LUT window via clicking Measure Feedback Offset. the user is prompted to block laser beam for the Beam Calibration offset measurement. All exiting and subsequent calibration curves are adjusted to reflect this input offset.


Ensure that the photodiode gain is set such that the maximum laser intensity returns a voltage close to 10V, but at the same time does not saturate the photodiode.

Changing Beam Power

The beam power can be adjusted during an acquisition from the Power Controls window via the slider or the percent power editable field.


During an active acquisition, each time the slider is moved the live output signals are updated. It is more efficient to move the slider to the exact desired position or use the number control than to repeatedly click the slider button.


When ScanImage is idle, the beam power can be modulated via the Beam Modulator widget by clicking and dragging within the rectangular area.



The widget will always indicate the current output power state of the scope.


Older versions of ScanImage, implemented a Direct Mode. This functionality has been deprecated as of SI2020, and has been replaced by the Beam widget.

Automatic Depth Power Adjustment

The beam power can be set to automatically vary with depth of the focal plane into the sample to account for power losses within the sample when doing stacks. These features are accessed through the Power Controls window as shown.


Click the dropdown to reveal a set of options for depth adjustment:


Power does not vary with depth

Default Exp

The power varies according the following formula:

P = P0 * exp^((z-z0)/Lz)

  • P0 is the currently selected power at the currently set position of z0.

  • Lz is a characteristic length constant in micrometers (must be positive)

The P/z Adjust and Lz controls are User Settings, i.e saved/loaded to User (.USR) files. Thus, once value is determined/entered by user for each Beam, these values are typically loaded when ScanImage® starts and apply to all stack configurations/acquisitions during that session.


The user can specify a custom Power vs. Depth adjustment matlab function for the currently selected Beam via the Power/Depth Source field. By Matlab convention this field indicates the name of the .m file containing the function definition to be used. The function name must match exactly the file name. The file should be saved in a directory that is on the matlab search paths or a folder that is made the “Current Folder” while running ScanImage

The function should take the arguments startPower, zPowerReference, z in this order. The value and source of these arguments, whether or not they are actively used, as well as the manner in which they are combined is completely up to the user. Below is an example of such a function:

function powers = myPowerFunction(startPower,zPowerReference,z,lz)
   powers = sqrt(z-zPowerReference).*startPower;


Sets the Power vs Depth adjustment for the currently selected Beam to follow an interpolation from a specified Look-Up Table given specified z depths. By SI convention the look up table should be an Nx2 matrix with column 1 containing z depths in microns and column 2 the corresponding beam power level percentages for that depth.


For z depths not specified in the LUT the default value is 10% power.

The LUT can be any file format recognized by Matlab (.mat, .csv, etc).


On occasion, such as upon immediately starting ScanImage, the actual power output during GRAB operations will not update to reflect LUT values and will instead remain at a constant level equal to start power. It is recommended to always set start power to a very low setting when using a look up table to avoid damaging your samples. If this occurs it should be easily remedied by simply switching to default mode and then switching back.

After configuring the Power vs. Depth, the resultant power profile can be viewed after configuring a stack and then clicking the >> button.

../_images/PowerControls-depthProfile.png ../_images/PowerControls-depthProfile2.png ../_images/PowerControls-depthProfile3.png

Specifying Beam Power for rectangular ranges within a Scanfield

Controlling beam power for specific locations in the scanfield is done with a feature named Power Box. Before enabling power box, click Power Box Settings to configure the power box. This will summon the Power Box Controls window:

../_images/PowerControls-PowerBox.png ../_images/PowerBoxControls.png

Within the window is a black square with a red square within. The black square is the scanfield, and the red square is the power box within which the power is set to a different P0. It can be replaced with an image of the sample by doing a focus acquisition and clicking Copy CH#.


The power box may then be moved and sized to fit a region whose beam power should be different from the rest of the scanfield. Clicking and dragging the centroid of the red quadrilateral will change its position, while clicking and dragging the corners will change its size. Alternatively, the location of the top-left corner, the width, and the height can be specified by either scan fraction or Pixels.


Once done, another power box can be added via the dropdown menu.


Each of the Power Boxes can have different power levels, which are specified through the Powers field. Powers is given as a vector where each index is assigned a beam modulator in the order that they are listed from the Power Controls window:

../_images/PowerBoxControls-powerSet.png ../_images/PowerBoxControls-PowerSet2.png

Additionally, the start time and duration that power boxing is applied can be set from the Start Frame and End frame fields.


Finally, to enable power boxing, click the Enable Power Box button from the power controls window. Acquisitions started with power boxing enabled will use P0s as configured.

Other Beams Usage

Beams devices play a big role in other features such as Photostimulation and Waveform Optimization. See the below list of pages which use Beams in ways not described here: