ScanImage 2019 : CFG and USR Files

Overview

ScanImage has 100s of settings that can be adjusted in its GUI windows. This state is represented as a set of properties, which can also be accessed/modified directly at the command line. For example the Zoom, Num Frames, and Pixels/Line values are all properties of the ScanImage state.

When ScanImage acquisitions are launched – by pressing one of the FOCUS, GRAB, or LOOP buttons in the Main Controls – the acquisition starts according to the current state of those 100s of ScanImage properties.

The vast majority of ScanImage properties are assigned to property sets called the ScanImage Configuration or User Settings. These values can be stored/loaded to CFG and USR files, respectively. 

Properties are assigned to only one (never both) of the property sets.

Here's the general rule for assigning values to the CFG & USR property sets:

 General RuleExamplesWhere in GUIs?
Configuration (CFG)

Values which might be expected to change from acquisition to acquisition

Users typically have several CFG files

Zoom, Num Frames, Pixels/Line

User Functions

All throughout ScanImage,
including all settings in Configuration Controls  
User Settings (USR)

Values which rarely change from acquisition to acquisition

Users typically have only one USR file

Focus Duration

Auto Read Offsets (Channels)

All in User Settings

Some duplicated throughout ScanImage

Loading & Saving CFG & USR Files

The CFG & USR files can be loaded & saved from the Main Controls window

CFG files can also be loaded & saved from the Configuration Controls window

CFG & USR files are stored as binary MAT files

User Settings (USR) Files

USR files contain:
 
  • values of all properties in the User Settings windows
  • locations and visibilities of all the ScanImage windows
  • a configuration (CFG) file to load when the USR file is loaded

When ScanImage starts up, the user is prompted for a USR file which sets the default window locations/visibilities and loads the initial configuration (CFG) that the user prefers at the start of each ScanImage session.

Configuration (CFG) Files

Users will typically have several CFG files. For example, a user may have one CFG file for collecting reference anatomical stacks slowly and another for fast functional imaging with USR settings. 

The User Functions settings are among the Configuration settings. These can be used to customize ScanImage operation according to user developed scripts and specified arguments.

Because User Function settings are tied to specific CFG files, users can readily switch between default and user-customized ScanImage operations by switching their CFG files.

For the fastest experimental workflows, Fast Configurations can be used to switch CFG files at the touch of a single button.

 

 

 

 

 

 

Attachments:

Main_LoadSave.png (image/png)