Skip to content

Using Command Center

Michael Walsh edited this page Oct 16, 2019 · 19 revisions

A shorter intro of this can be found in the repo's readme.

Contents

Menus

File

  • Load Image in CC: This will take a file that has been saved by either Databases.AutoSave, Databases.Manual, or an equivalent module that saves data to the filesystem without modification and load the raw data back into CommandCenter's image panel.
  • Open Image in New Window: Identical to the previous option, however instead of loading in CommandCenter's image panel, it will open a new Smart Image window.
  • Camera Calibration: If there is an active imaging module loaded, this will be enabled. It will go through a process of taking images and asking the user to draw lines between features and specifying their size. Using these lines, a calibration value will be generated. Special action is taken when the imaging device is the same as the stage (e.g. the case of galvos). See Imaging modules for more details.
  • Color Map: Control the colormap of captured images.
Color Map
  • Axes Layout: Control the orientation of the imaging and experiment panels. Note, their sizes can be adjusted by dragging the divider between them (when both displayed).
Axes Layout
  • Manager Settings: Access the editor for manager settings.
  • Logger Visible: Reveal the logger window. If it is minimized, this won't expand it. It will only display it if it was closed.
  • Reset: Close CommandCenter, unlock any locked file, then relaunch CommandCenter.
  • Git Pull: Similar to reset, but also will remove CommandCenter from the MATLAB path (and all subdirectories) then perform a git pull before relaunching. Currently only supports pulling the master branch. If you were originally on the root path of the repo, you will be moved into a safe folder within the repo during all of this, then returned after finished.
  • Send Logs: Immediately send new log entries to the logging server. This is done by default when the inactivity monitor triggers or CommandCenter is closed.

Module

(Experiments, Stages**, Imaging, Sources, Saving)

These menus are populated dynamically from the corresponding package in Modules/+*. Any nested package is represented as a submenu for further organization. Clicking on any module will result in loading (making a new instance if necessary) for use in the left panel. A check mark will appear next to any loaded modules. Clicking on a module that is loaded (check marked) will result in unloading it and deleting the instance (even if the instance wasn't created when loading).

  • The "Experiments" menu has an additional "New Module" option at the end which will use a template to construct necessary files with the correct contents.

** The "Stages" menu will only list actively loaded modules in a disabled fashion. The "Edit" option at the end opens up a UI to modify the loaded stages. This is because the ordering of the stages matters (more info).

Path

The first set of options will be the set of configured paths that have already been created. Clicking on them will execute the instructions to transition the setup to that path.

Paths Menu

Assuming paths exist, the other available options are (some might not exist if there are no defined paths yet):

  • New Path: Open a UI to create a new path and associated set of instructions. See the path manager for details and relevant screenshots.
    • You can add a series of instructions.
    • Instructions can be particular method calls of modules where you specify all relevant inputs (including any necessary to get the module instance).
    • Instructions can also be simple MATLAB expressions. Two handy ones:
      • Do nothing:
      drawnow
      • Manual change:
      uiwait(warndlg('Flip the spectrometer mirror!','Action Required!','modal'))
  • New Alias: Create a new alias for an existing path.
  • Remove Path/Alias: Remove an existing path or alias permanently. Note that aliases will not be cleaned up even if their target path gets removed!
  • View All: Open a viewer to inspect each path/alias and their associated set of instructions.

Manager Settings

Long story short, managers are responsible for linking the left panel UI controls to the loaded module methods. The managers also take care of dynamically populating the top menu items.

Managers have their own (limited) set of preferences that can be accessed through the file menu:

Manager Settings

As with modules, these settings are persistent between sessions. For example, the imaging manager's settings panel looks like this:

Imager Manager Settings

Values changed are saved when the window is closed. To understand what each property does, see the managers page.

Module Selection

This is quite straight forward. Simply open the appropriate menu at the top of the application and navigate to the appropriate module. The description of the module menus) describes this process.

Note, from a MATLAB perspective, nested packages will create submenus.

From a filesystem perspective, nested folders that begin with a "+" sign are MATLAB packages, thus creating submenus.

For example to load the package Sources.msquared.SolsTiS, located at Modules/+Sources/+msquared/SolsTiS.m you would follow the menus as such and click on the "SolsTiS" option:

Module Packages

Module Control

This section explains the various controls on the side panel.

  • Each manager (except the "Path" manager) gets their own section.
  • Every manager except the "Experiment" manager is capable of having multiple modules loaded simultaneously.
  • The "active module" refers to the module whose name appears in the dropdown menu that is highlighted in red below.
  • The control panel can be "minimized" by clicking towards the top as indicated by the blue region below.
  • The length of the panel can be adjusted by dragging the bottom of the panel as indicated by the gold region below.
  • Under the ROI setting (above the binning field) there is a faint white line the delineates the end of the common controls for that type of module and the custom settings/preferences defined for the particular active module.
Module Control Panel

Stages

Coming Soon

Imaging

Coming Soon

Sources

Coming Soon

Experiment

Coming Soon

Save Settings

Coming Soon

Beyond the CommandCenter GUI

The only additional information that I will supply here is how you can interact with CommandCenter from the console. While this shouldn't be necessary for most users, it can be handy.

After CommandCenter has been launched, a variable called managers is automatically added to your base workspace in MATLAB. This is the container for all-things CommandCenter. Every manager (many more details in the managers page) has two property that are very useful for interacting with their loaded modules.

  1. obj.active_module
  2. obj.modules

Note the mapping of properties in managers to manager objects (and their associated menu):

  • Path -> PathManager (Path Menu)
  • DB -> DBManager (Saving Menu)
  • Experiment -> ExperimentManager (Experiments Menu)
  • Sources -> SourceManager (Sources Menu)
  • Stages -> StageManager (Stages Menu)
  • Imaging -> ImagingManager (Imaging Menu)

So, for example to get active module for the "Sources" manager, you would execute:

my_active_source = managers.Sources.active_module;

The other properties are covered in the managers page.

Clone this wiki locally