TEM Architecture
Welcome to the documentation for the Allen Institute next generation TEM data acquisition system. This system is used at the Allen Institute for Brain Science to do large-scale high-throughput TEM imaging of brain tissue. The system is primarily comprised of a number of Docker containers communicating via a message broker. Using this architecture, the system is modular, high performance, and stable.
An overview of the architecture is as follows, the pyTEM service is a hierarchical state machine that coordinates the entire system. This service includes the routines for auto-focusing the microscope, centering the beam, etc, all encoded as state machines. Communication is handled by a message broker and our Pigeon client library. Under the hood this uses the STOMP protocol for communication. There are also services which handle communication with a single piece of hardware, such as the scope, stage, and camera. Once an image (tile) is collected from the camera it is saved to disk and a message is sent to the image processing pipeline. This pipeline performs some simple image processing such as flatfield correction and contrast enhancement, calculates some statistics, such as min, max, and mean image values, a histogram, and a focus quality metric, and finally checks that there is overlap between tiles. These metrics are received by two services, the first of which is the QC which monitors the tile statistics to ensure there are no errors in the acquisition. If any errors are detected, a message will be sent to pyTEM instructing it to either immediately stop imaging, or stop imaging at the end of the montage. The second service is the buffer which collects the processed images, and the statistics. After a montage is completed successfully, this service sends the tiles and metadata to aloha via HTTP. This service
This is an event driven system with various components running in docker containers, along with other services running on other machines. Below, is a diagram showing a general overview of this system.
Most of the nodes in this diagram are hyperlinks to further documentation of this system.
This system primarily sends messages between services using the STOMP protocul with the Pigeon library. The configuration for this system as a whole is stored on GitHub at AllenInstitute/TEM_config. This repository includes both a Docker compose file for starting all the services that are part of the system, and the configuration files for the services.