StitchIt
Search…
syncAndCrunch walkthrough
syncAndCrunch is the function that processes data during acquisition, sends images of the most recently completed section to the web, and stitches data automatically once acquisition is complete. This page describes in detail how to set it up and run it. Note that in day to day use, all you will need to run is:
1
syncAndCrunch('MICROSCOPE_NAME')
Copied!
However, the details are:
  1. 1.
    If you are running the command on a remote server you will probably want to set up a persistent session so the analysis does not stop if you disconnect. Use the Unix tmux or screen commands or set up VNC or even TeamViewer. Our favoured option is tmux.
  2. 2.
    Start MATLAB. Run help syncAndCrunch if you are not familiar with the command.
  3. 3.
    The acquisition system should be mounted on the analysis machine and at this mount point you should find your sample directory. Use the ls command to find your sample.
  4. 4.
    Create a variable containing the name of you experiment directory on the acquisition machine or server. e.g.
    1
    S = ’/mnt/acqMachine/Data/Sample_0123’;
    Copied!
    (obviously substituting this with your own data directory).
  5. 5.
    Now you can run syncAndCrunch. In one of these ways:
1
syncAndCrunch('MICROSCOPE_NAME')
Copied!
Where MICROSCOPE_NAME is the name of your microscope (e.g. brainsaw, organator, ... whatever). The syncAndCrunch command looks for files coming from this system.
You can also run:
1
syncAndCrunch(S,2)
Copied!
This will copy the contents of S to the so-called "landing directory" on the analysis machine on which syncAndCrunch is running. The landing directory is defined in your INI file or can be manually set when you run syncAndCrunch with an optional input argument. The 2 indicates that the second channel will be sent to the web to monitor progress. Read the help for the command if it's not clear why it does that. You should now see stuff scrolling down the screen and it should appear to be doing things. After a bit you’ll see it say that it’s building the web images. You can the navigate to the URL to which the images are sent. This is set vi a the INI file. It will just keep looping. If running on a remote server you can detach from your screen session or VNC connection. When all sections have been acquired, it will stop pulling in data and automatically start stitching. If you finish the acquisition early, you can manually trigger stitching by creating a file called ‘FINISHED ’ in the experiment root directory. syncAndCrunch will automatically start stitching when it finds the FINISHED file. Alternatively, you can quit with ctrl+c and run the stitching commands manually. It is important that you keep an eye on the progress of the experiment by looking on the web from time to time. syncAndCrunch will usually send messages to Slack (if you have configured this) if it crashes. You can then re-start it.

Note

Do not use the bidirectional scan (comb) correction at present) Note that one of the options will delete the third channel from the server without confirmation!
Last modified 9mo ago
Copy link
Contents
Note