First-time autoscreening setup » History » Revision 10
Revision 9 (Anchi Cheng, 03/15/2022 01:58 PM) → Revision 10/17 (Anchi Cheng, 03/15/2022 02:53 PM)
h1. Smart-leginon multi-grid autoscreening Automated square and hole finders are added to leginon to use Ptolemy (https://arxiv.org/abs/2112.01534) to determine optimal targets using computer vision algorithm and Convolutional Neural Network trained on user target selections accumulated at Simons Electron Microscopy Center at New York Biology Center (SEMC@NYSBC. This implementation requires Ptolemy which has a separate license. For this release, the communication is through command line interface and rely on shared file system. * At SEMC@NYSBC, Ptolemy, which was tested on python 3.9, runs in anaconda environment on the same CentOS7 computer where the main leginon process is. h2. Install Ptolemy and setup shell scripts to use its cli for [[Setup Ptolemy CLI shell script|grid square finding]] and [[Setup Ptolemy CLI for exposure targeting|exposure target hole finding]] h2. Upload MSI-Ptolemy application into leginon database Follow the instruction in [[Applications|web application tools]] * Note: If your system needs two Leginon client opened, each on a different pc, use MSi-Ptolemy2.xml If you have your own application you can do the following replacement by [[Use_the_Application_Editor_to_create_Leginon_applications|editing your application]] : Square Targeting Node : MosaicClickTargetFinder class => MosaicScoreTargetFinder Exposure Targeting Node: JAHCFinder => ScoreTargetFinder h2. First-time Start Leginon setup Run Rrun MSi-Ptolemy and start acquire a new session. grid atlas. This session can be used for setting up and as the example session that the autoscreen base its settings and stage z height on. up. # Start the session as usual. # Set z to the height that is typical for this scope's eucentric height. # Acquire a grid atlas for the next step. h2. Setup Square Targeting Node h3. Set, in Blobs Settings, the script to run as */path_to/sq_finder.sh* h3. Define target area size sampling in the settings next to "acquisition" target panel. Enter # Maximal number of squares to select # Number of target group to sample For example, total of 12 squares selected in 3 groups means the program divided out all blob squares with valid area range into 3 size group (small, medium,and large). It then choose 4 blob squares in each group with highest score given by Ptolemy as the output square targets. High score in Ptolemy result means it is more likely to be a good square. h3. Set the limits of the square area range in "Thresholded" settings. You can set it directly. However, it is easier to select a number of examples targets including the smallest and the largest grid square you will choose and then click on the auto square finding tool on the toolbar. Leginon will use the example targets to set the limits of the square area. !Square_FindingGUI.png! h3. Activate auto finding in the main settings dialog. Shortest path can be applied in ordering the resulting targets as well. !ProcessingSettings.png! h2. Setup Exposure Targeting Node h3. Define h3.Define Hole Settings * the script to run as */path_to/hl_finder.sh* or whatever path your shell script is located. * the json key for threshold the result. For Ptolemy, this should be "score" * the minimal key value to accept. For Ptolemy, the probability score range is 0-1. We tend to use a very small number to only rule out the obvious bad holes. 0.01, for example. !score_finder.png! h3. Define Ice thickness thresholding Like JAHC template hole finder, you can narrow the selection in Leginon with hole statistics calculation and create template for convolution. The interface is similar to JAHC hole finder. h3. Define target sampling For screening, you may not want all targets found to be acquired. Use Acquisition Target Sampling section to achieve this: {{include(Settings for Target Sampling)}} h2. (Optional) Specify and setup auto aperture selection for nodes that need to be specified. If you want objective aperture to be retracted only during Grid imaging, set in its advanced settings to !aperture_settings.png! h2. Setup grid loading list text file Autoscreen reads a *tab-separated* text file that contains the slot number and the session comment to setup the sequence of grid loading and screening. The grids will be screened in the order or the list. Currently, all grids needs to be in the same project as the example session. We will expand that in the future. An example file is attached in this wiki called grid.list <pre> 3 best test grid 2 second best test grid </pre>