ScanImage 2019 : Built-in and Custom Stimulus Functions

Built-In Stimulus Functions


The ScanImage stimulus editor provides the following built-in parametric stimulus functions:

  • Pause: A pause indicates a delay time between two stimulus functions in order to allow the scan mirrors time to transition from the previous stimulus function to the next; Laser is always blanked during this function
  • Park: This function moves the scan mirrors to the park position (specified in the MDF) in the specified time duration; Laser is always blanked during this function
  • Point: This function moves the scan mirrors to the specified position and stays there with the beam exposed to the desired power for the specified duration
  • Way Point: This function makes the scan mirror path pass through but not stop at the specified position; the beam is exposed to the desired power for the specified duration as the scan mirrors pass through the specified point
  • Line
  • Circle
  • Log Spiral: Spiral pattern starting with the laser at the center and spiraling out.
    Optional parameters:
    • revolutions: number of revolutions from start to end (default is 5)
    • direction: Either 'outward' (which is the default) or 'inward'
  • Sine Square: Back and forth sweep of the laser across a square region
    Optional parameters:
    • numlines: number of side to side sweeps (default is 10)
  • Hypotrochoid: Optional parameters: r1, r2, and d
  • Hypocycloid: Optional parameters: k
  • Cardioid
  • Musoid

Writing Custom Stimulus Functions


It is also possible to write your own parametric stimulus function. To do so, write a MATLAB m-file function and store it in [ScanImage Installation Directory]\+scanimage\+mroi\+stimulusfunctions\. The function should be in the form:

[xx,yy] = stimFunction(tt,[additional optional arguments])

The input argument tt is a time vector. The output arguments xx and yy should be column vectors of the same size as tt that indicate the x and y position corresponding to the time vector tt. The x and y position should range from -1 to 1. Optional arguments can be used to further parameterize the function.

Attachments:

RoiGroup.png (image/png)
mROI Volume.png (image/png)
mROI Full FOV.png (image/png)
FOV vs ROIs.png (image/png)
FOV vs ROIs.svg (image/svg+xml)
mROI Interpolation.png (image/png)