Project

General

Profile

First-time autoscreening setup » History » Revision 15

Revision 14 (Anchi Cheng, 08/10/2022 05:52 PM) → Revision 15/17 (Anchi Cheng, 09/27/2022 03:22 PM)

h2. First-time Leginon setup 

 Run MSi-Ptolemy and start a new session. This session can be used for setting up and as the example session that the autoscreen base its settings and stage z height on. 

 # 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. 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. 

 For screening multiple grids, it is best to select a large filter range in cover all possible values. 

 *Filter Key Used* can be any of the displayed blob stats.    For cryo grids, this is usually "Size" since it is the best key to indicate general ice thickness.    Some users use "Mean" to select stain thickness in negatively stained grids. 

 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 
 # Choose group definition 

 For example, total of 6 squares selected in 3 groups means the program divided out all blob squares with valid area range into 3    groups.    It then choose 2 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. 

 Group definition has two choices: equal value delta and equal target count. Default is equal value delta. 

 * *Equal value delta grouping* depends on the "Thresholded" settings.    If we use the values in the figure below, delta = (10951.1-2251.02)/3.    Th first group will have blob squares in size range of 10951.1 to 10951.1+ delta. Up to two targets will be selected in there.    If there are no targets in this size range, then no targets will be output.    The advantage of this is that the sampled targets will still be covering small, medium, and large size even if the size distribution is highly skewed. 

 * *Equal target number grouping* sorts all blob squares by the filter-key in "Thresholded" settings, and divide them into 3 bins of equal number before sampling with highest score within each.    This guarantees Max. number of targets to be reached but may end up with targets all at similar size if the size distribution is highly skewed. 

 !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 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, do the following on TFS scope. 

 # create myami_log directory in the user's home directory for the logger to put files there.    Typically, the user is supervisor, so it would be under c:\Users\supervisor 
 # Compile autoit script ApertureSelection.au3 See [[Auoit program script compilation]].    You can test it by double click the compiled executable. 
 # On the scope PC fei.cfg under [aperture] section, specify the aperture sizes in order.    See pyscope/fei.cfg.template for more details. 
 In the minimum you need to set 
 <pre> 
 USE_AUTO_APERTURE = True 
 </pre> 
 The rest depends on your setup. 

 # set the advanced settings of Grid node to 

 !aperture_settings.png! 

 h3. Testing 

 # pyscope level testing through python command line interface on the scope computer *Replace Glacios with your tem class name* 
 <pre> 
 from pyscope import fei 
 g=fei.Glacios() 
 g.getApertureSelections('objective') 
 g.setApertureSelection('objective', 'open') 
 g.setApertureSelection('objective', '100') 
 </pre>