Simulated mode

BakingTray has a simulated or "dummy" mode which allows it to run on any OS with no hardware connected. Not all features are supported. The simulated mode was initially used only to assist in basic GUI development. More recently (April 2020 on dev) it was extended to allow preview and baking by loading correctly formatted and downsampled past data. There are some restrictions still: it's only been tested with one optical plane and channel. Nonetheless, quite a lot is possible and simulated mode can easily be extended to encompass more features.

Starting

BakingTray('dummyMode',true) % Start simulated mode

% Load and attach a preview stack:
load('/Path/To/Stack/CA_123_ApreviewStack.mat')
hBT.scanner.attachPreviewStack(pStack) % Attach it to the scanner

For details on the preview stack format see: https://github.com/raacampbell/autofinder Everything below is tested with stacks downsampled to 20 µm per pixel.

Interacting with the dummy scanner

The main window has a "Scanner" menu. Go there and select "Open dummy scanner": a new window opens. Here you can select "Scanner > Acquire Tile" to see the current physical section (top) and the current tile (bottom). The position of the virtual stage in the stack is indicated by the red cross.

You can open the Prepare GUI (at the command line: hBTview.startPrepareGUI), edit the stage position and acquire a new tile. You can select "Scanner > Start Focus" to pan around the sample with the on-screen arrows or WASD whilst seeing the current tile update. When you are finished you can "Scanner > Stop Focus".

Preview and Bake

Use the GUI to set a path to save the data to or at the command line do: hBT.sampleSavePath='~/Desktop/TEMP'; or similar. Open the prepare GUI (at the command line": hBTview.startPreviewSampleGUI). Press "Preview Scan" and you will see the the image appear tile-wise whilst the dummyScanner window updates. For more advanced testing, you might want the GUI to update faster. In this case you can disable updates of the dummyScanner window: hBT.disabledAxisReadyCheckDuringAcq=true; You can also control how many tiles must be acquired before the preview window updates. For example compare hBTview.view_acquire.updatePreviewEveryNTiles=2; to hBTview.view_acquire.updatePreviewEveryNTiles=20;

Bake also works. You can slightly speed up longer acquisitions by setting the following:

hBT.disabledAxisReadyCheckDuringAcq=true; % Skips some methods we don't care about

% Reduce the number of screen updates for speed reasons
hBT.scanner.displayAcquiredImages=false;
hBTview.view_acquire.updatePreviewEveryNTiles=50;

%Reduce the number of log messages
hBT.logMessageThreshScreen=6;
hBT.logMessageThreshFile=6;
hBT.yAxis.logMessageThreshScreen=7;
hBT.yAxis.logMessageThreshFile=7;
hBT.xAxis.logMessageThreshScreen=7;
hBT.xAxis.logMessageThreshFile=7;
hBT.zAxis.logMessageThreshScreen=7;  
hBT.zAxis.logMessageThreshFile=7;

Stitching simulated data

The easiest way is to name you simulated rig something like "TEST" then make a stitchitConf_TEST.ini file. In that file under [tile] set:

doDrop=0
tileRotate=2
tileFlipLR=0

You should now get acceptable stitching.

Last updated