Since the applications can be imported easily, we will not go through how it is created. Here, we will just list the node class for each node and the event bindings of the application.
Node Class: | Node alias: | Launcher: |
---|---|---|
DoseCalibrator | Dose | main |
Navigator | Navigation | main |
BeamTiltCalibrator | Beam Tilt | main |
PresetsManager | Presets Manager | main |
PixelSizeCalibrator | Pixel Size | main |
MatrixCalibrator | Matrix | main |
Corrector | Correction | main |
Focuser | Focus | main |
GonModeler | GonioModeling | main |
EM | em | scope |
< Create Leginon "Simple Application" | "MSI-Edge" Application >
The application "Manual" allows the microscope user to operate the FEI Low Dose kit and acquire CCD images by hand that are saved into the Leginon database. There is no required bindings.
Node Class: | Node alias: | Launcher: |
---|---|---|
EM | Instrument | instrument |
Corrector | Correction | main |
ManualAcquisition | Manual | main |
< "MSI-Tomography" Application
This section describes the node classes and event bindings of the application.
Node Class: | Node alias: | Launcher: |
---|---|---|
EM | Instrument | scope |
PresetsManager | Presets Manager | main |
DriftManager | Drift Manager | main |
MosaicClickTargetFinder | Square Targeting | main |
Acquisition | Grid | main |
MosaicTargetMaker | Grid Targeting | main |
Navigator | Navigation | main |
Corrector | Correction | main |
Acquisition | Square | main |
Acquisition | Hole | main |
HoleFinder | Exposure Targeting | main |
HoleFinder | Hole Targeting | main |
FFTMaker | Focus FFT | main |
Focuser | Z Focus | main |
Focuser | Focus | main |
FFTMaker | Exposure FFT | main |
Acquisition | Exposure | main |
< "Calibrations" Application | "MSI-T" Application >
The basic flow of "MSI-raster" is the same as other MSI applications. HoleFinder class nodes are replaced with RasterFinder in the application. Node aliases that refer to Hole are replaced with Sub-square. The bindings of the corresponding nodes are the same as those in MSI-Edge and MSI-T.
Node Class: | Node alias: | Launcher: |
---|---|---|
EM | Instrument | scope |
PresetsManager | Presets Manager | main |
DriftManager | Drift Manager | main |
MosaicClickTargetFinder | Square Targeting | main |
Acquisition | Grid | main |
MosaicTargetMaker | Grid Targeting | main |
Navigator | Navigation | main |
Corrector | Correction | main |
Acquisition | Square | main |
Acquisition | Sub-square | main |
RasterFinder | Exposure Targeting | main |
RasterFinder | Sub-square Targeting | main |
FFTMaker | Focus FFT | main |
Focuser | Z Focus | main |
Focuser | Focus | main |
FFTMaker | Exposure FFT | main |
Acquisition | Exposure | main |
< "MSI-T" Application | "MSI-Tomography" Application >
"MSI T" is identical to "MSI" with one exception. All HoleFinder class nodes are replaced with JAHCHoleFinder in the application.
< "MSI-Edge" Application | "MSI-raster" Application >
The main difference from MSI are the replacement of Exposure node with Tomography, and the addition of Tomography Preview, "Align ZLP", and "Measure Dose" nodes
Node Class: | Node alias: | Launcher: |
---|---|---|
EM | Instrument | scope |
PresetsManager | Presets Manager | main |
DriftManager | Drift Manager | main |
MosaicClickTargetFinder | Square Targeting | main |
Acquisition | Grid | main |
MosaicTargetMaker | Grid Targeting | main |
Navigator | Navigation | main |
Corrector | Correction | main |
Acquisition | Square Q | main |
Acquisition | Hole Q | main |
ClickTargetFinder | Tomography Targeting | main |
ClickTargetFinder | Hole Targeting | main |
FFTMaker | Focus FFT | main |
Focuser | Z Focus | main |
Focuser | Tomo Focus | main |
Acquisition | Tomography Preview | main |
Tomography | Tomography | main |
MeasureDose | Dose Measurement | main |
AlignZeroLossPeak | Align ZLP | main |
< "MSI-raster" Application | "Manual" Application >
This application is mainly a shortened MSI application without any focusing and limit the imaging to intermediate mag.
Square Target Filtering node belongs to CenterTargetFilter Class and is unique to "Robot-MSI-Screen 1st Pass" application. It filters the centerred most target per parent image so that the screening samples are spread out through the grid. If you want more targets to pass through, simply increase the value in its settings. This is unique for this application.
Refers to MSI-Raster or MSI in General for the functions of the following nodes
< Robot node | Evaluation application >
This application transforms the targets selected from Evaluation according to the rotation and shift of the second grid insertion and acquires high mag images with focusing.
Images taken are:"2nd Pass Targeting" node is unique to "Robot-MSI-Screen 2nd Pass" application. It displays the grid atlas from the first pass and the targets selected on them. It also allows editing of the targets. Once submitted, it alsow perform the acquisition of an initial gr image for target transformation and the calculation and application of the transformation. The refresh tool is used to refresh target status and the submit tool for starting target processing.
Refers to MSI-Raster or MSI in General for the functions of the following nodes
The 2 Way Viewer allows you to view the selected image in two image view panes side by side. The following example shows the original mrc image next to its Fourier transform. For more details see Image Viewer Overview.
2 Way Viewer Screen:
< Image Viewer | 3 Way Viewer >
The 3 Way Viewer allows you to view the selected image in 3 adjacent Image View panes. The following example shows the original mrc image along with a heat map view and Fourier transform. For more details see Image Viewer Overview.
3 Way Viewer Screen
< 2 Way Viewer | Dual Viewer >
The Acquisition node is the base node to acquire images with in a Leginon application. This node receives a Published Target List and navigates to each target using the specified Move Type. Then, an image is acquired and published to the database. Acquisition and Click Target Finders go together. The Click Target Finder nodes generate the list of targets and the Acquisition acquires images at each target. More than one preset can be assigned as a sequence to a single acquisition node; therefore, multiple images can be taken at each target. The ability to acquire many images at one target is how a defocal high magnification pair of images can be taken in the MSI application.
Required bindings:
AcquisitionNodeAlias- (ChangePresetEvent) -> PresetsManagerNode
PresetsManagerNode - (PresetChangedEvent) -> AcquisitionNodeAlias
Bindings with the previous target makers or click target finder and the next click target finder:
TargetMakerNodeAlias - (ImageTargetListPublishEvent) -> AcquisitionNodeAlias
AcquisitionNodeAlias - (TargetListDoneEvent) -> TargetMakerNodeAlias
AcquisitionNodeAlias - (AcquisitionImagePublishEvent) -> ClickTargetFinderNodeAlias
ClickTargetFinderNodeAlias - (ImageProcesstDoneEvent) -> AcquisitionNodeAlias
Optional Bindings with DriftManager to allow target correction after drift:
AcquisitionNodeAlias - (NeedTargetShiftEvent) -> DriftManagerNodeAlias
DriftManagerNodeAlias - (AcquisitionImageDriftPublishEvent) -> AcquisitionNodeAlias
Optional Bindings with Navigator to allow (iterative) target move correction:
AcquisitionNodeAlias - (MoveToTargetEvent) -> NavigatorNodeAlias
In order to move to the target, Acquisition node uses either PresetsManager or Navigator. Moving handled by PresetsManager is the original design of Leginon which uses the calibration of the parent image where the target comes from to perform a single move, and it works for all move types. Moving handled by Navigator is a new feature available starting v1.3. Apart from single move, identical to that of PresetsManager, it
can perform iterative move correction that checks move error by locally correlating to the original image around the target and only stops trying when the error is below a threshold. As of v1.3, this function does not work with image shift move type.
Defines a subclass of TargetWatcher, defining a specialized processTargetData method which acquires images at each target using a detailed set of user preferences.
processTargetData
You may have a grid that requires additional focusing step at either Z_Focus or Focus node that is not available to be activate in Leginon by default. In this case, a new step can be added using this instruction:
< Optimizing Autofocus | Queuing option >
If your webserver installation is successful, a number of tables will be propagated in the databases. There were several options for setting up databse user privileges recommended in Database Server Installation. The following additional steps should be taken, depending on which option you previously used.
GRANT DELETE ON leginondb.ViewerImageStatus TO usr_object@'localhost'; GRANT DELETE ON projectdb.shareexperiments TO usr_object@'localhost'; GRANT DELETE ON projectdb.projectowners TO usr_object@'localhost'; GRANT DELETE ON projectdb.processingdb TO usr_object@'localhost';
GRANT DELETE ON projectdb.gridboxes TO usr_object@'localhost'; GRANT DELETE ON projectdb.grids TO usr_object@'localhost'; GRANT DELETE ON projectdb.gridlocations TO usr_object@'localhost';
GRANT DELETE ON leginondb.ViewerImageStatus TO usr_object@'%.mydomain.edu'; GRANT DELETE ON projectdb.processingdb TO usr_object@'%.mydomain.edu';
GRANT DELETE ON projectdb.gridboxes TO usr_object@'%.mydomain.edu'; GRANT DELETE ON projectdb.grids TO usr_object@'%.mydomain.edu'; GRANT DELETE ON projectdb.gridlocations TO usr_object@'%.mydomain.edu';
< Web Server Installation | Installation on the microscope computer>
By switching to svn package check out, you now need to install svn on Windows to get the
updated packages. Because numextension and libCV requires extra compiler, we have created
window installer for them for python 2.5 and made them available through http://www.leginon.org/
See Installation Troubleshooting and the Leginon Forum searching
for "install" if you run into problems.
Here are the packages you need to install with python installer
SVN Package Name | Installed Python Package Name | Reason for update: |
---|---|---|
leginon | Leginon | new features |
pyami | pyami | clean up |
sinedon | sinedon | new stuff |
pyScope | pyScope | new instrument configuration |
ImageViewer | ImageViewer | updated and required for tomography |
comarray | comarray | new for Gatan and Eagle camera |
Because numextension and libCV requires extra compiler, we have created window installer
for them for python 2.5 and made them available through http://www.leginon.org/
Downloadfile Name | Installed Python Package File | Reason for update: |
---|---|---|
NumExtension-1.2.0.win32-py2.5.exe | numextension.pyd | clean up |
libCV-0.2.win32-py2.5.exe | libCV.pyd | bug fixes |
Although new installation overwrite the old in most cases, problem has been observed in
the past. Therefore, it is best to remove the old files before new installation.
Use "Add or Remove Programs" application in "Control Panel" to do this. Leginon related
packages are shown with prefix "Python 2.5"
If you didn't use Installer to install previously, the packages may not show up in the
Programs list. Simply remove the folder containing the old packages in this case.
By switching to svn package check out, you now need to install svn client on Windows to
get the updated packages. We recommand TortoiseSVN http://tortoisesvn.tigris.org/ .
cd Your_Download_Place\Leginon-1.6-ALL\leginon c:\\python25\python.exe setup.py install
Excute the installer files and follow the instruction.
Additional Package required from NRAMM for Gatan camera or camera that uses TIA
comarray package need to be install with python
Modify the file instruments.cfg in the installed pyScope directory.
[tem] class: tecnai.Tecnai [camera] class: gatan.Gatan The file contains other examples of microscope and camera drivers that we distribute from NRAMM.
From a command line window:
cd C:\python25\Lib\Site-Packages\pyScope C:\python25\python.exe updatecom.py
This should generate a few files, including tecnaicom.py, gatancom.py and tietzcom.py, in the same directory.
In the View Projects page
< Go to project tools page | Edit an existing project >
In the View Projects page
< Setup steps needed in database Administration Tools | Test Leginon with Simulator >
In the View Projects page
After a new installation, you will have to input Groups,Users to the database you have just created. You may want to import new Applications later or revert Leginon node settings. These tasks can be performed through the web-based Administration Tools.
< Complete Installation | Using Project Management Tools >
How do you know it is imcomplete? View the application saved in the database in the web admin tool
Solution: Try it again.
< Installation/Update problems | Test run operation problems >
< Running "Manual" Application | Using the Web viewer >
For those interested, this is how I set up Leginon on the TF20 in the
Kornberg lab at Stanford with the following configuration:
--Norton firewall settings on TF20SUPPORT_COMPUTER configured to allow
communication to both '1' and '3'.
--Appropriate IP addresses and hostnames added to the hosts files
(C:/WINDOWS/System32/drivers/etc/hosts.txt on Windows PC's and
/etc/hosts on Linux). '2' and '3' listed in hosts file on '1'; '1' and
'3' listed in hosts file on '2'; and '2' only listed in hosts file on
'3' since all communication from '1' to '3' through '2' will appear to
come from '2'.
--Program for port forwarding (AUTAPF) installed on TF20SUPPORT_COMPUTER
and set up to forward all appropriate ports to IP address of the router
on TECNAI_COMPUTER that connects to TF20SUPPORT_COMPUTER.
Applications define how nodes are linked together in order to form a specialized Leginon application or program. Because Leginon uses a nodal or modular archetecture, multiple applications can be created by linking together nodes in different fashions suitable for the current experiment. Several default Leginon applications are distributed with the release. This section enables the Leginon user to import and export applications.
It should contain tables of Application Data, NodeSpec Data, and likely BindingSpec Data.
< Revert Settings | Goniometer >
The Leginon Team (B. Carragher, A. Cheng, D. Fellmann, F. Guerra, C. Irving, G. Lander, P. Mecurio, C. Potter, J. Pulokas, J. Quispe, B. Sheehan, S. Stagg, C. Suloway, N. Voss, and C. Yoshioka)
Three functions have to be performed in Beam Tilt node to perform defocus, stigmation and
z-height corrections used in autofocus procedures. Defocus and stigmator calibration are
required for defocus/stigmation correction. These plus a record of eucentric focus value are
required for the z-height correction to eucentric height.
Beam Tilt Defocus/Stigmator Calibration and Eucentric Focus Recording Need for the Example MSI:
Preset | magnification |
hl | 5000 |
fa | 50000 |
The Beam Tilt Stigmator calibration is used by Leginon to correct astigmatism. This
calibration functions well if the microscope has been well aligned first. Stigmation
correction at low mag such as 5000x is not necessary practically but the calibration is
still required for the equation used in autofocusing.
Once both Defocus and Stigmation are calibrated against beam-tilt induced image shift,
the two can be measured using the Measure Function in the Toolbar.
Trouble Shooting:
Encentric Focus From/To Scope (From/To Scope icons) do what they indicate. The "from
Scope" function simply records the current absolute focus value at the scope.
Therefore,
Rotation Center From/To Scope (From/To Scope icons) do what they indicate. The "from Scope" function simply records the current beam tilt value at the scope. Therefore,
< Checking Matrix and Modeled Stage Position Calibration | Dose (Camera Sensitivity) Calibration >
To protect your program installation.
The database are the metadata generated by Leginon and Project management system, leginondb and projectdb, respectively in the installation
example.
The image files located in [your storage disk] should be backup in full at least once
a month, and nightly in differential or incremental mode.
Because our tape backup system is not on-site and the data have to transfer over slow
network to perform the task, we have not been able to backup in the ideal setting. Here is
what we currently do:
TSRI Research Computing provides regular back up service that does full backup of the
computers every four weeks and incremental backup every night. The full backup expires in
4 months and the incremental backup one month. We do this for the computers running
Leginon main program, the database server, as well as the web server.
On top of the TSRI backup, we also tar the database everynight and store it on the
institutional tape library.
As our image storage disks total 15T byte, we currently use rsync function to update a
copy on our institutional tape library. It creates new files, updates old files, but does
not remove old files on the tape if it is removed on the storage disk. We do not think
this is the best solution since it is not possible to retrieve old files that have been
modified on a later time.
The BeamFixer acquires 3x3 images at the requested beam shift step size centered around
the current value to find the best beam shift and then update the value to Presets Manager. A
list of presets that the update is to be applied is entered in the settings and the first
preset in the list is used for the best beam shift determination. The beam shift step size is
relative to that of the imaging area of the first preset, too.
Required bindings:
AcquisitionNodeAlias - (FixBeamEvent) -> BeamFixerNode
BeamFixerNodeAlias - (PresetChangeEvent) -> PresetsManagerNode
BeamFixerNodeAlias - (UpdatePresetEvent) -> PresetsManagerNode
PresetsManagerNode - (PresetChangedEvent) -> BeamFixerNodeAlias
Target Required:
Reference Target (best of an empty area)
< Acquisition | Beam Tilt Calibrator >
Beam shift matrix calibrations are used at each magnification that Leginon uses. These
calibrations are not absolutely necessary, but can be very helpful to center the beam in the
navigator node. In this case, the image of a small beam within the CCD is treated as an object
in the image. When the beam is shifted by the electromagnetic lenses of the microscope, the
imprint of the beam moves relative to the CCD. The 2x2 transformation matrix created then
relates the values sent to the microscope and the amount of "beam shift" movement seen on the
CCD imaging area. Only one set of measurement is sufficient for beam shift matrix
calibration.
How does matrix calibration work?
Beam Shift Calibration Need for the Example MSI:
<filename>Preset</filename> | <filename>magnification</filename> |
gr | 120 (rarely used) |
sq | 550 (rarely used) |
hl | 5000 (seldom used) |
11000 (useful in beam shift alignment tool in Presets Manager to align the beam at 50000x) |
|
fc,fa,en,ef | 50000 (useful) |
*The Presets Manager beam shift alignment tool works best using ~5x lower magnification than the
preset meant to be aligned in order to see the whole beam in view. This means that for
fc,fa,en,ef that are at 50000x, a calibration at 11000x is required at the similar defocus
range.
< Image Shift matrix calibration | Stage Position matrix calibration >
The Beam Tilt Calibrator is in fact the calibrator for autofocus. This calibration functions well if the microscope has been well aligned first. The three main functions are defocus calibration, stigmator calibration and storage/retrieval of eucentric focus
Required bindings to use preset instrument configuration set by presets manager:
PresetsManagerNode - (PresetChangedEvent) -> BeamTiltCalibratorNode
This value gives the first defocus from current defocus=0 point where images are acquired and correlations compared.
This value gives the second defocus from current defocus=0 point where images are acquired and correlations compared.
The defocus or stigmation that is measured will appear in the corresponding fields once the measurement has finished.
< BeamFixer | Beam Tilt Imager >
To achieve high resolution, the electron beam is best to be parallel and aligned with the optical axis of the lenses at the specimen. This is particularly important if better than 5 Angstrum resolution is required.
For example, at NRAMM, we improved our parallelity of the same illumination area in the final exposure by switching from 100 um C2 aperture with C1 spot 5 to 50 um C2 aperture with C1 spot 3.
If the image acquired at on-axis average beam tilt (theta=0) has minimal astigmation in its power spectrum (or diffractogram), the more the beam is tilted away from the optical axis, the stronger astigmation would be observed. The "Beam Tilt Imager" node in the application generate Diffractogram tableaus by user-defined additional beam tilt and number of tilt directions to be measured. The objective is to adjust the average beam
tilt value so that the the diffractograms of the tilts in the opposite but equal value relative to the average beam tilt look similar.
< Beam Tilt Calibrator | Click Target Finder >
Bright and Dark reference images need to be acquired for every camera setting that will
be used. The camera settings include image dimension, bin size, and offset. Over time,
references may need to be repeatedly acquired.
When two flat-field-corrected images are correlated, there is often an origin peak
derived from the common normalization image even if both image acquisition contains only
noise. In order to avoid this problem, two or more sets of bright/dark references, and hence
normalization images can be obtained per CCD camera configuration. When a correlation
between two images will be done, Leginon will check the channel of the correction the first
acquired image has used and then force the new image to be corrected by a different
channel.
To use this function, simple set the number of channels to 2 or larger in
Correction/Settings/Image Correction/Reference Creation> while creating the reference
images.
Bright/Dark Reference Image Need for the Example MSI:
Dimension after binning | Bin | number of correction channels |
4096 | 1 | 1 or 2 if used for tomo preset |
1024 | 4 | 2^*^ |
1024(centered) | 1 | 1^**^ |
512 | 8 | 2^***^ |
512 (centered) | 1 | 1^***^ |
-This camera configuration is used in preset beam shift alignment even if you don't use it for a preset.
-This camera configuration is used in Manual Application Manual Focusing even if you don't use it for a preset.
-These camera configurations are used in preset image shift alignment even if you don't use it for a preset.
The Despike feature removes random bright or hot pixels from the acquired images. This
hot pixel is assigned the average intensity of the surrounding area, a circle of the radius
which is entered in Neighborhood Size. The Despike Threshold is the number of standard
deviations away from the mean that qualifies a pixel for despike correction. The despike
affects the flat-field corrected image saved on the disk and can not be recovered.
Therefore, use a minimal neighborhood size to avoid artifact and set the threshold high to
avoid over-despiking.
Activation of this feature and its parameter settings are defined when in the pop-up dialog for "Edit Correction Plan". See below.
Bad Pixel, Rows and Bad Cols are used to crop portions of the image that do not read
well off of the CCD. The values entered into here are determined empirically for each
instrument that Leginon operates on. If one column or row of the images is incorrect,
measure the location of the row and column that need to be removed from this image. These
values should then be entered as a sequence of values separated by commas by editing the
Plan. Click Save after adjusting.
Individual bad pixel can also be corrected by its surrounding pixels. Choose these
pixels with the selection tool on the image and then click on "Grab From Image".
When a single pixel is defected, it may not be easy to find it on a large image, even if
it changes the stats dramatically. A tool is available to help finding these pixels:
When a large region is covered by a fallen chip, image correction through bright/dark
reference may not be sufficient to produce a spike-free image since the bright and dark
values in the region are almost identical. To add such a large region into bad pixel plan,
do the following:
< Pixel Size Calibration | Image Shift matrix calibration >
.
This list is updated with each release of 2.0.x
< New Web Tool Features | Known Bugs >
This list is updated at each release of 2.1.x
< New Web Tool Features | Known Bugs >
Good calibrations are absolutely essential to running Leginon. They can also be very time consuming. As a way of rudimentarily starting up without calibrating the current instrument specifically or perhaps to revert to a previously saved calibration, this import/export calibration tool can be quite useful.
Two calibrations are needed for proper operation of Leginon MSI applications
Gatan camera setup >
Tietz camera setup >
Calibrations can be made without presets although not as conveniently. For each of the
calibration node, the following need to be done before the calibration or even before
acquiring a test image.
< Creating Presets for the first time | Pixel Size Calibration >
The Navigation node is quite useful because it allows the user to test many of the
calibrations that have been completed, such as image shift, beam shift, stage position,
modeled stage position, and dose measurements (indirectly). Additionally, Navigator could be
used to simply navigate across the grid in the microscope using Leginon calibrations.
A particular calibration, "stage position, image shift, modeled stage position, or beam
shift," can be chosen to navigate bases on the current image in Navigator. For example,
clicking on the center of a beam offset to the side in the acquired CCD image with The "beam
shift" move type will center the beam around the point where the mouse was clicked.
Navigation, especially navigation by stage position movement, has error that is larger
at larger moving distance. Therefore, the accuracy of the navigation by stage movement can
be improved by multiple moves. By specifying the tolerance of the navigation error, Leginon
can achieve more accurate navigation. This feature is activated by giving a non-zero value
for "Move to within xx m of clicked position" within Navigator for direct click-and-move or
from an Acquisition node class that uses Navigator as the mover.
When Acquisition node class uses Navigator as the mover, you may want to check the
"Preset cycle after each move" option reduce hysteresis. The downside of this is that it can
take a lot of time.
Calibration Error Checking is on by default in settings. It calculates and displays how
much error there is between the targets that were selected and how accurate the selected
calibration moved to that target. When calibrated properly, the image shift error should
always be better than 1 % of the image dimension, beam shift 5 %, modeled stage position
< 1.5 um, and stage position < 5 um On our FEI Tecnai microscopes.
Save (x, y) stage positions in the Stage Locations section to revisit the same positions later.
Keep the From Scope gets X and Y Only check box enabled is a general practice.
< Modeled Stage Position calibration | Autofocus Calibration with Beam Tilt Node >
Create the following info.php in your web server document root directory (/var/www/html on CentOS. /srv/www/htdocs on SuSE. You can find its location in httpd.conf mentioned above under the line starting DocumentRoot).
sudo nano /var/www/html/info.php
Copy and paste the following code into info.php:
<?php phpinfo(); ?>
Restrict access to your info.php file.
sudo chmod 444 /var/www/html/info.php
Visit this page at http://HOST.INSTITUTE.EDU/info.php or http://localhost/info.php
You will see comprehensive tables of php and apache information, including the location of the additional .ini files, extension, include path, and what extension is enabled.
Here is an example screen shot of the part of the info.php page that tells you where php.ini and other configuration files are. This information will be used while installing components of the Web Server.
< Install Apache Web Server | Download Appion and Leginon Files >
Click Target Finder is a basic node that takes input images and allows the user to manually select targets on the input image. The image target list is the output of this node. Because most of its subnodes such as Holde Finder and RasterFinder have the option of skipping automatic finding, they can perform the job of this base class. Therefore, the node is seldom used.
Required bindings for recieving images and publishing targets:
previous Acquisition or Focuser- (AcquisitionImagePublishEvent) -> ClickTarget Finder
ClickTargetFinder - (ImageTargetListPublishEvent) -> next Acquisition or Focuser
ClickTargetFinder - (QueuePublishEvent) -> next Acquisition or Focuser
ClickTargetFinder - (ReferenceTargetListPublishEvent) -> AlignZeroLossPeak or MeasureDose
Required bindings for proper waiting among nodes:
ClickTargetFinder- (ImageProcessDoneEvent) - > previous Acquisition or Focuser
next Acquisition or Focuser- (TargetListDoneEvent) - > ClickTargetFinder
This node only has the ability to display target types and submit (send) new image targets to another node via the Submit Targets button.
< Beam Tilt Imager | Corrector >
Image Viewers allow you to view the images that are associated with a particular session (or experiment). You may select a project from a drop down list, then select a session in that project. The images belonging to that session appear in an Image List and the selected image is displayed in the Image View.
Name | Description |
---|---|
Project Drop Down List | Projects that you own or have been shared will appear in the list. Select one to view. |
Session Drop Down List | Sessions that belong to the currently selected Project will appear in the list. Select one to view. |
Image List | The images belonging to the currently selected Session will appear in the Image List. The selected image will appear in the Image View. The total number of images is displayed at the top of the list. |
Image View | The selected image will be displayed in the Image View. The Image View may be configured using the Image Tools controls located directly above the Image View. |
Image Tools | Includes many basic image manipulation features such as filtering and Fourier Transform. |
Image Viewer Screen:
Used to remove queued targets on the image shown in the viewer and queued targets chosen on its direct descendant images. Clicking on it gives the number of active queued targets and the user can choose to remove them from the active list.
Viewer Name | Viewer Features |
---|---|
Image Viewer | provides a single image pane |
2 Way Viewer | provides 2 image panes for viewing the same mrc file in different ways side by side |
3 Way Viewer | provides 3 image panes for viewing the same mrc file in different ways |
Dual Viewer | provides 2 image panes for viewing separate mrc images side by side |
RCT | provides 2 images panes for viewing Tomography tilt images |
^ Image Viewers | Image Viewer >
The 64bit Ace2 binary is already available in the myami/appion/bin directory.
Test it by changing directories to myami/appion/bin and type the following commands:
./ace2.exe -h ./ace2correct.exe -h
If it is working the help commands will display.
It is highly recommended to use the Ace2 binary, if it works.
< Compile FindEM | Install Imod >
Name: | Download site: | yum package name | SuSE rpm name |
---|---|---|---|
compat-gcc-34-g77 | compat-gcc-34-g77 | ||
gcc-gfortran | gcc-gfortran |
Both 32 and 64 bit findem binaries are already available in the myami/appion/bin directory.
Test it by changing directories to myami/appion/bin and type the following commands:
./findem64.exe (64 bit version) or ./findem32.exe (32 bit version)
If the binary included with Appion does not work, or you wish to compile it yourself follow the instructions to install FindEM from source.
< Install Grigorieff lab software | Install Ace2 >
sudo yum install libgomp
cd myami/modules/radermacher
$ python ./setup.py build
$ sudo python ./setup.py install
$ python
>>> import radermacher >>> <Ctrl-D>
< Compile Ace2 | Install Xmipp >
Instructions for installing CentOS on your computer
< Upgrade Instructions | Leginon Administration Tools >
For older versions of Appion and Leginon (pre-2.2), please use the following instructions:
Instructions for Appion and Leginon versions prior to 2.2
python import sys sys.path
A skeleton (default) configuration file is available:
/path/to/myami/leginon/leginin.cfg.template
Copy leginon.cfg.template to leginon.cfg.
sudo cp -v /path/to/myami/leginon/leginin.cfg.template /etc/myami/leginon.cfg
Edit the newly created file and add a directory for images. Make sure you have permission to save files at this location. See File Server Setup Considerations for more details
You may put in a fake path on the microscope PC installation and ignore the error message at the start of Leginon if you follow our general rule of not saving any image directly from the microscope pc,
[Images] path: your_storage_disk_path/leginon
This serves as the global leginon configuration.
For individual Leginon users, the above file can be copied to their home directory and the following added once they have registered as a Leginon user. This extra configuration will allow individual user to skip the step of selecting his/her name from the user list.
[User] fullname: your_firstname your_lastname
< Install Appion/Leginon Packages | Configure sinedon.cfg >
Edit the following items in php.ini (found as /etc/php.ini on CentOS and /etc/php5/apache2/php.ini on SuSE)
sudo nano /etc/php.ini
so that they look like the following:
error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING
display_errors = On
register_argc_argv = On
short_open_tag = On
max_execution_time = 300 ; Maximum execution time of each script, in seconds
max_input_time = 300 ; Maximum amount of time each script may spend parsing request data
memory_limit = 256M ; Maximum amount of memory a script may consume (8MB)
You may want to increase max_input_time and memory_limit if the server is heavily used. At NRAMM, max_input_time=600 and memory_limit=4000M.
You should also set timezone using one of the valid string found at http://www.php.net/manual/en/timezones.php like this:
date.timezone = 'America/Los_Angeles'
< Install Web Server Prerequisites | Install Apache Web Server >
For older versions of Appion and Leginon (pre-2.2), please use the following instructions:
Instructions for Appion and Leginon versions prior to 2.2
python import sys sys.path
Sinedon is an object relational mapping library designed to interact with the Leginon and Appion databases.
[global] #host: your_database_host host: localhost user: usr_object passwd: [projectdata] db: projectdb [leginondata] db: leginondb
Note: If you are a developer, and you need to use sinedon.cfg settings that are different from the global settings, you may create your own sinedon.cfg file and place it in your home directory. This version will override the global version located in the site packages directory.
[robot2] db: leginondb
Corrector handles image corrections before it is displayed and saved. It has three functions:
Required bindings: None
Flat field correction removes the contribution of dark current to the intensity and artifacts on the CCD camera that are reproducible, for example, the patterns of the fiber optic plate and debris fall and remain stationary on the CCD.
Dark images record the residual intensity recorded by the CCD for the same length of acquisition time as the chosen camera configuration but with no electron beam present. Bright images record the raw image under the same condition except that the camera is flooded with uniform electron beam.
Let the mean of an image be avg(Image)
Normalization_Image_Pixel_Value = [avg(Bright_Image-Dark_Image)]/(Bright_Pixel -Dark_Pixel)
Flat-Field_Corrected Image_Pixel_Value = (Raw_Image_Pixel_Value) * (Normalization_Image_Pixel_Value)
Some Leginon functions requires more than one image, for example the cross/phase correlation done in drift monitoring of Drift Manager node. When the node acquires a new image that will be used to correlated to an old image, it checks the correction channel that the old image used, and force the new image to use a different correction channel. This process eliminates the origin correlation peak produced by identical noise in the two images when the same correction channel is used.
Best to use an exposure time/intensity similar to the data acquisition
Both methods are applied per pixel. Average is used normally. Medium is used when x-ray spikes are a common problem and requires a larger number of combining images.
Correction plan is a list of bad columns, rows, and pixels that tend to give non-repeating error readings. A good example is often found at the last columns of the CCD. Because their non-repeating nature, flat-field correction can not remove their contribution.
The correction plan is associated to individual instrument, camera, and camera configuration.
Intensity clipping and image despike are done after flat-field correction. Intensity clipping simply replace pixel values that is outside the min/max range with the limits. Despike defines a hot pixel as a pixel that has intensity higher than the threshold multiples of standard deviation above the mean of a neighborhood box. The intensity of the hot pixel is replaced by the mean of the neighborhood box.
The settings related to these two corrections apply to all camera configuration and images passed through Corrector.
When a single pixel is defected, it may not be easy to find it on a large image, even if it changes the stats dramatically. A tool is available to help finding these pixels:
When a large region is covered by a fallen chip, image correction through bright/dark reference may not be sufficient to produce a spike-free image since the bright and dark values in the region are almost identical. To add such a large region into bad pixel plan, do the following:
< Click Target Finder | Dose Calibrator >
This application is meant to demonstrate how to create applications with event bindings in Leginon. This application has little functionality other than being able to take one image at a time at a given preset.
Node Class: | Node alias: | Launcher: |
---|---|---|
Corrector | cor | main |
SimpleAcquisition | simple_acq | main |
PresetsManager | pm | main |
EM | em | scope |
Node to alias: | Event Binding: | Node from alias: |
---|---|---|
pm | ChangePresetEvent | simple_acq |
simple_acq | PresetChangedEvent | em |
< Edit an existing application as an xml file | "Calibrations" Application >
Configuring the Presets are critical to many different applications. Presets describe
camera configurations such as image size and exposure time as well as many other microscope
parameters such as magnification and defocus. Setting presets in calibration application is
optional but recommended for determining what calibrations are needed for future runs.
MSI presets can be customized to your need of data collection. By matching
nodes/subnodes in MSI with presets and move types, the behavior of the node is
defined.
See the section on Designing Presets in the chapter
for MSI application for more explanations on the presets standardized at NRAMM which we will
reference in this chapter, we use here the nomenclatures at NRAMM that is used to collect
defocus paired images with four scales of targeting ant two sequences of focusing using an
MSI application. You will need to adjust the preset parameters for your own camera, scope,
as well as the grid mesh you use.
The table shows an example of the presets for an MSI application. For calibration
purpose, undefined image shift can be left as what received from the scope. Beam intensity,
spot size, and should be adjusted to give reasonable signal to noise ratio for usable
exposure time and for the beam to cover the whole CCD. The exact setting of exposure time
can be set later after bright and dark images are collected.
Example MSI preset initial parameters:
Magnification: | Preset name: | Image Shift (x,y): | Binning: | Dimension: | Beam Coverage: | Exposure Time (ms): | Spot Size: | Defocus (m): |
---|---|---|---|---|---|---|---|---|
120 | gr | as is* | 8 | 512 | max | 20 | 4 | 0.0 |
550 | sq | as is* | 4 | 1024 | 1x CCD size | 100 | 4 | -2e-3 |
5000 | hl | as is* | 8 | 512 | 1x CCD | 20 | 4 | -1.5e-4 |
50000 | fc | 0,0 | 1 | 512 | <~ 1x CCD | 300 | 4 | -2e-6 |
50000 | fa | 0,0 | 4 | 1024 | >2x CCD | 50 | 4 | -2e-6 |
50000 | en | 0,0 | 1 | 4096 | 2x CCD | 170 (10e/A^2) | 4 | -1e-6 |
50000 | ef | 0,0 | 1 | 4096 | 2x CCD | 170 (10e/A^2) | 4 | -2e-6 |
*Use whatever image shift from the microscope when the preset is newly created. These will be aligned later.
If Presets are not ordered as in the table above, we recommend that they are rearranged
for efficient cycling. Cycling is important for minimizing hysteresis effect on em optics
and targeting and are defaulted to be on in Presets Manager Settings. To reduce cycling
time, it is best to group the presets that often occur consecutively in order. For example,
the typical MSI preset order as in the table above.
With cycling activated as default, the preset beam shift may behave differently from
that was first created. The following procedure check, adjust, and save the presets
parameters with cycling accounted for.
With presets created, calibrations at different magnifications can be changed by sending
the corresponding preset to the scope.
Calibration status of a preset is displayed in PresetsManager right below the message
log panel. This section is very useful for troubleshooting calibration problems. Over time,
certain calibrations may need to be repeated. This section will display the latest
calibration date related to the current preset.
Check this section to see which calibrations the new preset will need to be
completed.
< Startup | Pixel Size Calibration >
Any image can be used as a template for the hole finder. If you create your own, you just need to point the node preference to the right mrc file. Our philosophy for the template distributed with the Leginon package (your leginon python source path/holetemplate.mrc) was to make a hole template that had the average features of a 2 micron hole covered in vitreous ice. To accomplish this, we took fifty images of holes acquired by Leginon at 5000X magnification. Holes were then boxed out of these images using the boxer utility in the EMAN package making sure that the holes were in the center of the box.
Figure 1-Boxing a hole
The hole images were then assembled into a single Imagic stack. Since the hole images were well centered, they were then averaged to produce an image of an average hole (fig. 2). Finally, the average hole image was rotationally averaged to produce a symmetrical generalized hole image (fig. 3).
Figure 2-Average of 50 holes
Figure 3-Rotationally averaged final template.
The following is the EMAN program and parameters associated with each step.
1. For 10-50 hole images, run boxer to box out holes and save them as a pair of IMAGIC file (hole.hed and hold.img).
boxer <hole_image.mrc>
2. Average hole images and save the output as an MRC image file.
proc2d hole.hed average.mrc average
3. Rotationally average the average hole image and save as an MRC image file.
proc2d average.mrc rotav.mrc rotav
4. The result is the new hole template.
< Summary of this application | Hole Targeting Set-up for MSI-T >
The following is for the computer that hosts the databases. This involves installing MySQL server and creation/configuration of the leginondb and projectdb databases.
Note: You may already have MySQL Server and Client installed. Check by typing mysql at the command line.
If you see a MySQL prompt (mysql>), you may skip this step.
To install Mysql on Linux you have two options (the first option is better):
sudo yum install mysql mysql-server
yast2 -i mysql mysql-client
They are usually located in /usr/share/mysql.
ls /usr/share/mysql/my* /usr/share/mysql/my-huge.cnf /usr/share/mysql/my-innodb-heavy-4G.cnf /usr/share/mysql/my-large.cnf /usr/share/mysql/my-medium.cnf /usr/share/mysql/my-small.cnf
locate my | egrep "\.cnf$" /etc/my.cnf /usr/share/mysql/my-huge.cnf /usr/share/mysql/my-innodb-heavy-4G.cnf /usr/share/mysql/my-large.cnf /usr/share/mysql/my-medium.cnf /usr/share/mysql/my-small.cnf
sudo cp -v /usr/share/mysql/my-huge.cnf /etc/my.cnf
[mysqld]
section):query_cache_type = 1 query_cache_size = 100M query_cache_limit= 100M
default-storage-engine=MyISAM
For CentOS/Fedora/RHEL system use the service command:
sudo /sbin/service mysqld start
For other Unix systems:
sudo /etc/init.d/mysqld start
or on some installations (Suse),
sudo /etc/init.d/mysql start
For future reference: start | stop | restart MySQL Server with similar commands:
For Centos, Fedora
sudo /etc/init.d/mysqld start sudo /etc/init.d/mysqld stop sudo /etc/init.d/mysqld restart
sudo /sbin/service mysqld start sudo /sbin/service mysqld stop sudo /sbin/service mysqld restart
sudo /etc/init.d/mysql start sudo /etc/init.d/mysql stop sudo /etc/init.d/mysql restart
sudo /sbin/chkconfig mysqld on
sudo /sbin/chkconfig --add mysql
ls /var/lib/mysql ibdata1 ib_logfile0 ib_logfile1 mysql mysql.sock test
sudo mysqladmin create leginondb
sudo mysqladmin create projectdb
If starting from scratch, the mysql root user will have no password. This is assumed to be the case and we will set it later.
mysql -u root mysql
You should see a mysql prompt: mysql>
You can view the current mysql users with the following command.
select user, password, host from user; +------+----------+-----------+ | user | password | host | +------+----------+-----------+ | root | | localhost | | root | | host1 | | | | host1 | | | | localhost | +------+----------+-----------+ 4 rows in set (0.00 sec)
Create and grant privileges to a user called usr_object for the databases on both the localhost and other hosts involved. For example, use wild card '%' for all hosts. You can set specific (ALTER, CREATE, DROP, DELETE, INSERT, RENAME, SELECT, UPDATE
) privileges or ALL
privileges to the user. See MySQL Reference Manual for details. The following examples demonstrate some of the options available.
CREATE USER usr_object@'localhost' IDENTIFIED BY 'YOUR PASSWORD'; GRANT ALTER, CREATE, INSERT, SELECT, UPDATE ON leginondb.* TO usr_object@'localhost'; GRANT ALTER, CREATE, INSERT, SELECT, UPDATE ON projectdb.* TO usr_object@'localhost';
CREATE USER usr_object@'localhost'; GRANT ALL PRIVILEGES ON leginondb.* TO usr_object@'localhost'; GRANT ALL PRIVILEGES ON projectdb.* TO usr_object@'localhost';
CREATE USER usr_object@'%.mydomain.edu' IDENTIFIED BY 'YOUR PASSWORD'; GRANT ALTER, CREATE, INSERT, SELECT, UPDATE ON leginondb.* to usr_object@'%.mydomain.edu'; GRANT ALTER, CREATE, INSERT, SELECT, UPDATE ON projectdb.* to usr_object@'%.mydomain.edu';
# if your web host is local GRANT ALTER, CREATE, INSERT, SELECT, UPDATE ON `ap%`.* to usr_object@localhost; # for all other hosts if you are accessing the databases from another computer GRANT ALTER, CREATE, INSERT, SELECT, UPDATE ON `ap%`.* to usr_object@'%.mydomain.edu';
To set the root password use the command:
sudo mysqladmin -u root password NEWPASSWORD
Or you can do it from within mysql
update user set password=password('your_own_root_password') where user="root"; Query OK, 2 rows affected (0.01 sec) Rows matched: 2 Changed: 2 Warnings: 0 # run the flush privileges command to avoid problems flush privileges; ^D or exit;
From now on, you will need to specify the password to connect to the database as root user like this:
mysql -u root -p mysql
# at the command prompt, log into the leginon database mysql -u usr_object -p leginondb # At the mysql prompt show variables that begin with 'query'. # Check that the changes you made to my.cfg are in place. SHOW VARIABLES LIKE 'query%'; +------------------------------+-----------+ | Variable_name | Value | +------------------------------+-----------+ | ft_query_expansion_limit | 20 | | have_query_cache | YES | | long_query_time | 10 | | query_alloc_block_size | 8192 | | query_cache_limit | 104857600 | ---This should correspond to your change | query_cache_min_res_unit | 4096 | | query_cache_size | 104857600 | ---This should correspond to your change | query_cache_type | ON | ---This should correspond to your change | query_cache_wlock_invalidate | OFF | | query_prealloc_size | 8192 | +------------------------------+-----------+ 10 rows in set (0.00 sec) exit;If you do not see your changes, try restarting mysql.
sudo /etc/init.d/mysqld restart
mysqlshow -u root -p +--------------+ | Databases | +--------------+ | mysql | | leginondb | | projectdb | +--------------+
Be sure to edit PASSWORD to the one you previously set for usr_object.
php -r "mysql_connect('localhost', 'usr_object', 'PASSWORD', 'leginondb'); echo mysql_stat();"; echo ""
Expected output:
Uptime: 1452562 Threads: 1 Questions: 618 Slow queries: 0 Opens: 117 Flush tables: 1 Open tables: 106 Queries per second avg: 0.000
If there are any error messages, mysql may be configured incorrectly.
Note: If you do not have php and php-mysql packages installed you need to install them to run the above command. The yum installation is:
sudo yum -y install php php-mysql
< Where to register and download Leginon | File Server Setup Considerations >
Revert Settings is a tool for use with the Leginon image acquisition software.
Leginon settings for the applications are saved in the database during the installation. When a user use Leginon the first time, the settings or the Appion/Leginon administrator user will be loaded. The user can change them and Leginon will remember the new values from then on.
In the case that a user incorrectly modifies Leginon application settings, the user or an administrator may revert all the settings of a specific user to the default values.
< More about Groups | Applications >
Different Linux flavors often put web server and mysql-related files in different locations. This can be confusing. From experience, we found the equivalent on CentOS vs SuSE. Here we list them for reference. If your system uses different naming and you are willing to share your experience, please send us the list. We will add it here:
Table Different File locations and Commands on CentOS vs SUSE
File or Command Head | CentOS | SuSE |
---|---|---|
php.ini | /etc/ | /etc/php5/apache2/ |
httpd.conf | /etc/httpd/conf/ | /etc/php5/apache2/ |
default document_root | /var/www/html/ | /srv/www/htdocs/ |
apache start/stop/restart command head | /sbin/service httpd | /etc/init.d/apache2 |
mysql start/stop/restart command head | /sbin/service mysqld | /etc/init.d/mysql |
For a more detailed comparison of Apache file layout on different Linux distributions, see http://wiki.apache.org/httpd/DistrosDefaultLayout
Install Web Server Prerequisites >
Dose Calibration is a calibration of CCD sensitivity. This calibration is required only once at each high tension per instrument. It can be used for three purposes:
The following uses a Faraday cup
Dose Calibration Need for the Example MSI:
Preset | magnification |
---|---|
* | any |
< Autofocus Calibration with Beam Tilt Node
The Dose Calibrator calculates the electron dose at the current scope and camera state using the beam current of the Tecnai microscope. The information in term is used to calibrate the sensitivity of the CCD using the recorded dose measurement in counts/electron. Alternatively, a sensitivity value is directly inputted.
Optional bindings for using preset instrument configuration:
PresetsManagerNode - (PresetChangedEvent) -> DoseCalibrationNode
Other than standard Calibrator settings and tools, the calibrator node contains tools to move main microscope view screen to required position, and entries required for dose conversion. Dose calibration is only as accurate as the screen-current scale factor.
If you have not already downloaded the Appion and Leginon files,
Download Myami 2.1 (contains Appion and Leginon) using one of the following options:
This is a stable supported release available as a tar file.
myami-2.1.3.tar.gz
Unzip with
tar -zxvf myami-2.1.3.tar.gz
This is a stable supported branch from our code repository.
Change directories to the location that you would like to checkout the files to (such as /usr/local) and then execute the following command:
svn co http://ami.scripps.edu/svn/myami/branches/myami-2.1 myami/
This contains features that may still be under development. It is not supported and may not be stable. Use at your own risk.
svn co http://ami.scripps.edu/svn/myami/trunk myami/
< Check php information | Install the MRC PHP Extension >
Download Myami 2.1 (contains Appion and Leginon) using one of the following options:
This is a stable supported release available as a tar file.
myami-2.1.3.tar.gz
Unzip with
tar -zxvf myami-2.1.3.tar.gz
This is a stable supported branch from our code repository.
Change directories to the location that you would like to checkout the files to (such as /usr/local) and then execute the following command:
svn co http://ami.scripps.edu/svn/myami/branches/myami-2.1 myami/
This contains features that may still be under development. It is not supported and may not be stable. Use at your own risk.
svn co http://ami.scripps.edu/svn/myami/trunk myami/
< Install supporting packages | Perform system check >
< Getting Help | Pausing and Aborting during data collection >
The Drift Manager monitor has two functions. It works with Transform Manager to keep the accuracy of targeting through long experiment and certain operation such as the change of stage z position.
The first way of determining that drift is occurring is by measuring it directly. A drift measurement is initiated in one of two ways:
Drifting can also be assumed to have occurred without doing a measurement. This is done as a result of certain operations of Leginon:
In the above cases, whether drift is measured or assumed, a drift time stamp is entered into the database to mark when the drift occured. Acquisition nodes have an option "Adjust targets for drift" which causes them to look for these drift time stamps before processing a target and acquiring an image. If a drift occured after the target was created, the target is declared invalid. To adjust the target, the Acquisition node must send a request to the DriftManager to measure the total drift that has occurred since the target was created. The
DriftManager will load the target's parent image from the database and reacquire it under its original imaging conditions as a different version. The correlation shift is then stored in the database so that any target that came from this image can be adjusted in the same way.
Initiating drift monitoring by a focuser node requires two bindings to do such task:
FocuserNode - (DriftMonitorRequestEvent) -> DriftManagerNode
DriftManagerNode - (DriftMonitorResultEvent) -> FocusNode
For DriftManager to change presets, two bindings are needed:
DriftManagerNode - (ChangePresetEvent) -> PresetsManagerNode
PresetsManagerNode -(PresetChangedEvent) -> DriftManagerNode
< Dose Calibrator | The EM node >
The Dual Viewer splits the browser window to allow two instances of the Image Viewer to appear side by side. The following example shows images from two different Projects being displayed side by side. For more details see Image Viewer Overview.
Dual Viewer Screen:
Most steps in this original hole finder are identical to that of JAHC holefinder used in MSI-T application. Only the edge and template steps are different since edge finding is performed before using an artificial ring template to create the correlation image used in the later steps.
A good combination of parameters show the edges of holes well with minimal thresholded "edge" from random features.
A good template gives a sharp correlation at the center of the holes.
Application editor behaves well enough that it is not necessary to edit xml files. However, if you want to, here is how.
<!-- ApplicationData --> <sqltable name="ApplicationData"> <field name="DEF_id" >264</field> <field name="version" >6</field> <field name="DEF_timestamp" >20041209145648</field> <field name="name" >MSI-raster (1.0)</field> </sqltable>
< Reload and Edit an existing application | Create Leginon "Simple Application" >
< Add a new project | Grid management >
Eucentric Focus is the microscope image focusing that makes an object at eucentric height at Gaussian focus.
In operation, you go through these steps to reach that focus value.The eucentric height is defined by the goniometer alpha tilt axis, and therefore grid independent. Therefore, focus value (in term of current applied to the lens ) is also an invariant. Therefore, it is a very good reference point. Microscope manufacture aligned and calibrated magnification at eucentric height and encentric focus. We'd like to do the same in Leginon.
Please note that there is a "eucentric focus" button on FEI scopes. The button is not calibrated to the operational definition above unless you've done so or request engineers to recalibrate it regularly. Do not assume that pressing that button will bring the focus to the Eucentric Focus with 100 um if not calibrated.
This application is for user-interactive target selection of "sq" and/or "hl" images aquired the Square and Mid Mag Survey. The results are transformed onto "gr" images since the 2nd pass targeting is done on the grid atlas. It only has one node: "2nd Pass Targeting"
Choose from "sq" and "hl" presets as the child images where the targets are selected and transformed from.
"gr" preset should always be selected as the preset of the ancestor images where the targets are transformed to.
You may enter an image to start the selection process.
The images are chronological ordered.
< 1st Pass application | 2nd Pass application >
MySQL database usernames, Leginon/Appion username, and your linux login username are all different. Each serves its own purpose.
Database names, user, and password need to be entered during web server and sinedon.cfg setup.
In our example, we have:
purpose | example name |
database name for leginon parameters and metadata | leginondb |
database name for project management | projectdb |
database name prefix for appion processing | ap |
database user name | usr_object |
database user password | (not set) |
username for Leginon image viewing and appion processing/reporting from the web = username registered for Leginon running
Firstname used in the registration + Lastname used in the registration = fullname entered in leginon.cfg
Relevant Topics:
Database Server Installation
Configure sinedon.cfg
Web Server Installation
The same hole finder class from Hole Targeting is used in Exposure Targeting for finding exposure and focus targets at higher magnifications by loosely defining some parameters. This set-up should be much easier and more stable than Hole Targeting. The parameters not mentioned here can be left at their default values. To proceed from one step of the exposure targeting process to another, simply proceed from top to bottom through the display selection buttons in the image control panel. The display settings associated with each display selection are the locations where the Hole Targeting parameters can be adjusted. To see the final acquisition and focus targets, enable only the Original, acquisition, and focus display selections.
(This step does not apply if you are using MSI-T)
A good combination of parameters show edges of the hole(s) well with minimal thresholded "edge" from random features.
(This step does not apply if you are using MSI-T)
A good template gives a sharp correlation at the center of the holes.
A good correlation threshold leaves only small blobs of the correlation peaks from the hole(s). This parameter also tends to change during an experiment. In addition, the value is in the unit of number of standard deviation above the mean.
The Border is used here to prevent the selection of non-targeted holes that show up at the edge of the image.
This step is used here only to remove multiple blobs found close to the center of the targeted hole.
No discrimination of holes is needed here. This step will set-up the template for exposure and focus targets.
Skip automatic hole finding = no
< Hole Targeting Set-up for MSI-Edge
The same hole finder class from Hole Targeting is used in Exposure Targeting for finding exposure and focus targets at higher magnifications by loosely defining some parameters. This set-up should be much easier and more stable than Hole Targeting. The parameters not mentioned here can be left at their default values. To proceed from one step of the exposure targeting process to another, simply proceed from top to bottom through the display selection buttons in the image control panel. The display settings associated with each display selection are the locations where the Hole Targeting parameters can be adjusted. To see the final acquisition and focus targets, enable only the Original, acquisition, and focus display selections.
Use this setting to load a test image if needed.
A good template gives a sharp correlation at the center of the holes.
A good correlation threshold leaves only small blobs of the correlation peaks from the hole(s). This parameter also tends to change during an experiment. In addition, the value is in the unit of number of standard deviation above the mean.
The Border is used here to prevent the selection of non-targeted holes that show up at the edge of the image.
This step is used here only to remove multiple blobs found close to the center of the targeted hole.
No discrimination of holes is needed here. This step will set-up the template for exposure and focus targets.
Skip automatic hole finding = no
< Hole Targeting Set-up for MSI-T
The FFT Maker calculates power spectrums of input images.
Required bindings:
Acquisition - (AcquisitionImagePublishEvent) -> FFT Maker
There are two FFT Maker nodes in MSI, Exposure FFT and Focus FFT. Both of these FFT Maker nodes need to be bound with events from different acquisition nodes. Exposure FFT (with a hint from its name) is bound to the Exposure (Acquisition) node. Likewise, Focus FFT is bound to the Focus node (that has Acquisition node behavior embedded within it).
A specific file tree structure has been assumed as default in Appion/Leginon. Until v2.2 release, this can not be altered. Here is a description of it:
The following permission rule is required for multi-unix-user usage of Leginon/Appion:
For Leginon:
For Appion:
< Database Server Installation | Processing Server Installation >
The easiest way to find the tilt axis uses the fact that the projected feature moves according to a cosine function when it is off from CCD or optical axis but not off from eucentric height.
Do this at the microscope:
Instead of a full range tilt series, much can be learned at low tilts. Again, this uses the fact that defocus changes in a sine curve when the tilt axis is off.
Use Leginon Tomography to do a small range tilt since sine curve has the highest slope around zero.Test runs should be done at the magnification, defocus, and tilts up to the highest values planned for the real ones with a specimen with isotropic features in view and
adjusted to eucentric height. Tilt steps should be made to allow at least 15 images taken per tilt direction. Note that this can refine the above rough results but may give
worse results at times.
The first time the tomography application is used on a microscope, all model
parameters are default to zero. A test run should be done with the specimen at eucentric
height and all default settings including "keep the tilt axis parameters fixed" activated.
If the feature tracking is good, and the defocii of the images in the tilt series do not
significantly changed, the goniometer behavior and camera alignment are close to ideal,
and no improvement of the model is required.
If the xy tracking deteriorates quickly in the first few tilts, the magnification
should be dropped so that tracking is possible through out the tilt series. Once a rough
model is established, refinement can then be done at higher magnifications.
A complete tilt model fitting is difficult with small number of data points or at only
low tilts. Therefore, two tilt series need to be taken in order to get a good averaged
model that is later fixed.
If the above procedure does not yield a good model, it is necessary to study the graphs
output by the run to determine possible causes and derive the best fixed model that at least
work for most angles.
See Fitting the tilt axis model for definition of the displayed values
Figure 1 shows a typical result from the first dynamically fitted tilt series run. x and
Figure 1
According to the Zheng et. al. model, the tilt-axis can be characterized by three
parameters: phi, the angle between the tilt axis and the detector x axis (column), offset,
the distance between the center of the detector and the tilt axis on the xy plane, and z0,
the distance between the specimen from the xy plane that contains the tilt axis.
As a first tilt series used in the model fitting, the data is not fitted until it
accumulate enough data points and spread over more tilts. We arbitrarily select 30 degrees as
the starting angle where the fit is started.
As can be seen in Figure 1, the model is significantly different from the initial as z-axis "Prediction" jumps once the fitting is started. In particular, the model z0 which corresponds to the offset of the specimen from the tilt axis in z direction dominates deviation. Such problem is evident by the near-straight line feature shift in x-axis over more than 1 um. There is also some offset in
x direction since the "Prediction" and "Position" flattens somewhat as it approaches zero tilt. The tilt axis has minimal tilt from x-axis since in the y-direction, despite the bump at about 40 degrees, the range of variation in the whole tilt series is about 0.06 um.
By activate "show model parameters" check box in the viewer, more plots are shown
(Figure 2). phi and "optical axis" offset remain fixed below 30 deg while z0 is recalculated at each tilt. As you can see, the fitting of the former two parameters are not very stable in this first trial. Therefore, we need to do the second run.
Figure 2
Figure 3 shows the z-axis plot of the second run since the x and y does not change
significantly. Figure 4 shows its corresponding model parameters. The zero and first tilt
uses the initial model and the rest are fitted dynamically. In this run, because more than
one tilt series is found in the memory since last "reset learning", the model fitting starts
after the first tilt image is acquired. model parameters are rather stable over the whole
tilt series and suggests that the tilt axis is tilted from x-axis by about -1.3 degree, and
offset from the center of the detector by -0.6 um, and the specimen is off from eucentric
height by about -0.7 um
Figure 3
Figure 4
Although it is not possible to maintain perfect defocus prediction in the full range of
the tilt by using a fixed model, we found that the overall performance is better if an
average tilt axis model that works well in the mid-range tilt is used as a fixed model. For
example, for the behavior in the above figure, we choose:
Use these custom values as initial model and turn on "Keep the tilt axis parameters
fixed". If the result is good, judging by consistent defocus and target tracking through out
the tilt series, this model will be saved in the database as best model automatically, and
you can revert back to initialize with the model of "only this preset".
The fitting of optical axis offset does not always works if the offset is so large that
the feature moves out of view with even a small tilt. In such a case, it is worth first
collect a tomography series at a lower magnification to define roughly the model.
At beginning of each session, or forced by the user, the model is initialized. By
default, at the initialization, Tomography node uses past fitting results that show good
agreement with the experimental data at the magnification of the preset used. If a good
model is not found, that from lower magnifications will be used. It is possible to force the
node to use a model fitted at a particular magnification by selecting it in
Tomography/Settings/Model.
Therefore, we recommend that, in case of fitting failure on good contrast images, the
followings should be done:
See Troubles with Tomography section for various modeling problem solving examples
< Reading the tomography graphs | Full Protocol on a F30 with an energy filter >
Seven MSI applications are distributed with Leginon.
MSI-Edge, MSI-T, and MSI-Raster each uses a different automated target finders in
Hole(Subsquare) Targeting and Exposure Targeting.
< Ways of Moving to Targets in Nodes that acquire images inside MSI | Summary of MSI applications >
The Focuser node is responsible for focusing. Focus sequence determines the sequence of focus steps that can be applied to the focus target the node received. For each item in the sequence, a preset is chosen for imaging and the method of focus (Autofocus or Manual focus) is selected. For autofocus method, defocus and astigmation are measured by beam tilt induced image shift. Alternatively distance from the eucentric height is measured by two opposite stage alpha tilts. The correction type then determines which and how the correction is made. Manual
focus, either through a z height or defocus change, is possible. Eucentric focus can be send to/received form the scope, and the user can also reset current zero defocus. Note that when stage z is used for focus correction, drift is declared automatically so that the drift manager can handle the position change properly.
When the stage is tilted significantly, distortion of the image occurs when beam is tilted. Cosine stretching (Ziese et al. 2003 J. Microscopy 211,179-185) boosts the correlation peak during autofocusing. In addition, a defocus offset is made according to the tilt geometry so that equivalent level of defocus is achieved with image shift at any targeted location. This correction is made automatically.
Required bindings to Presets Manager:
FocuserNode - (ChangePresetEvent) -> PresetsManagerNode
PresetManagerNode - (PresetChangedEvent) -> FocuserNode
Focuser normally receives rejected target list from acquisition node rather than from a TargetFinderNode Class although it is possible, too.
AcquisitionNodeAlias - (ImageTargetListPublishEvent) -> FocuserNode
FocuserNode - (TargetListDoneEvent) -> AcquisitionNodeAlias
For the focuser that initiates drift monitoring, two bindings are needed:
FocuserNode - (DriftMonitorRequestEvent) -> DriftManagerNode
DriftManagerNode - (DriftMonitorResultEvent) -> FocusNode
Required Bindings to use drift check image for auto focusing:
DriftManagerNode - (AcquisitionImagePublishEvent) -> RCTNode
Bindings needed if to be Fourier transformed:
FocuserNode- (AcquisitionImagePublishEvent) ->FFTMakerNode
Focuser node may need target shift correction upon drift:
FocuserNode - (NeedTargetShiftEvent) - > DriftManagerNode
DriftManagerNode-(AcquisitionImageDriftPublishEvent) -> FocuserNode
Optional Bindings with Navigator to allow (iterative) target move correction:
AcquisitionNodeAlias - (MoveToTargetEvent) -> NavigatorNodeAlias
- Mask radius: "1" % of image = center percentage of FFT that is masked out in order to see the FFT easier on the screen
- Icrement: 5e-7 m = the incremental amount of defocus or stage z change
Notes on porting the Leginon BB to Redmine
Messages
id board_id parent_id subject content author_id replies_count last_reply_id created_on updated_on locked sticky
Boards
id project_id name description position topics_count messages_count last_message_id
Users
id login hashed_password firstname lastname mail mail_notification admin status last_login_on language auth_source_id created_on updated_on type identity_url
Notre_forums
forum_id parent_id left_id right_id forum_parents forum_name forum_desc forum_desc_bitfield forum_desc_options forum_desc_uid forum_link forum_password forum_style forum_image forum_rules forum_rules_link forum_rules_bitfield forum_rules_options forum_rules_uid forum_topics_per_page forum_type forum_status forum_posts forum_topics forum_topics_real forum_last_post_id forum_last_poster_id forum_last_post_subject forum_last_post_time forum_last_poster_name forum_last_poster_colour forum_flags display_subforum_list display_on_index enable_indexing enable_icons enable_prune prune_next prune_days prune_viewed prune_freq
Notre_posts
post_id topic_id forum_id poster_id icon_id poster_ip post_time post_approved post_reported enable_bbcode enable_smilies enable_magic_url enable_sig post_username post_subject post_text post_checksum post_attachment bbcode_bitfield bbcode_uid post_postcount post_edit_time post_edit_reason post_edit_user post_edit_count post_edit_locked
Notre_topics
topic_id forum_id icon_id topic_attachment topic_approved topic_reported topic_title topic_poster topic_time topic_time_limit topic_views topic_replies topic_replies_real topic_status topic_type topic_first_post_id topic_first_poster_name topic_first_poster_colour topic_last_post_id topic_last_poster_id topic_last_poster_name topic_last_poster_colour topic_last_post_subject topic_last_post_time topic_last_view_time topic_moved_id topic_bumped topic_bumper poll_title poll_start poll_length poll_max_options poll_last_vote poll_vote_change
Notre_users
user_id user_type group_id user_permissions user_perm_from user_ip user_regdate username username_clean user_password user_passchg user_pass_convert user_email user_email_hash user_birthday user_lastvisit user_lastmark user_lastpost_time user_lastpage user_last_confirm_key user_last_search user_warnings user_last_warning user_login_attempts user_inactive_reason user_inactive_time user_posts user_lang user_timezone user_dst user_dateformat user_style user_rank user_colour user_new_privmsg user_unread_privmsg user_last_privmsg user_message_rules user_full_folder user_emailtime user_topic_show_days user_topic_sortby_type user_topic_sortby_dir user_post_show_days user_post_sortby_type user_post_sortby_dir user_notify user_notify_pm user_notify_type user_allow_pm user_allow_viewonline user_allow_viewemail user_allow_massemail user_options user_avatar user_avatar_type user_avatar_width user_avatar_height user_sig user_sig_bbcode_uid user_sig_bbcode_bitfield user_from user_icq user_aim user_yim user_msnm user_jabber user_website user_occ user_interests user_actkey user_newpasswd user_form_salt
Search for the user to have an existing entry, if not their posts will be assigned to anonymous.
Redmine Entry | BB Entry |
---|---|
id | |
login | notre_users->username |
hashed_password | |
firstname | |
lastname | |
notre_users->user_email | |
mail_notification | |
admin | |
status | |
last_login_on | |
language | notre_users->user_lang |
auth_source_id | |
created_on | |
updated_on | |
type | |
identity_url |
We will create these from scratch - Development, Using Leginon, Using Appion, Tomography, Installation, Administration Tools
Redmine Entry | BB Entry |
---|---|
id | |
project_id | (the leginon id) |
name | notre_forums->forum_name |
description | notre_forums->forum_desc |
position | |
topics_count | notre_forums->forum_topics |
messages_count | notre_forums->forum_posts |
last_message_id | After all messages are ported add: notre_forums->forum_last_post_id->Redmine Messages->bb_post_id->id |
bb_forum_id | notre_forums->forum_id |
Redmine Entry | BB Entry |
---|---|
id | |
board_id | notre_posts->forum_id->Redmine Boards->bb_forum_id->id |
parent_id | Add these as second step after all posts moved over, notre_posts->topic_id->notre_topics->topic_first_post_id->Redmine Messages->bb_post_id->id |
subject | notre_posts->post_subject |
content | notre_posts->post_text (need to get BLOB) |
author_id | notre_posts->poster_id->notre_users->user_email->Users->mail->Users->id, if does not exist assign to anonymous |
replies_count | Set all to 0 then check Notre_topics->topic_first_post_id and update that message with notre_topics->topic_replies |
last_reply_id | Set all to NULL then check notre_topics->topic_first_post_id->Redmine Messages->bb_post_id->id and update that message with notre_topics->topic_last_post_id->Redmine Messages->bb_post_id->id |
created_on | notre_posts->post_time (may need a conversion) |
updated_on | notre_posts->post_edit_time (may need a conversion) |
locked | notre_posts->post_edit_locked |
sticky | 0 |
bb_post_id | notre_posts->post_id |
First backup the tables that we will be modifying:
mysqldump -u amber -p --skip-lock-tables --extended-insert redmine boards > boards-preport.sql
mysqldump -u amber -p --skip-lock-tables --extended-insert redmine messages > messages-preport.sql
ALTER TABLE boards ADD bb_forum_id int(11); ALTER TABLE messages ADD bb_post_id int(11);
INSERT INTO ami_redmine.boards (project_id, name, description, topics_count, messages_count, bb_forum_id) SELECT ami_redmine.projects.id, bb2.notre_forums.forum_name, bb2.notre_forums.forum_desc, bb2.notre_forums.forum_topics, bb2.notre_forums.forum_posts, bb2.notre_forums.forum_id FROM ami_redmine.projects, bb2.notre_forums WHERE ami_redmine.projects.identifier="leginon"
Inserts 9 rows.
INSERT INTO ami_redmine.messages (board_id, subject, content, locked, sticky, bb_post_id) SELECT ami_redmine.boards.id, bb2.notre_posts.post_subject, bb2.notre_posts.post_text, bb2.notre_posts.post_edit_locked, 0, bb2.notre_posts.post_id FROM bb2.notre_posts, ami_redmine.boards WHERE bb2.notre_posts.forum_id = ami_redmine.boards.bb_forum_id;
inserted 603 rows.
UPDATE ami_redmine.messages AS redMess1, ami_redmine.messages AS redMess2, bb2.notre_topics, bb2.notre_posts SET redMess1.parent_id=redMess2.id WHERE redMess1.bb_post_id = bb2.notre_posts.post_id AND bb2.notre_posts.topic_id = bb2.notre_topics.topic_id AND bb2.notre_topics.topic_first_post_id = redMess2.bb_post_id AND redMess1.id != redMess2.id;
UPDATE ami_redmine.messages, ami_redmine.users, bb2.notre_users, bb2.notre_posts SET ami_redmine.messages.author_id=redmine.users.id WHERE ami_redmine.messages.bb_post_id = bb2.notre_posts.post_id AND bb2.notre_posts.poster_id=bb2.notre_users.user_id AND bb2.notre_users.user_email = ami_redmine.users.mail;
For the messages from people who are not registered in redmine, set the author_id to 2 which is the anonymous user.
UPDATE ami_redmine.messages SET ami_redmine.messages.author_id=2 WHERE ami_redmine.messages.author_id IS NULL;
Updates 290 entries.
UPDATE ami_redmine.messages, bb2.notre_topics, bb2.notre_posts SET ami_redmine.messages.replies_count = bb2.notre_topics.topic_replies WHERE ami_redmine.messages.parent_id IS NULL AND ami_redmine.messages.bb_post_id = bb2.notre_posts.post_id AND bb2.notre_posts.topic_id = bb2.notre_topics.topic_id;
UPDATE ami_redmine.messages AS redMess1, ami_redmine.messages AS redMess2, bb2.notre_topics, bb2.notre_posts SET redMess1.last_reply_id = redMess2.id WHERE redMess1.parent_id IS NULL AND redMess1.bb_post_id = bb2.notre_posts.post_id AND bb2.notre_posts.topic_id = bb2.notre_topics.topic_id AND bb2.notre_topics.topic_last_post_id = redMess2.bb_post_id;
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_from-unixtime
http://aruljohn.com/timestamp2date.html
UPDATE ami_redmine.messages, bb2.notre_posts SET ami_redmine.messages.created_on = FROM_UNIXTIME(bb2.notre_posts.post_time) WHERE ami_redmine.messages.bb_post_id = bb2.notre_posts.post_id;
UPDATE ami_redmine.messages, bb2.notre_posts SET ami_redmine.messages.updated_on = FROM_UNIXTIME(bb2.notre_posts.post_edit_time) WHERE ami_redmine.messages.bb_post_id = bb2.notre_posts.post_id AND bb2.notre_posts.post_edit_time != 0;
UPDATE ami_redmine.boards, ami_redmine.messages, bb2.notre_forums SET ami_redmine.boards.last_message_id = ami_redmine.messages.id WHERE ami_redmine.boards.bb_forum_id = bb2.notre_forums.forum_id AND bb2.notre_forums.forum_last_post_id = ami_redmine.messages.bb_post_id;
mysqldump -u amber -p --skip-lock-tables --extended-insert redmine boards > boards-postport.sql
mysqldump -u amber -p --skip-lock-tables --extended-insert redmine messages > messages-postport.sql
ALTER TABLE boards DROP COLUMN bb_forum_id; ALTER TABLE messages DROP COLUMN bb_post_id;
Get the original content:
UPDATE ami_redmine.messages, bb2.notre_posts SET ami_redmine.messages.content = bb2.notre_posts.post_text WHERE ami_redmine.messages.bb_post_id = bb2.notre_posts.post_id;
Leginon as a system that we distribute can be divided into three parts:
Python (and some c) scripts that handle instrument control, data acquisition, and
processing.
a MySQL server that handles the database
This includes php and Java scripts at a webserver that we will create to retrieve image
and metadata from the database and file-storage system.
This is up to you to set up to store lots of data coming out of Leginon system.
< Leginon "Robot-MSI-Screen" Applications | Trouble shooting >
This is edited from a complete protocol written by Lu Gan (Jensen Lab, Caltech) for users
who have not used general MSI applications. It is modified to reflect the current Leginon
version and a current and graphic-rich protocol by Jian Shi (contact him at
jianshi@caltech.edu for a copy) of the same group.
Note: steps 1 and 2 are only necessary for really bad grids (you'll know).
1. Leginon/Grid Targeting> Remove objective aperture, Rename and calculate a new
grid atlas, then publish to make a new atlas, and then Reinsert objective
aperture.
*Note: You only need to take this (second) atlas if the presets - especially
square and hole - are poorly aligned, which you'll find out from the previous
alignments. If the presets were already aligned, then you can use the original grid
atlas. *
2. Leginon/Square Targeting> Click on the purple crosshair icon (reference point)
and click on a broken square, which will be used for ZLP alignment and dosage.
3. Leginon/Square Targeting> Pick squares that look good, then press Play button .
4. Leginon/Hole Targeting> While square targets are getting collected, you can
start picking targets in the hole targeting menu. Pick a bunch of holes (but not
adjacent ones), then pick a focus point for rough Z- focus. To advance to the next
square, press the play button but NOT Queue- play .
5. Leginon/Hole Targeting> After the hole targets are all selected, insert the
objective aperture and press Queue-play.
6. Leginon/Tomography Targeting> DON'T PRESS Queue-play until ready for final
tomography acquisition.
7. Leginon/Tomography Targeting>Remember to pick a FOCUS spot for each hole and
tomography target!
Tip: you can mouse over the target and get an estimate of the average intensity in
the popup menu, which lists X,Y,Cnts. This feature lets you rapidly screen for (1)
squares with the thinnest ice and (2) the thinnest targets.
9. Leginon/Tomography> check data collection parameters: dose, tilt range, tilt
interval. See notes on image intensity recorded through
tomography. (If you want -60 to 60 tilts, you should ender -61 to 61 since the
limiting algorithm is "smaller than" not "smaller than or equal to".
10. Leginon/Presets> setup data collection parameters for focus & tomography:
mag, defocus, INT (INT for focus should be greater than for tomo).
< Running the application | Using "MSI-SimuTomography" Application for debugging >
Commonly Why: You have a setting window open somewhere. The main window can not do anything if there is a subwindow open.
Solution:
Solution:
Still not working: Check for hardware and network problems.
Commonly Why: You have click too many places and make changes so fast that leginon can not follow it.
Solution:
Solution:
Still not working: Check for hardware and network problems.
Why: Python process controls Leginon GUI window. On Windows, Python process is considered broken without Leginon GUI.
Commonly Why:
For applications that process targets on grid atlas such as MSI and "Multiscale Tomography", resuming data collection depends on whether "queuing" option is used and if there are still targets left in the queues.
Commonly Why: An invalid input is entered such as an invalid camera setting, text in place of an inumber.
You may want to get help from the most experienced user at your institute to do these:
< Pausing and Aborting during data collection | Hardware Troubles >
Installation/Update problems >
These steps are a general overview of the entire procedure involving
installation, microscope alignment, calibrations, and using Leginon applications (e.g.
Manual, Calibrations, MSI).
Getting Started as a Super User
These steps are geared solely towards the system administator(s) that will installing
Leginon and setting it up initially for the rest of the Leginon users that need not be
concerned with these details.
Getting Started as a System Administrator
These steps are intended to help the basic Leginon user who will operate Leginon (and
not care about installation or the first-time calibrations).
To use the recommended new wiki version, start at Getting Started as a basic Leginon user
To use the old one, go here. We will phase out the old-style documentation in near future.
To print out the old-style manual, download part I and part II
< Minimum Requirements and current NRAMM setup
These steps are intended to help the basic Leginon user who will operate Leginon (and
not care about installation or the first-time calibrations).
Refer to Microscope Set-up.
Refer to using the Leginon "Manual Application".
Refer to MSI Quick-start.
AND
Refer to MSI Operation.
Refer to Trouble shooting.
< Getting Started as a System Administrator
These steps are intended to help the basic Leginon user who will operate Leginon (and
not care about installation or the first-time calibrations).
Refer to Microscope Set-up
Refer to using the Leginon Manual Application
Refer to MSI quick set-up checklist
AND
Refer to MSI Operation
Refer to User Trouble Shooting
These steps are a general overview of the entire procedure involving
installation, microscope alignment, calibrations, and using Leginon applications (e.g.
Manual, Calibrations, MSI).
Refer to the Complete Installation.
Refer to Leginon Administration Tools.
For advanced Leginon users who would like to create an application, see the chapter entitled Create and Edit Applications.
Refer to the Start Leginon chapter for test run instructions on
the microscope and on a remote computer.
Refer to Microscope Set-up.
Refer to the Leginon "Calibrations" Application chapter.
Refer to MSI Quick-start.
AND
Refer to MSI Operation
Refer to Installation Troubleshooting,
Trouble Shooting and the Leginon Forum.
For advanced Leginon users who would like to create an application, see Create and Edit Applications.
Refer to Node Descriptions.
Getting Started as a System Administrator >
These steps are geared soley towards the system administator(s) that will installing
Leginon and setting it up initially for the rest of the Leginon users that need not be
concerned with these details.
Refer to Installation Troubleshooting, and
Leginon Forum.
Refer to the Complete Installation for new installation.
Refer to the Upgrade Instructions for upgrading from previous Leginon versions.
Refer to Leginon Administration Tools.
Refer to Start Leginon for test run instructions on
the microscope and on a remote computer.
< Getting Started as a Super User | Getting Started as a basic Leginon user >
The goniometer movement must be modeled for finer movements. Leginon calibrates this movement through the Gon Modeler node. Through this feature, the models for these movements can be graphically seen.
< Applications | Leginon Administration Tools ^
The GonModeler node models the goniometer/stage movement to give a more accurate stage position/movement calibration. The stage position is modeled in both x and y directions. For a more accurate calibration, many points or images need to be acquired to give a more accurate mathematical fit to the function. This calibration works best on a grid that will always give good cross correlations. Slot grids give large areas that can cross correlate well, but this type of grid tends to drift. Negatively stained grids or grids with a carbon in the background will work well.
How does modeled stage position work?
There are two types of results from doing a modeled stage calibration: 1) a function (in the form of a harmonic series) that models the mechanical behavior of the stage 2) a magnification adjustment (scaling and rotation) that allows the model function to be used at different magnifications. Part 1 needs to be done at only one magnification, because the result will be normalized in the database so that it can be used at any other magnification. Part 2 needs to be done at any other magnifications that you wish to use this calibration. The user interface of GonModeler node gives you two methods: "Fit Model" and "Mag Only" These two methods are really identical except for the final result they store in the database. "Fit Model" will store both part 1 and 2 above. "Mag Only" will onlystore part 2 (and assumes that you already have part 1 done). Since "Fit Model" is responsible for part 1, you generally need to measure a lot of points to get a good fit. You will normally select between 2 and 5 terms for the harmonic series to get a good fit. The "Mag Only" method will also fit a function to your measured points using the number of terms you specify. But the resulting best fit function is not stored in the database. Only the constant term of the resulting function is stored, because this can be used to scale the existing normalized model function to the current magnification.
Right now it is not possible to use the modeled stage calibration for building a mosaic of images. The reason is that we have not yet implemented the inverse transform of this calibration. All of the matrix calibrations are easy to invert (for instance, you can convert from a pixel shift to a stage shift, or invert that and convert from a stage shift to a pixel shift). The modeled stage calibration is more complicated to invert, so right now we can only convert from a pixel shift to a stage shift. The MosaicClickTargetFinder node is responsible for assembling the images into a complete mosaic image. It does this by looking at the stage position of each of the component images, and doing the reverse transform from stage position to pixel shift. The result is the pixel offset of the component image in the overall mosaic.
Required bindings to use preset instrument configuration set by presets manager:
PresetsManagerNode - (PresetChangedEvent) -> GonioMedelerNode
Leginon relies on a stable microscope. The most likely reason for leginon to fail performing is bad microscopy alignment. Various bad alignments often compound the difficulty in problem solving. The requirement of leginon for good alignment is higher than most users who set up low dose image acquisition directly at the scope are used to, especially regarding alignment in LM mode since most low dose user has limited usage for LM mode images.
Apart from alignments that every user does without Leginon, Here are some of alignment critical to Leginon MSI applications but not a common low-dose kit users.
These are needed for beam-tilt based auto-focusing
These are important starting point to allow consistent performance of calibrations and saved presets.
What is eucentric focus?
Beam has to remain centered at CCD camera when Leginon move to targets with image shift. For FEI scopes, the calibration procedure is in Tecnai/TEM User Interface. For JEOL scopes, a calibration is performed in Leginon to achieve the same effect.
< Calibrations required on FEI microscopes | Microscope Set-up Checklist >
Open a web browser. Go to 'http://yourhost/myamiweb/project'
< Installation | Add a new project >
Many places in the manual, a specific section of a window for a node on a
launcher/computer/instrument is mentioned. The first time they are mentioned, the full path
is shown as
computer/program window/node/subsection of the node to open the setting window/setting
window/section in the window>
It is assumed that the user knows how to follow this path to the specific section of the
window by reading the following graphical user interface (GUI) manual and by a little of
practice. A abbreviated path rather than the full path will be shown in the latter steps for
the same node or application.
The window is divided into sections.
- This can be either green or red. During a step-by-step testing of parameters,
green indicates that the step has been tested and you can proceed to the next
testing step. Skiping to a step below a red-indicated step will cause an
error.
Tool bar of the node contains tools for setting and execution of the node functions. In
addition, some tools are available as pop-up for convenience. The general rule for the flow
of setting up and execution is to go from left to right up to the execution tool (execution
icon).
Settings windows are opened by left clicking its button
in the toolbar. Note that only one setting swindow can be opened at a time and that all
functions in the main leginon window is inactivated when a settings window is open even if
the leginon window is the focus. The content of the settings window depends on the purpose
of the settings. The general controls are described here:
Found in the node toolbar. They may take on different meanings for different node
classes. The general ones are described here:
: Perform one of the four possible functions if available and active for a node:
: Pause data processing flow when the current input in a queue list is done.
: Abort all data processing of the whole list in the queue.
< Terminology | Minimum Requirements and current NRAMM setup >
The grid used for calibration should have reasonable contrast and features at multiple
scale. A frozen grid is generally not convenient for the purpose since the contrast is low and
can drift easily. Large protein complex negatively stained on a 200-400 mesh em grid with
Quantifoil, C-falt, or home-made holey carbon support is ideal. You can even use one that is
abandoned after a cryo run, just negatively stain it to improve the contrast. From our
experience, small protein negatively stained on continuous carbon support often gives low
contrast at intermediate magnification and therefore not ideal. If your Quantifoil or C-flat
grid is too clean, there may be a problem of false peaks from the lattice. In this case, you
can add some gold clusters such as Nanogold from Nanoprobe.
< Importance of making calibrations | Startup >
You may register grid boxes and grids by projects. This is mainly used with grid handling
robot.
After the grid is added, it can be assigned to a location on an existing grid box by choosing the box and click on a location not yet occupied by a grid.
Why: If Tecnai microscope is busy for reasons such as correcting a pole touch error, Leginon can not comunicate with the scope until the latter is free.
Solution: Make sure the scope is not busy any more and send the preset to scope manually to resume data collection.
Note: The immediate imaing condition may be wrong since manual preset sending does not include extra image shift from the target, but it should recover in later process.
Why: Unknown
Try these:
There is no fix for this bug.
Commonly why: dirty or worn compustage parts
Solution: Call for scope service
< General operation problems | Troubles with Imaging >
allow image shift without moving the beam and vice versa.
The hole depth node, is a set of tools to measure parameters needed to correlate the intensity values of hole with (I) and without ice (I0) with the physical thickness of the ice. The two intensity values gives the image contrast , c=ln(I0/I), that is used in Hole Finder Node Class as the relative measurement of thickness. Since the actual calibration of contrast against physical thickness is not yet written, we do not advise using this node unless you plan to perform your own query and fit the values with the proper function outside Leginon.
Required bindings for recieving images:
This node at the moment stands alone and is used in post session processing.
Each selected image type are for different measurement required for the correlation.
Relevent Image Control Panel-
Relevent Image Control Panel-
Relevent Image Control Panel-
Relevent Image Control Panel-
NOTE: To see the effects of Testing the settings for a particular Hole Depth step in the Image Control Panel, the corresponding Hole Depth step Display must be enabled before using the Test feature in that step's Display Settings.
To view the original input image without any image processing done to it, enable this button. Enabling this button will disable/override the Edge, Template, and Threshold Displays.
The purpose of the Edge step is to convert the original image into an "edge" image where the edges of the holes in the image are enhanced against a black background.
To view the Edge image, enable this button. Enabling this button will disable/override the Original, Template, and Threshold Displays.
The purpose of the Template step is to cross correlate a template of the properly sized holes against the edge image where the edges of the holes have been enhanced in the previous step. Unlike in HoleFinder, this template is a tilt projection of the circularring.
To view the Template image, enable this button. Enabling this button will disable/override the Original, Edge, and Threshold Displays.
The purpose of the Threshold step is to apply a threshold to the previous Template image. It is in unit of correlation. The Threshold image should have dots that represent the center of all the found holes.
To view the Threshold image, enable this button. Enabling this button will disable/override the Original, Edge, and Template Displays.
The purpose of the Blobs step in Hold Depth is not only to mark the center of the thresholded image but also to calculate the depth of the hole from the two marked locations.
To view Blobs, either the Original, Edge, Template, or Threshold Displays must be enabled. The Blobs that pass this step or manually picked will be shown with a turquoise crosshair.
The purpose of the step is to locate the burned position in either the images before or after the burning and to calculate the mean intensity within given radius.
To pick and calculate mean intensity of the Picked Holes, the Original Displays must be enabled. The acquisition targets that pass this step will be shown with a green crosshair.
< Hole Finder | JAHC Hole Finder (Template Hole Finder) >
The hole finder node, in the general sense, is designed to pick imaging and focus targets on an input image. More specifically, the hole finder node will find potential holes (circular features of the proper size), determine whether these holes lie in the known lattice, and determine which holes have good ice thickness. The values in this node vary so much from grid to grid (and from square to square) that the best way to find these parameters is by going through a step-by-step trial and error process. To proceed from one step of the hole targeting process to another, simply proceed from top to bottom through the display selection buttons in the image control panel. The display settings associated with each display selection are the locations where the Hole Finder parameters can be adjusted. To see the final acquisition and focus targets, enable only the Original, acquisition, and focus display selections.
Required bindings for recieving images and publishing targets:
previous Acquisition - (AcquisitionImagePublishEvent) -> Hole Finder
Hole Finder - (ImageTargetListPublishEvent) -> next Acquisition
Hole Finder - (QueuePublishEvent) -> next Acquisition
Required bindings for proper waiting among nodes:
Hole Finder- (ImageProcessDoneEvent) -> previous Acquisition
next Acquisition - (TargetListDoneEvent) -> Hole Finder
NOTE: To see the effects of Testing the settings for a particular Hole Finder step in the Image Control Panel, the corresponding Hole Finder step Display must be enabled before using the Test feature in that step's Display Settings.
To view the original input image without any image processing done to it, enable this button. Enabling this button will disable/override the Edge, Template, and Threshold Displays.
The purpose of the Edge step is to convert the original image into an "edge" image where the edges of the holes in the image are enhanced against a black background.
To view the Edge image, enable this button. Enabling this button will disable/override the Original, Template, and Threshold Displays.
The purpose of the Template step is to cross correlate a template of the properly sized holes against the edge image where the edges of the holes have been enhanced in the previous step.
To view the Template image, enable this button. Enabling this button will disable/override the Original, Edge, and Threshold Displays.
The purpose of the Threshold step is to apply a threshold to the previous Template image. It is in unit of number of standard deviation above the mean. The Threshold image should have dots that represent the center of all the found holes.
To view the Threshold image, enable this button. Enabling this button will disable/override the Original, Edge, and Template Displays.
The purpose of the Blobs step is to begin to narrow down the "hole center dots" that have been found. This step serves as additional criteria for finding good holes.
To view Blobs, either the Original, Edge, Template, or Threshold Displays must be enabled. The Blobs that pass this step will be shown with a turquoise crosshair.
The purpose of the Lattice step is to determine whether the blobs or "hole center dots" fit in a lattice that describes how the hole layout.
To view Lattice, either the Original, Edge, Template, or Threshold Displays must be enabled. The Lattice blobs that pass this step will be shown with a pink crosshair.
The purpose of the acquisition step is to select holes of the proper ice thickness and arrange the desired acquisition target layout. The "focus" and "acquisition" Hole Finder steps Display Settings appear in the same window. For the purpose of this documentation to facilitate the separation of steps in the user interface, acquisition and
focus will be addressed separately. Therefore, only the parameters pertaining to acquisition targets will discussed in this section. The parameters not covered in this section are part of the focus section.
To view acquisition, either the Original, Edge, Template, or Threshold Displays must be enabled. The acquisition targets that pass this step will be shown with a green crosshair.
Ice Thickness Threshold:
Target Template:
The purpose of the focus step is to focus targets near selected holes. The "focus" and "acquisition" Hole Finder steps Display Settings appear in the same window. For the purpose of this documentation to facilitate the separation of steps in the user interface, acquisition and focus will be addressed separately. Therefore, only the parameters pertaining to focus targets will discussed in this section. The parameters not covered in this section are part of the acquisition section.
To view focus, either the Original, Edge, Template, or Threshold Displays must be enabled. The focus targets that pass this step will be shown with a blue crosshair.
Ice Thickness Threshold:
Target Template:
We can use any image that is already loaded into Hole Targeting to adjust these parameters. The values in this node vary so much from grid to grid that the best way to find these parameters is by going through a step-by-step trial and error process. The parameters not mentioned here can be left at their default values. To proceed from one step of the hole targeting process to another, simply proceed from top to bottom through the display selection buttons in the image control panel. The display settings associated with each display selection are the locations where the Hole Targeting parameters can be adjusted. To see the final acquisition and focus targets, enable only the Original, acquisition, and focus display selections.
Use this setting to load a test image if needed.
A good combination of parameters show the edges of holes well with minimal thresholded "edge" from random features.
A good template gives a sharp correlation at the center of the holes.
A good correlation threshold leaves only small blobs of the correlation peaks from the holes. Since the peaks from holes with ice are usually weaker but more important to catch, it is o.k. to leave some but not too many noise peaks. This parameter also tends to change during an experiment. The value is in the unit of number of standard deviation above the mean.
If the threshold level from the last step is too low, there will be a lot of big blobs, making the process slow. The parameters set in this node reasonably limit the total number of blobs.
The lattice of the holes is not perfect; therefore, a decent tolerance is necessary for a good fit to this imperfect lattice. If only a few blobs were centered in the last step, then this step is not likely to work.
The settings here depend on the required ice thickness and on the "Zero thickness" setting in the last step. At a minimum, these settings can be used to rule out holes that are empty and that have massive ice contaminant.
The only relevant focus setting ("Focus hole selection") in Hole Targeting is in relation to Z Height correction. The Leginon/Hole Targeting/focus Display Settings window = Leginon/Hole Targeting/acquisition Display Settings window. This means that the focus settings were set in the previous section and do not need to be revisited here. To see the focus targets, enable the Original and focus (and optionally the acquisition) display selections in the image control panel.
Skip automatic hole finding = no
< Summary of this application | Exposure Targeting Set-up for MSI-Edge >
If you change the value and test an earlier step, you must redo all subsequent steps without skipping.
Use this setting to load a test image if needed.
A good template gives a sharp correlation at the center of the holes.
A good correlation threshold leaves only small blobs of the correlation peaks from the holes. Since the peaks from holes with ice are usually weaker but more important to catch, it is o.k. to leave some but not too many noise peaks. This parameter also tends to change during an experiment. The value is in the unit of number of standard deviation above the mean.
If the threshold level from the last step is too low, there will be a lot of big blobs, making the process slow. The parameters set in this node reasonably limit the total number of blobs.
The lattice of the holes is not perfect; therefore, a decent tolerance is necessary for a good fit to this imperfect lattice. If only a few blobs were centered in the last step, then this step is not likely to work.
The settings here depend on the required ice thickness and on the "Zero thickness" setting in the last step. At a minimum, these settings can be used to rule out holes that are empty and that have massive ice contaminant.
The only relevant focus setting ("Focus hole selection") in Hole Targeting is in relation to Z Height correction. The Leginon/Hole Targeting/focus Display Settings window = Leginon/Hole Targeting/acquisition Display Settings window. This means that the focus settings were set in the previous section and do not need to be revisited here. To see the focus targets, enable the Original and focus (and optionally the acquisition) display selections in the image control panel.
Skip automatic hole finding = no
< Creating Template | Exposure Targeting Set-up for MSI-T >
Leginon image files are typically named 09mar16a_atlas1_00005gr_00003sq_00001hl_v1_00002en.mrc
This name includes
Since Leginon always defines target on an image, and an image is acquired at the location of the target offsets from the parent image of the target, a family tree is estabilished. The filename therefore carries this family tree of the multi-scaled imaging.
Why is the first Grid Image Not Numbered 00001? >
The changes from v1.5 requires update of all in-house components of Leginon and dbemtools,
but not the database nor mrctools. instruments.cfg should be modified on each microscope host.
Don't forget that you need to also update the packages on the microscope-controlling computer
since the pyScope update need to be synchronized.
See <link linkend="InstT_install">Installation Troubleshooting</link> and the Leginon Forum searching
for "install" if you run into problems.
Here are the packages you need to install with python installer
SVN Package Name | Installed Python Package Name | Reason for update: |
---|---|---|
numextension | numextension | none |
libcv | libCV | bug fixes |
leginon | Leginon | new features |
pyami | pyami | clean up |
sinedon | sinedon | new stuff |
pyScope | pyScope | new instrument configuration |
ImageViewer | ImageViewer | updated and required for tomography |
By switching to svn package check out, you now need to install svn client. The rpm
package probably has the word "svn" or "subversion" in its name.
From a text
terminal:
mkdir Leginon-1.6-ALL cd Leginon-1.6-ALL svn co http://ami.scripps.edu/svn/leginon/branches/1.6 Leginon svn co http://ami.scripps.edu/svn/pyami/branches/leg1.6 pyami svn co http://ami.scripps.edu/svn/pyScope/branches/leg1.6 pyScope svn co http://ami.scripps.edu/svn/sinedon/branches/leg1.6 sinedon svn co http://ami.scripps.edu/svn/numextension/branches/leg1.6 numextension svn co http://ami.scripps.edu/svn/libcv/branches/leg1.6 libcv svn co http://ami.scripps.edu/svn/ImageViewer/branches/leg1.6 ImageViewer
In addition to the downloads from our svn depository, there are several other
requirements that you will get either from your OS installation source, or from its
respective website. The system check in the Leginon package checks your system to see if you
already have these requirements
cd Leginon python syscheck.py
You should have all the supporting packages installed for v1.5. If you see any lines
like "*** Failed...", then you have something missing. Otherwise, everything should result
in "OK". Note that numpy and scipy are now required by the new version even if you don't run
tomography. numarray is no longer used.
At the beginning of the syscheck.py output, the location of the exisiting Leginon folder
is shown. Although new installation overwrite the old in most cases, problem has been
observed in the past. Therefore, it is best to remove the old files before new
installation.
For example, your Leginon folder is at /usr/lib/python/site-packages/Leginon
cd /usr/lib/python/site-packages rm -r Leginon
Be aware that in some cases the installed package name is different (capitalized) from
your svn package name and that numextension amd libCV are not in its own subdirectory in the
python library but just the compiled .so files
cd leginon python setup.py install
python> import sinedon python> sinedon
[robot2] db: dbemdata
cd leginon python update16.py
[robot2] db: dbemdata
php-mrc 1.5 uses fftw3. You may need to install that before installing the tool as a php
extension.
See <link linkend="install_mrc">php-mrc extenstion installation</link> section in
Complete Installation Chapter.
See <link linkend="install_dbemtool">dbemtools installation</link> section in Complete
Installation Chapter.
You can do this directly by mysql commands.
mysql
projectdata> mysql projectdata -u usr_object mysql> drop table install; mysql> exit
Alternatively, you can use phpMyAdmin to achieve this by visiting the database, find the
table and click on drop.
See <link linkend="install_projecttools">projecttools installation</link> section in
Complete Installation Chapter.
Default settings are useful for new users of a new application. However, if you have
manually set these as administrator user in Leginon, loading these now will "overwrite" your
settings.
See <link linkend="admin_load_defaults">admintools default loading</link> section in
Complete Installation Chapter.
By switching to svn package check out, you now need to install svn on Windows to get the
updated packages. Because numextension and libCV requires extra compiler, we have created
window installer for them for python 2.5 and made them available through http://www.leginon.org/
See <link linkend="InstT_install">Installation Troubleshooting</link> and the Leginon Forum searching
for "install" if you run into problems.
Here are the packages you need to install with python installer
SVN Package Name | Installed Python Package Name | Reason for update: |
---|---|---|
leginon | Leginon | new features |
pyami | pyami | clean up |
sinedon | sinedon | new stuff |
pyScope | pyScope | new instrument configuration |
ImageViewer | ImageViewer | updated and required for tomography |
Because numextension and libCV requires extra compiler, we have created window installer
for them for python 2.5 and made them available through http://www.leginon.org/
Downloadfile Name | Installed Python Package File | Reason for update: |
---|---|---|
NumExtension-1.2.0.win32-py2.5.exe | numextension.pyd | clean up |
libCV-0.2.win32-py2.5.exe | libCV.pyd | bug fixes |
Although new installation overwrite the old in most cases, problem has been observed in
the past. Therefore, it is best to remove the old files before new installation.
Use "Add or Remove Programs" application in "Control Panel" to do this. Leginon related
packages are shown with prefix "Python 2.5"
If you didn't use Installer to install previously, the packages may not show up in the
Programs list. Simply remove the folder containing the old packages in this case.
By switching to svn package check out, you now need to install svn client on Windows to
get the updated packages. We recommand TortoiseSVN http://tortoisesvn.tigris.org/ .
cd Your_Download_Place\Leginon-1.6-ALL\leginon c:\\python25\python.exe setup.py install
Excute the installer files and follow the instruction.
The changes from v1.6 requires update of all in-house components of Leginon, dbemtools (called myamiweb in the new version) and database
but not the php mrctools.
This processing package upgrade instruction includes that for installing Appion's processing scripts and executables. They have more supporting package requirement. Therefore, if you do not plan to use Appion on this computer, you may skip it.
Don't forget that you need to also update the packages on the microscope-controlling computer
since the pyScope update need to be synchronized.
See Installation Troubleshooting and Leginon Bulletin Board searching
for "install" if you run into problems.
All Leginon (and Appion) packages distributed from NRAMM are now under one svn control called myami.
A few updates are needed for preparation of python 3.0 compatibility where the method for importing module is changed. They will still run under python 2.4 and up.
Here are the packages you need to install with python installer
SVN subPackage Name | Reason for update: |
---|---|
numextension | package import method change |
libcv | package import method change |
leginon | new features |
pyami | new features |
sinedon | required for updating database |
pyscope | new method for creating pythoncom modules |
imageviewer | debug |
Download Myami 2.1 (contains Appion and Leginon) using one of the following options:
This is a stable supported release available as a tar file.
myami-2.1.3.tar.gz
Unzip with
tar -zxvf myami-2.1.3.tar.gz
This is a stable supported branch from our code repository.
Change directories to the location that you would like to checkout the files to (such as /usr/local) and then execute the following command:
svn co http://ami.scripps.edu/svn/myami/branches/myami-2.1 myami/
This contains features that may still be under development. It is not supported and may not be stable. Use at your own risk.
svn co http://ami.scripps.edu/svn/myami/trunk myami/
cd /your_download_area/myami/leginon python syscheck.py
You should have all the supporting packages installed for v1.6. If you see any lines like "*** Failed...", then you have something missing. Otherwise, everything should result in "OK".
At the beginning of the syscheck.py output, the location of the exisiting Leginon folder is shown. Although new installation overwrite the old in most cases, problem has been observed in the past. Therefore, it is best to remove the old files from the path before new installation. Better yet, copy into a backup folder because we need some configuration files from them.
For example, your Leginon folder is at /usr/lib/python/site-packages/Leginon
cd /usr/lib/python/site-packages mkdir Leginon1_6_backup mv Leginon Leginon1_6_backup
Be aware that in some cases the installed package name is different (capitalized) from your svn package name and that numextension amd libCV are not in its own subdirectory in the python library but just the compiled .so files
cd /path/to/myami-VERSION/myami sudo ./pysetup.sh install
That will install each package, and report any failures. To determine the cause of failure, see the generated log file "pysetup.log". If necessary, you can enter a specific package directory and run the python setup command manually. For example, if sinedon failed to install, you can try again like this:
cd sinedon sudo python setup.py install
Python installer put the packages you installed into its site-packages directory. This enables all users on the same computer to access them. The easiest way to discover where your installed package is loaded from by python is to load a module from the package using interactive python command lines like this:
Start the python command line from shell:
python
Import a module from the package. Let's try sinedon here. All packages installed through the above setup.py script should go to the same place.
At the python prompt (python>) type:
import sinedon
If the module is loaded successfully, call the module attribute path (two underscrolls before "path" and two underscrolls after) will return the location of the module it is loaded from
sinedon.__path__ ['/usr/lib/python2.4/site-packages/sinedon']
In this case, /usr/lib/python2.4/site-packages/ is your python-site-package-path. If you go to that directory, you will find all the packages you just installed.
Save this value as an environment variable for use later, for bash:
export PYTHONSITEPKG='/usr/lib/python2.4/site-packages'
setenv PYTHONSITEPKG '/usr/lib/python2.4/site-packages'
python> import sinedon python> sinedon
cd /your_default_python_installation_path cp Leginon_1_6_backup/sinedon/sinedon.cfg sinedon
python> import leginon python> leginon
cd /your_default_python_installation_path cp Leginon_1_6_backup/Leginon/leginon.cfg leginon
Very Important: Fix the bad tables before backup with mysqldump or the backup would be corrrupted. Sorry, it was our fault a long time ago.
We've found this on two databases outside NRAMM that there are empty tables created that causes a bad database backup. Please check and correct your database first before your backup.
mysql -u usr_object your_leginon_database
mysql> show tables;
mysql> select * from BindingSpecData; mysql> select * from bindingspecdata;
mysql> drop table bindingspecdata;
We will be doing a database update that is not backward compatible, Make sure you back up all your current databases before performing the update
You will not need to upgrade php mrc tools.
See Install the Web Interface section in Complete Installation Chapter to put the new web tools (Now under subpackage myamiweb) to document root for the web server.
The Setup Wizard will take you through the steps to create config.php and to create and initialize values for the new tables. For example, project database will contain a table called privileges when you finish. Your old config.php is not formatted correctly for the new viewers but the parameters for databases stands. You can enter them in the wizard.
You will be asked about whether you want to enable myamiweb user login feature that restricts individual user's access to projects and administrator features. Read about it here
All module names are now all in lower cass.
Running the following script will indicate if you need to run any database update scripts.
cd /your_download_area/myami/dbschema python schema_update.py
This will print out a list of commands to paste into a shell which will run database update scripts.
You can re-run schema_update.py at any time to update the list of which scripts still need to be run.
There should be a least scripts to run.
The first one updates UserData and GroupData so that new data viewing and processing privileges can be enforced
The second is a wide-scale change on database schema many on appion processing databases if you had one, and some on projectdata and leginondata.
The third fills in some appion data that was obtained with slow query in previous versions.
The rest are debug update after the release of 2.0.0.
How to Update from v1.6 (Microscope Windows Computer) >
The changes from v1.6 requires update of all in-house components of Leginon, dbemtools and database but not the php-mrctools.
Don't forget that you need to also update the packages on the microscope-controlling computer
since the pyScope update need to be synchronized.
See Installation Troubleshooting and Leginon Bulletin Board searching
for "install" if you run into problems.
All Leginon (and Appion) packages distributed from NRAMM are now under one svn control.
A few updates are needed for preparation of python 3.0 compatibility where the method for importing module is changed. They will still run under python 2.5 and up.
Here are the packages you need to install with python installer
SVN subPackage Name | Reason for update: |
---|---|
leginon | new features |
pyami | new features |
sinedon | required for updating database |
pyscope | new method for creating pythoncom modules |
imageviewer | debug |
Because numextension and libcv requires extra compiler, we have created
window installer for them for python 2.5 and made them available at http://ami.scripps.edu/redmine/projects/leginon/files.
Downloadfile Name | Purpose: |
---|---|
numextension-2.0.0.win32-py2.5.exe | c extension for numerical processing |
comarray-2.0.0.win32-py2.5.exe | com module output conversion to array |
libCV-0.2.win32-py2.5.exe | small c library of algorithm from computer vision field |
You should have all the supporting packages installed for v1.6. If you see any lines like "*** Failed...", then you have something missing. Otherwise, everything should result in "OK".
Although new installation overwrite the old in most cases, problem has been observed in the past. Therefore, it is best to remove the old files before new installation.
Use "Add or Remove Programs" application in "Control Panel" to do this. Leginon related
packages are shown with prefix "Python 2.5"
pyScope |
numextension |
comarray |
libCV |
If you didn't use Installer to install previously, the packages may not show up in the
Programs list. Simply remove or rename the folder containing the old packages in this case as described next.
Leginon |
pyScope |
sinedon |
pyami |
ImageViewer |
For example, your Leginon folder is at C:\\python25\Lib\site-packages\Leginon
Go to C\\python25\site-packages Create Leginon1_6_backup folder Move Leginon folder into Leginon1_6_backup folder
Be aware that in some cases the installed package name is different (capitalized) from your svn package name and that numextension amd libCV are not in its own subdirectory in the python library but just the compiled .so files
Execute the installer files and follow the instructions.
leginon |
pyscope |
sinedon |
pyami |
imageviewer |
cd Your_Download_Place\Leginon 2.0\install_folder c:\\python25\python.exe setup.py install
python> import sinedon python> sinedon
go to C:\\python25\Lib\site-packages\ copy Leginon_1_6_backup\sinedon\sinedon.cfg into the new sinedon folder
From a command line window:
cd C:\python25\Lib\Site-Packages\pyScope C:\python25\python.exe updatecom.py
The python window appears should say show the required type libraries it found:
Generating .py files from type libraries... initializing TEM Scripting Error, cannot find typelib for "TEM Scripting" initializing Tecnai Scripting done. initializing TOM Moniker done. initializing Tecnai Low Dose Kit done. initializing Tecnai Exposure Adaptor done. initializing Tietz CCD Camera done.
The script should generate a few files in C:\\python25\Lib\win32com\gen_py with seemly scrambled names such as BC0A2B03-19FF-11D3-AE00-00A024CBA50Cx0x1x9.py
def getCameraSize(self): # {'type': dict, 'values': {'x': {'type': int}, 'y': {'type': int}}}} x = self._getParameterValue('cpTotalDimensionX') y = self._getParameterValue('cpTotalDimensionY') return {'x': x, 'y': y}
return {'x': 2048, 'y': 2048}
< How to Update from v1.6 (Linux) | Preparation before Using v2.x Routinely >
Download Myami 2.1 (contains Appion and Leginon) using one of the following options:
This is a stable supported release available as a tar file.
myami-2.1.3.tar.gz
Unzip with
tar -zxvf myami-2.1.3.tar.gz
This is a stable supported branch from our code repository.
Change directories to the location that you would like to checkout the files to (such as /usr/local) and then execute the following command:
svn co http://ami.scripps.edu/svn/myami/branches/myami-2.1 myami/
This contains features that may still be under development. It is not supported and may not be stable. Use at your own risk.
svn co http://ami.scripps.edu/svn/myami/trunk myami/
cd /your_download_area cd myami sudo ./pysetup.sh install
That will install each package, and report any failures. To determine the cause of failure, see the generated log file "pysetup.log". If necessary, you can enter a specific package directory and run the python setup command manually. For example, if sinedon failed to install, you can try again like this:
cd sinedon sudo python setup.py install
You will not need to upgrade php mrc tools.
See Install the Web Interface section in Complete Installation Chapter to put the new myamiweb tools to document root for the web server.
The Setup Wizard will take you through the steps to update config.php If the wizard does not have the privilege to modify the file at the last step, copy the displayed result to an text editor and save as config.php to replace the olde one.
You will be asked about whether you want to enable myamiweb user login feature that restricts individual user's access to projects and administrator features. Read about it here
Running the following script will indicate if you need to run any database update scripts.
cd /your_download_area/myami/dbschema python schema_update.py
This will print out a list of commands to paste into a shell which will run database update scripts.
You can re-run schema_update.py at any time to update the list of which scripts still need to be run.
How to Update from v2.0 (Microscope Windows Computer) >
The changes from v2.0 does not require upgrade at the microscope but is recommended.
See Installation Troubleshooting and Leginon Bulletin Board searching
for "install" if you run into problems.
All Leginon (and Appion) packages distributed from NRAMM are under one svn control.
Recommended minimal subpackage upgrade:pyscope | setting of beam tilt value scale factor |
Otherwise, you can copy the files from your linux myami-2.1 source.
You should have all the supporting packages installed for v2.0. If you see any lines like "*** Failed...", then you have something missing. Otherwise, everything should result in "OK".
leginon |
pyscope |
sinedon |
pyami |
imageviewer |
For example, your Leginon folder is at C:\\python25\Lib\site-packages\leginon
Go to C\\python25\site-packages Create Leginon2_0_backup folder Move Leginon folder into Leginon2_0_backup folder
leginon |
pyscope |
sinedon |
pyami |
imageviewer |
cd Your_Download_Place\myami2.1_folder c:\\python25\python.exe setup.py install
python> import sinedon python> sinedon
go to C:\\python25\Lib\site-packages\ copy Leginon_2_0_backup\sinedon\sinedon.cfg into the new sinedon folder
def getCameraSize(self): # {'type': dict, 'values': {'x': {'type': int}, 'y': {'type': int}}}} x = self._getParameterValue('cpTotalDimensionX') y = self._getParameterValue('cpTotalDimensionY') return {'x': x, 'y': y}
return {'x': 2048, 'y': 2048}
< How to Update from v2.0 (Linux)
Process of downloading and updating to 2.2 is generally the same as the one for How_to_Update_from_v20_(Linux)
Please follow that instruction but substitute any mention of 2.1 with 2.2
schema-r15653.py that show up in the list of required update when schema-update.py is run at the end is used to assign individual spherical aberration constant (Cs) values to different microscope. Please find out what these values are in advance before running the script to save time.
Running the python script will prompt you at each TEM you have used so far so that you can enter the value in unit of millimeter
The Cs value also need to match what is set in pyscope/instrument.cfg before you will be able to acquire more images. See How to Update from v2.1 (Microscope Windows Computer)
How to Update from v2.1 (Microscope Windows Computer) >
Instruction is similar to How to Update from v20 (Microscope Windows Computer)
[tem] class: tecnai.Tecnai cs: 2.0e-3
< How to Update from v2.1 (Linux)
FEI tecnai series scope has an internal calibration performed through Tecnai GUI to decouple image shift from beam shift, making it possible to request an image shift without movement of the beam, and vice versa. As the result, we refer to image shift as the movement of image only.
For non-FEI scopes the decoupling need to be done inside Leginon to achieve the decoupling. This is done by coupling image shift calibration and beam shift calibration. Therefore, to move by Image-Beam Shift matrix, both image shift and beam shift matrix need to be calibrated.
Image shift matrix calibrations are used at each magnification that Leginon uses. All 2x2
matrix calibrations covered by the "Matrix" node works in the same way. For a particular type
of movement, in this case an "image shift" using the electromagnetic lenses of the microscope,
a 2x2 transformation matrix needs to be created that relates the values sent to the microscope
and the amount of "image shift" movement seen on the CCD imaging area. Only one set of
measurement is sufficient for image shift matrix calibration.
How does matrix calibration work?
Matrix calibration is made by making N sets of measurements (specified by "N
Average"). Each measurement set acquires three images, first at a given origin, second
with an x-axis movement in the specified "Parameter" by the specified "Shift Fraction" of
the image, and third with an y-axis movement by the same shift fraction. The resulting
shifts in the acquired images are obtained by cross correlation. A transformation matrix
is then generated for the measurement set. The origin is shifted by the "Interval"
specified in the node, in meters before the next set of measurements is taken. At the end,
the N matrixes obtained are averaged and saved in the database at the specific
magnification and movement type and can be applied to any camera configuration.
"Tolerance", expressed in fraction of image, is used as an error check. The calibration is
considered failed when the measured movement is much different from that calculated from
pixel calibration
Image Shift Matrix calibration need for the Example MSI:
<filename>Preset</filename> | <filename>magnification</filename> |
gr | 120 |
sq | 550 |
hl | 5000 |
fc,fa,en,ef | 50000 |
< Bright and Dark reference images | Beam Shift matrix calibration >
From the Appion and Leginon Tools start page, select Image Viewer to view images associated with your Project Sessions in a single viewing pane.
The following screen is displayed. For more details see Image Viewer Overview.
Image Viewer Screen:
< Image Viewer Overview | 2 Way Viewer >
Leginon will not function if calibrations have not been done. In essence, this (or a
similar combination of nodes) is the first application that should be used if calibrations do
not already exist. The term calibrations is an inclusive term that refers to different sets of
measurements such as image shift and stage position.
Unless you plan to perform calibration to all available magnification and camera
configuration, the first step in performing calibration will be to set up Presets.
The following lists all the calibrations that must be completed for Leginon MSI
application to function correctly. Some calibrations can not be performed without existing
calibration of the others. Therefore, it is necessary to follow the order listed below for the
very first calibration for an empty database:
In most cases, calibration only needs to be done once. Through experience, we have found the Stage Position and Calibrations involving Beam Tilt need to be refined often. The other calibrations (in our experience) do not fluctuate as frequently as these two do. Modeled stage position calibration does gradually go off over several months and a full calibration of the modeled stage position matrix is required to rectify the problem.
Image Shift, Stage Position, and Modeled Stage Position matrix calibration are being completed so that targets can be accuratly centered in the images at each different magnification. At the lowest magnifications, an image shift is too big without inducing significant beam shift so the stage has to be moved. As the magnification increases, a simple
calibration of stage movement (error typically of 1.5 um or more) is not adequate, so we have to model the stage movement (error typically of 1 um or less), but still move the stage. At
even higher magnifications (e.g. hl, en, ef, fc, and fa) image shifts (error of 0.3 um or less) can be used to go to targets.
The following are magnifications and types of positioning calibrations that typically have
been completed at a very minimum:
Move Type Calibration Need for Presets in Example MSI:
Magnification: | Calibrations: |
---|---|
120 (i..e., mag for "gr" preset) | modeled stage position(mag-only), image shift |
550 (i.e., mag for "sq" preset) | modeled stage position(full), image shift |
5000 (i.e., mag for "hl" preset) | image shift |
50000 (i,e, mag for "fa","fc","en" and "ef" presets) | image shift |
The Presets Manager has a "Calibration Status" section that will show which calibrations
have been completed for the given mag the selected preset is set to. We usually calibrate for
a range of magnifications so that later we will not have to complete them.
Follow instruction in Import the applications
administration Chapter at http://yourhost/dbem_1_5/addapp.php.
All applications that you plan to use should be uploaded since the old ones
won't work with the 1.6 version.
Because MSI-raster is normally used for acquiring images on negatively stained particles on continuous carbon, the intermediate mag preset (hl) often lacks contrast. To reduce focusing failure, we recommend a different focusing sequence for the Z focus node.
Many of the preferences are matched to the function of the nodes and therefore are more like configuration. Starting from v1.5, the default preferences are loaded during the installation ready for standard MSI operation assuming the use of example preset names and properties. A separate Chapter called "Initial MSI application preference setup" gives the details of these settings if you are interested. As a new user, you don't have to know what is in it if you don't deviate from standard operation.
If you change your settings to the point that the application no longer run, you may revert the settings back to your institute default.
< Pre-MSI Set-up | Special Operation Preference setup >
Many of the preferences are matched to the function of the nodes and therefore are more like configuration. Starting from v1.5, the "Leginon-Appion Administrator" default preferences are loaded during the installation ready for standard MSI operation assuming the use of example preset names and properties. This means that as a new user, you can use these straight away as long as the calibration required are made.
If you mess up your settings too badly that it does not run any more, you may revert back to your institution default easily.
The following is the comprehensive list of what is set as default during the initial loading for basic MSI-T, MSI-Edge, and MSI-Raster applications. In some cases, the reason behind the setting is also included. Each institution can alter these default values according to their particular need for all their new users by making the changes as "Leginon-Appion Administrator" user.
Table 16.1 Example MSI node setup
Node name: | preset: | move type (to reach the preset) : | wait for a node to process the image: | publish and wait for rejected targets: | adjust target using ancestor: |
---|---|---|---|---|---|
Grid Targeting | gr | N/A | N/A | N/A | N/A |
Grid | gr | modeled stage position | no | no | no |
Square | sq | modeled stage position | yes | no | no |
Hole | hl | modeled stage postion | yes | yes | one |
Z Focus | hl or fc* | modeled stage position | no | no | one |
Exposure | en & ef | image shift | no | yes | one |
Focus | fc | image shift | no | no | one |
Table 16.2 Example MSI Focus Setup
Step: | preset: | focus method: | correction type: | Enabled: |
---|---|---|---|---|
Z_to_Eucentric | fa | Beam Tilt | Stage Z | No |
Def_to_Eucentric | fa | Beam Tilt | Defocus | Yes |
Manual_after | fc | Manual | N/A | Yes |
Table 16.3 Example MSI Z Focus Steps.
Step: | preset: | focus method: | Enabled: |
---|---|---|---|
Stage_Wobble | sq | Stage Tilt | No |
Z_to_Eucentric | hl | Beam Tilt | Yes |
Manual_after | fc or hl* | Manual | Yes |
If you have not created the project database, or have not install project_1_2 files to
your web server document area, please go back to Installation Chapter and perform the
installation and setup.
See Installation Troubleshooting and the Leginon Forum searching
for "project" if you run into problems.
< Recommendataion-Dividing projects by long-term goal | Go to project tools page >
Solution: Download and use python2.5 and use the window-installer in win-install
folder (start by double-clicking them) not "python setup.py install".
This normally happens to files that you have modified in the previous version.
Why:Solution: Remove the old installation first.
Linux> cd Linux> start-leginon.py -v
Window> Go to \All Programs\Leginon\Leginon Folder from your Start Menu
Linux> rm -r Leginon Window> drag the Leginon folder to Recycle Bin
If you encounter a problem with node classes that you don't actually use, you may avoid
loading the codes with the following modification:
Linux> cd Linux> start-leginon.py -v
Linux/home> cd leginon_directory/noderegistry
#[Tomography] #module: tomography #type: Pipeline #package: tomography
SciPy may not build properly on some versions of SuSE due to an incompatible LAPACK
package that comes with SuSE. You can get scipy as well as a compatible LAPACK etc. from
http://repos.opensuse.org/science (need to specify your SuSE version and machine etc.
To display error and report them to get help for the php, including mysql-php and mrc
extension, do the following:
display_errors = On error_reporting = E_ALL & ~E_NOTICE
> /etc/init.d/apache2 restart
< Getting Help | Administration Tool problems >
Only processing-side of Leginon system is needed
This list does not include the python XML module because it is included in the python package for Windows. You should generally be able to use the most recent versions of these packages that are available from their respective web sites. Just be sure to always get the version that is compatible with Python 2.5. If you are having trouble with the most recent version, try to use the specific versions listed here:
Python 2.5* | http://www.python.org | |
Python for Windows extension (pywin32) | http://sourceforge.net/projects/pywin32/ | |
wxPython 2.5.2.8 or newer | http://www.wxpython.org | |
MySQL Python client 1.2 or newer | http://sourceforge.net/projects/mysql-python | 1.2.3 doesn't have window installer, yet, use 1.2.2 |
Python Imaging Library (PIL) 1.1.4 or newer | http://www.pythonware.com/products/pil/ | |
NumPy 1.0b5 (tested, others may work) | http://www.scipy.org | |
SciPy 0.5.1 or newer | http://www.scipy.org |
*Python 2.5 is the only python version that we have compiled numExtension. libCV and comarray in. Therefore no other python version works for now.
This required for following this instruction. We have used Tortois SVN client. Alternatively, you may copy the required NRAMM source files from another computer.
Name: | Download site: |
---|---|
Tortoise SVN client | http://tortoisesvn.tigris.org |
Install and register the following programs for CCD cameras from the two makes. Most likely, you already have these installed when the camera and TEM software was installed:
Camera Make: | File: |
---|---|
Gatan | TecnaiCCD.dll |
Tietz | CAMC4.exe* |
Note: We have experienced slowness of the CAMC4.exe comes with later version Tecnai TUI/TIA. Replacing it with an earlier version of CAMC4.exe resolved the problem
Install the following if you need film exposure on FEI Tecnai TEM through Leginon, available through FEI. Please contact Max Otten: mto@feico.com and request for adaexp.exe that works with your version of Tecnai user interface program.
Name: | File: |
---|---|
exposure adaptor | adaexp.exe |
Name: | Purpose: |
---|---|
leginon | modular TEM image acquisition |
pyami | general functions |
sinedon | Leginon/database interaction |
pyscope | microscope control and monitoring |
imageviewer | image viewing for tomography |
For FEI Eagle Camera or Gatan Camera that uses TIA, comarray package needs to be install with python
Special Instructions for FEI Eagle Camera
Because numextension, comarray and libcv would require extra compilers if you build them yourself, we have created Windows installers for them for python 2.5 and made them available at http://ami.scripps.edu/redmine/projects/leginon/files.
Downloadfile Name | Purpose: |
---|---|
numextension-2.0.0.win32-py2.5.exe | c extension for numerical processing |
comarray-2.0.0.win32-py2.5.exe | com module output conversion to array |
libCV-0.2.win32-py2.5.exe | small c library of algorithm from computer vision field |
adaexp.exe /regserver
Excute the installer files and follow the instructions.
Execute the installer files and follow the instructions. Do not execute comarray-2.0.0.win32-py2.5.3x3 if your camera uses TIA. See earlier section above.
cd Your_Download_Place\Leginon2.1\leginon c:\\python25\python.exe setup.py install
From a command line window:
cd C:\python25\Lib\Site-Packages\pyScope C:\python25\python.exe updatecom.py
The python window appears should say show the required type libraries it found:
Generating .py files from type libraries... initializing TEM Scripting Error, cannot find typelib for "TEM Scripting" initializing Tecnai Scripting done. initializing TOM Moniker done. initializing Tecnai Low Dose Kit done. initializing Tecnai Exposure Adaptor done. initializing Tietz CCD Camera done.
You will only find Tecnai Exposure Adaptor (Scripting for film exposure) if you ask FEI for it.
The script should generate a few files in C:\\python25\Lib\win32com\gen_py with seemly scrambled names such as BC0A2B03-19FF-11D3-AE00-00A024CBA50Cx0x1x9.py
Follow the instructions in Configure leginon.cfg located in the section for Linux installation but note the location of the configuration files follows. In addition, if the storage disk is mapped onto the Windows PC as drive Z, this mapping should be included in leginon.cfg. See below.
<Python directory>\Lib\site-packages\leginon\config\leginon.cfg
Example:
C:\Python25\Lib\site-packages\leginon\config\leginon.cfg
C:\Python25\Lib\site-packages\leginon\config\default.cfg
Follow instruction in Configure sinedon.cfg in the section for Linux installation but note the location of the configuration files follows.
C:\Python25\Lib\site-packages\sinedon\sinedon.cfg
C:\Documents and Settings\your_name>
C:\Python25\Lib\site-packages\sinedon\examples\sinedon.cfg
[tem] class: tecnai.Tecnai [camera] class: gatan.Gatan
[tem] class: tecnai.Tecnai
[camera] class: gatan.Gatan
The file contains other examples of microscope and camera drivers that we distribute from NRAMM.
Register the Tietz ping callback function. From a command line window:
cd C:\python25\Lib\Site-Packages\pyscope C:\python25\python.exe tietzping.py
Some Tietz camera dimensions are slightly larger than a standard size, for example, 2084 x 2084 instead of the standard 2048 x 2048. Some software will have trouble dealing with these dimensions. It is recommended to force the camera to the lower standard size (some multiple of 2^n). Modify the function that gets camera dimension in tietz.py, gatan.py, or tia.py depending on which camera you are using.
def getCameraSize(self): return {'x': 2048, 'y': 2048}
This instruction applies to Windows XP.
C:\Python25\Lib\site-packages\leginon
C:\Documents and Settings\All Users\Start Menu\Programs\Leginon
Although we don't recommend it, it is possible to run minimal Leginon directly on the Windows machine, Since the database and web servers are not there, you probably will be saving the images through a Samba server on a network drive also available to the Linux machine. If you do so, you will need to map the network drive. For example, if your Samba server has a hostname your_smbserver, and you have set up a share called [your_share_point] which points to /your_data_path/ and leginon data will be saved under a folder in /your_data_path/leginon/.
Enter shared path in Windows format as
\\your_smbserver\your_share_point
[Drive Mapping] Z:/your_data_path
[Images] path:/your_data_path/leginon
TightVNC (http://www.tightvnc.com) if you get tired of going into the microscope room just to open the column valves.
< Additional Database Server Setup | Steps needed for Installation Using Database Administration Tools >
< Using Project Management Tools | Microscope Set-up >
1. Install the Apache Web Server with the YaST or yum utility.
2. Find "httpd.conf".
This is /etc/httpd/conf/httpd.conf on CentOS and /etc/apache2/httpd.conf on SuSE
sudo nano /etc/httpd/conf/httpd.conf
3. Edit the "httpd.conf" configuration file with the following:
DirectoryIndex index.html index.php HostnameLookups On
Note: It may be possible to edit httpd.conf in YaST2 as well.
4. If you plan to enable the web interface user login feature, the ServerName directive should be set to a resolvable host name and UseCanonicalnames should be turned on. This will ensure the link provided in the email to verify user registration is valid. Follow the example below replacing YourServer.yourdomain.edu with your servers name.
ServerName YourSever.yourdomain.edu UseCanonicalName On
5. Restart the web server.
apachectl restart or sudo /sbin/service httpd restart (ON CentOS/RHEL/Fedora) or /etc/sbin/rcapache2 restart (ON SuSE) or /sbin/service httpd restartIf you want to start the web server automatically at boot on SuSE
sudo /sbin/chkconfig apache2 on #SuSE sudo /sbin/chkconfig httpd on #CentOS/RHEL/Fedora
< Configure php.ini | Check php information >
Appion allows you to use and pass data between multiple image processing packages from one integrated user interface. The image processing packages must be installed on your computer so that Appion can interface with them. You do not need to have all the packages installed for Appion to run, but you must have the packages installed that support the specific operations you wish to execute.
< Configure sinedon.cfg | Install EMAN >
cd /your_download_area
cd myami
sudo ./pysetup.sh install
That will install each package, and report any failures. To determine the cause of failure, see the generated log file "pysetup.log". If necessary, you can enter a specific package directory and run the python setup command manually. For example, if sinedon failed to install, you can try again like this:
cd sinedon sudo python setup.py install
Python installer put the packages you installed into its site-packages directory. This enables all users on the same computer to access them. The easiest way to discover where your installed package is loaded from by python is to load a module from the package using interactive python command lines like this:
Start the python command line from shell:
python
Import a module from the package. Let's try sinedon here. All packages installed through the above setup.py script should go to the same place.
At the python prompt (python>) type:
import sinedon
If the module is loaded successfully, call the module attribute path (two underscrolls before "path" and two underscrolls after) will return the location of the module it is loaded from
sinedon.__path__ ['/usr/lib/python2.4/site-packages/sinedon']
In this case, /usr/lib/python2.4/site-packages/ is your python-site-package-path. If you go to that directory, you will find all the packages you just installed.
Save this value as an environment variable for use later, for bash:
export PYTHONSITEPKG='/usr/lib/python2.4/site-packages'
setenv PYTHONSITEPKG '/usr/lib/python2.4/site-packages'
cd /your_download_area
cd myami
sudo ./pysetup.sh install
That will install each package, and report any failures. To determine the cause of failure, see the generated log file "pysetup.log". If necessary, you can enter a specific package directory and run the python setup command manually. For example, if sinedon failed to install, you can try again like this:
cd sinedon sudo python setup.py install
Python installer put the packages you installed into its site-packages directory. This enables all users on the same computer to access them. The easiest way to discover where your installed package is loaded from by python is to load a module from the package using interactive python command lines like this:
Start the python command line from shell:
python
Import a module from the package. Let's try sinedon here. All packages installed through the above setup.py script should go to the same place.
At the python prompt (python>) type:
import sinedon
If the module is loaded successfully, call the module attribute path (two underscrolls before "path" and two underscrolls after) will return the location of the module it is loaded from
sinedon.__path__ ['/usr/lib/python2.4/site-packages/sinedon']
In this case, /usr/lib/python2.4/site-packages/ is your python-site-package-path. If you go to that directory, you will find all the packages you just installed.
Save this value as an environment variable for use later, for bash:
export PYTHONSITEPKG='/usr/lib/python2.4/site-packages'
setenv PYTHONSITEPKG '/usr/lib/python2.4/site-packages'
< Perform system check | Configure leginon.cfg >
You are not required to install phpMyAdmin for Appion or Leginon, however, it is a useful tool for interfacing with the mysql databases.
Name: | Download site: | yum package name | SuSE rpm name |
---|---|---|---|
PHP | http://php.net/downloads.php | php | |
php-mysql | php-mysql |
If you have not already installed phpMyAdmin, do so. The yum installation is:
sudo yum -y install phpMyAdmin
Edit the phpMyAdmin config file /etc/phpMyAdmin/config.inc.php
and change the following lines:
sudo nano /etc/phpMyAdmin/config.inc.php
$cfg['Servers'][$i]['AllowRoot'] = FALSE; $cfg['Servers'][$i]['host'] = 'mysqlserver.INSTITUTE.EDU';
Edit the phpMyAdmin apache config file /etc/httpd/conf.d/phpMyAdmin.conf
and change the following lines:
sudo nano /etc/httpd/conf.d/phpMyAdmin.conf
<Directory /usr/share/phpMyAdmin/> order deny,allow deny from all allow from 127.0.0.1 allow from YOUR_IP_ADDRESS </Directory>
Note: If you want to access phpMyAdmin from another computer, you can also add it to this config file with an allow from
tag
Next restart the web server to take on the new setting
sudo /sbin/service httpd restart
To test the phpMyAdmin configuration, point your browser to http://YOUR_IP_ADDRESS/phpMyAdmin or http://localhost/phpMyAdmin and login with the usr_object user.
A common problem is that the firewall may be blocking access to the web server and mysql server. On CentOS/Fedora you can configure this with the system config:
system-config-securitylevel
Firewall configuration is specific to different Unix distributions, so consult a guide on how to do this on non-RedHat machines.
< Install the Web Interface | Potential Problems >
Using the Required Supporting Packages table below, install any missing prerequisite packages by following the instructions for your specific Linux distribution.
For example, SUSE users can use YaST to install them; RedHat and CentOS users can use yum
, Debian and Ubuntu uses apt-get
.
We highly recommend using pre-built binary packages to install the programs. Installing from source can quickly become a nightmare! See also the previous page, Instructions_for_installing_CentOS_on_your_computer for Red Hat based systems.
Name: | Download site: | yum package name | SuSE rpm name |
---|---|---|---|
Python 2.4 or newer | http://www.python.org | python | python-devel |
wxPython 2.5.2.8 or newer | http://www.wxpython.org | wxPython | python-wxGTK |
MySQL Python client 1.2 or newer | http://sourceforge.net/projects/mysql-python | MySQL-python | python-mysql |
Python Imaging Library (PIL) 1.1.4 or newer | http://www.pythonware.com/products/pil/ | python-imaging | python-imaging |
NumPy 1.0.1 or newer | http://numpy.scipy.org/ | numpy | numpy |
SciPy 0.5.1 (tested, others may work)* | http://www.scipy.org | scipy | python-scipy |
If you use Python 2.4 or earlier, you also need to install the PyXML module . For more recent versions of Python, it is already included in the main Python package.
For CentOS, see Download additional Software page, if you have trouble finding these packages.
You can test your numpy and scipy install with their build in test functions:
python -c 'import numpy; numpy.test(level=1)' python -c 'import scipy; scipy.test(level=1)'
Numpy is more stable should be successful. Expect to see lots of errors with scipy.
You can successfully install most of these packages on a Mac by downloading DMG files and clicking on the install programs. This is not for novice Mac user. Be warned, wxpython problems on Mac will make your life difficult in using Leginon gui. Don't make your mac the only processing server if it is Leginon that you will use mainly.
Mac OS X Installer Disk Image
(v2.6 recommended) from http://python.org/download/ and install the newer version of pythonMRC Tools is installed as a php extension and is required for displaying mrc files live on the web browser.
You may find installation information for the following packages under Install Web Server Prerequisites.
You can check whether php-devel is installed by typing:
phpize
Do not worry about any error message as long as the command is found.
Make sure that php-GD and FFTW 3 devel libraries are installed.
TODO: provide a screenshot of info.php when correctly installed.
Note:
MRCtools are compiled and added to php extension with php-devel package. MRCtools use GD and FFTW3 that need to be compiled from their development libraries while the extension is compiled. If GD and FFTW3 sources were downloaded and compiled directly on your computer, these development files are included. If (as in most cases) GD and FFTW3 are installed from rpm, they are not included. An error message will appear when you attempt to compile mrctools. In this case, you will need separate download and installation of GD-devel and FFTW3-devel. Search http://rpmfind.net/linux/rpm2html/ for GD-devel and FFTW3-devel for the rpm distribution needed for your system. More information on the gd library can be found here. If you find that you can only view images as png instead of jpg, it may be that you do not have gd jpeg support installed.
cd myami/programs/php_mrc
phpize ./configure make sudo make install
/usr/lib64/php/modules
on 64bit CentOS/RHEL/Fedora). If you are unsure where the php module directory is, use http://localhost/info.php to find it under extension_dir.ls /usr/lib64/php/modules mrc.so
ls /usr/lib64/php5/extensions mrc.so
php.ini
.cd /etc/php.d sudo touch /etc/php.d/mrc.ini sudo chmod 666 mrc.ini echo "; Enable mrc extension module" > mrc.ini echo "extension=mrc.so" >> mrc.ini sudo chmod 444 mrc.ini cat mrc.ini
extension=mrc.so
#SuSe /etc/init.d/apache2 restart #CentOS sudo /sbin/service httpd restart
sudo reboot
1. find in the info.php web page the location of "additional .ini files parsed" in the first table (such as /etc/php.d/conf.d/*).
2. Go to the directory and make a copy of any ini file to use as a template for mrc.ini
>cd [additional_ini_directory] >cp gd.ini mrc.ini
3. Edit mrc.ini to the following
; comment out next line to disable mrc extension in php extension=mrc.so
4. Comment out mrc extension from php.ini (found in /etc/php.ini/ on a typical PHP installation)
;extension=mrc.so
5. Restart your webserver
> /etc/init.d/httpd restart
In the myami/php_mrc (or myami/programs/php_mrc if installing from trunk) directory, you will find two test scripts, "ex1.php" and "ex2.php" and a test MRC image "mymrc.mrc".
Copy them to your top level web directory (for example on CentOS: /var/www/html/):
cd myami/programs/php_mrc sudo cp ex1.php ex2.php mymrc.mrc /var/www/html/
Run the scripts with the following commands and visit the corresponding pages from the web server:
The expected results are shown below. If you get the same images, you've installed the extension properly.
Note: the "display" command is part of the ImageMagick package, which you may have to install.
web server: http://localhost/ex1.php
php -q ex1.php | display
web server: http://localhost/ex2.php
php -q ex2.php | display
Test files work but images not showing up in the ImageViewers?
Here's one way this was fixed.
< Download Appion and Leginon Files | Install SSH module for PHP >
Install Leginon and Appion web tools for viewing images and performing image processing through the web server.
TODO: put the prereqs for this in Web Preq page rather than linking to the processing page.
If you have not yet installed Leginon/Appion python packages on this server, the web interface will at least need the myami/pyami package to do MRC to JPEG conversion. First install the supporting packages. Then install myami/pyami as follows:
cd myami/pyami sudo python setup.py install
which mrc2any
You will need to know that location when configuring below.
Example:
cd myami #CentOS example sudo cp -vr myamiweb /var/www/html/ #this is temporary for setup, revert to 755 when finished with this page sudo chmod 777 /var/www/html/myamiweb #if you have SELinux enabled this command will help sudo chcon -R --type=httpd_sys_content_t /var/www/html
There is a setup wizard available to help you set the configuration parameters for your installation. If you prefer not to use the wizard, there are instructions for manually editing the configuration file. If this is your first time creating the web tool configuration file, we recommend using the setup wizard.
The setup wizard will check your database connection, create required database tables, and perform default data initialization.
egrep -iw --color=auto 'user|group' /etc/httpd/conf/httpd.conf
Go to Install the Web Interface Advanced for the advanced configuration.
sudo chmod 755 /var/www/html/myamiweb
Visit http://yourhost/myamiweb or http://localhost/myamiweb to confirm functionality.
You may also browse to the automatic web server troubleshooter at: http://localhost/myamiweb/test/checkwebserver.php
Edit the following items in php.ini (found as /etc/php.ini on CentOS and /etc/php5/apache2/php.ini on SuSE) so that they look like the following:
display_errors = Off
< Install SSH module for PHP | Install phpMyAdmin >
Note: You may skip this section if you configured your installation with the setup wizard at http://localhost/myamiweb/setup.
Copy config.php.template to config.php and edit the latter by adding these parameters:
"config.php" should be located in /var/www/html/myamiweb/ on CentOS and /srv/www/htdocs/myamiweb/ on SuSE.
define('BASE_PATH',"myamiweb");
// Browse to the administration tools in myamiweb prior to // changing this to true to populate DB tables correctly. define('ENABLE_LOGIN', false);
define('EMAIL_TITLE', 'The name of your institute'); define('ADMIN_EMAIL', "example@institute.edu");
define('ENABLE_SMTP', false); define('SMTP_HOST', 'mail.institute.edu'); //your smtp host
// --- Check this with your email administrator -- // // --- Set it to true if your SMTP server requires authentication -- // define('SMTP_AUTH', false); // --- If SMTP_AUTH is not required(SMTP_AUTH set to false, -- // // --- no need to fill in 'SMTP_USERNAME' & SMTP_PASSWORD -- // define('SMTP_USERNAME', ""); define('SMTP_PASSWORD', "");
define('DB_HOST', ""); // DB Host name define('DB_USER', ""); // DB User name define('DB_PASS', ""); // DB Password define('DB_LEGINON', ""); // Leginon database name define('DB_PROJECT', ""); // Project database name
// --- Enable Image Cache --- // define('ENABLE_CACHE', true); // --- caching location --- // // --- please make sure the apache user has write access to this folder --- // define('CACHE_PATH', '/srv/www/cache/'); define('CACHE_SCRIPT', WEB_ROOT.'/makejpg.php');
addplugin("processing");
// Check if IMAGIC is installed and running, otherwise hide all functions define('HIDE_IMAGIC', false); // hide processing tools still under development. define('HIDE_FEATURE', true);
$PROCESSING_HOSTS[] = array( 'host' => 'myhost.inst.edu', 'nproc' => 32, // number of processors available on the host, not used 'nodesdef' => '4', // default number of nodes used by a refinement job 'nodesmax' => '280', // maximum number of nodes a user may request for a refinement job 'ppndef' => '32', // default number of processors per node used for a refinement job 'ppnmax' => '32', // maximum number of processors per node a user may request for a refinement job 'reconpn' => '16', // recons per node, not used 'walltimedef' => '48', // default wall time in hours that a job is allowed to run 'walltimemax' => '240', // maximum hours in wall time a user may request for a job 'cputimedef' => '1536', // default cpu time in hours a job is allowed to run (wall time x number of cpu's) 'cputimemax' => '10000', // maximum cpu time in hours a user may request for a job 'memorymax' => '', // the maximum memory a job may use 'appionbin' => 'bin/', // the path to the myami/appion/bin directory on this host 'appionlibdir' => 'appion/', // the path to the myami/appion/appionlib directory on this host 'baseoutdir' => 'appion', // the directory that processing output should be stored in 'localhelperhost' => '', // a machine that has access to both the web server and the processing host file systems to copy data between the systems 'dirsep' => '/', // the directory separator used by this host 'wrapperpath' => '', // advanced option that enables more than one Appion installation on a single machine, contact us for info 'loginmethod' => 'SHAREDKEY', // Appion currently supports 'SHAREDKEY' or 'USERPASSWORD' 'loginusername' => '', // if this is not set, Appion uses the username provided by the user in the Appion Processing GUI 'passphrase' => '', // if this is not set, Appion uses the password provided by the user in the Appion Processing GUI 'publickey' => 'rsa.pub', // set this if using 'SHAREDKEY' 'privatekey' => 'rsa' // set this if using 'SHAREDKEY' );
// --- Please enter your processing host information associate with -- // // --- Maximum number of the processing nodes -- // // --- $PROCESSING_HOSTS[] = array('host' => 'host1.school.edu', 'nproc' => 4); -- // // --- $PROCESSING_HOSTS[] = array('host' => 'host2.school.edu', 'nproc' => 8); -- // // $PROCESSING_HOSTS[] = array('host' => '', 'nproc' => );
$DEFAULTCS = "2.0";
We will not include the cluster registration now. It is covered in the last part of this document.
Go back to Install the Web Interface
The myamiweb files are mostly php scripts that run at the web server. PHP, PHP-devel, gd, and fftw3 packages are required before installation of myamiweb and the mrc extension that handles the display of mrc files. Some of these packages may be found on the SuSE Linux DVD or included in common package repository. MySQL and the Apache Web Server can be downloaded from their respective websites.
CentOS> sudo yum install php-gd SuSE10.2 and above> zypper install php-gd
Prerequisite packages for myamiweb:
Name: | Download site: | yum package name | SuSE rpm name |
---|---|---|---|
Apache | www.apache.org | httpd | apache2 |
php | www.php.net | php | php |
php-devel* | rpmfind.net/linux/RPM/Development_Languages_PHP.html | php-devel | php-devel |
php-mysql* | rpmfind.net/linux/RPM/Development_Languages_PHP.html | php-mysql | php-mysql |
php-gd | www.php.ned/gd (Use gd2) | php-gd | php-gd |
fftw3 library (including development libraries and header *) | www.fftw.org (Use fftw3.x) | fftw3-devel | fftw3-devel |
libssh2 developmental libraries | http://www.libssh2.org | libssh2-devel | |
phpMyAdmin (optional) | http://www.phpmyadmin.net | phpMyAdmin | |
GCC, the GNU Compiler Collection | http://gcc.gnu.org | gcc |
Notes:
< Differences between Linux flavors | Configure php.ini >
Biocomputing Unit at the Spanish National Center of Biotechnology (CNB-CSIC) provides detailed documentation on how to install Xmipp on various systems. Below we cover our way to get it working on your system.
Name: | Download site: | CentOS package name | Fedora package name | SuSE rpm name |
---|---|---|---|---|
gcc-c++ | gcc-c++ | |||
openmpi-devel | openmpi-devel | |||
libtiff-devel | libtiff-devel | |||
libjpeg-devel | libjpeg-devel | libjpeg-turbo-devel | ||
zlib-devel | zlib-devel |
We recommend installing Xmipp from source to properly use the openmpi libraries that allows you to run on multiple processors
tar zxvf Xmipp-2.4-src.tar.gz
Alternatively, you may download from the svn repo:
svn co http://newxmipp.svn.sourceforge.net/svnroot/newxmipp/tags/release-2.4/xmipp/ Xmipp-2.4-src
As of Feb 2012, this was required to compile the 2.4 source code.
locate libmpi.so /usr/lib64/openmpi/1.3.2-gcc/lib/libmpi.so
Note: If you can not find the openmpi directory, make sure you have installed the openmpi package. The installation on CentOS using yum is: yum -y install openmpi-devel.
cp -v SConstruct SConstruct.orig
opts.Add('MPI_INCLUDE', 'MPI headers dir ', '/usr/lib/openmpi/1.2.7-gcc/include/') opts.Add('MPI_LIBDIR', 'MPI libraries dir ', '/usr/lib/openmpi/1.2.7-gcc/lib/') opts.Add('MPI_LIB', 'MPI library', 'mpi')
Be sure to modify the path in the second command as needed. For example, on a 32 bit machine using 1.4-gcc the command is:
export PATH=$PATH:/usr/lib/openmpi/1.4-gcc/bin
sudo mpi-selector --verbose --yes --system --set `rpm --qf '%{NAME}-%{VERSION}-gcc-%{ARCH}\n' -q openmpi` export PATH=$PATH:/usr/lib64/openmpi/1.3.2-gcc/bin ./scons.configure
Note: If you are installing Xmipp on x86_64 CentOS 6, you can use the following commands instead.
export PATH=/usr/lib64/openmpi/bin:$PATH ./scons.configure \ MPI_LIBDIR=/lib/usr/lib64/openmpi/lib \ MPI_INCLUDE=/lib/usr/lib64/openmpi/include \ MPI_LIB=mpi
* Checking for MPI ... yes
./scons.compile
/usr/local
sudo mv -v Xmipp-2.4-src /usr/local/Xmipp
export XMIPPDIR=/usr/local/Xmipp export PATH=${XMIPPDIR}/bin:${PATH} export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${XMIPPDIR}/lib
setenv XMIPPDIR /usr/local/Xmipp setenv PATH ${XMIPPDIR}/bin:${PATH} setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${XMIPPDIR}/lib
sudo cp -v xmipp.sh /etc/profile.d/ sudo chmod 755 /etc/profile.d/xmipp.sh - or - sudo cp -v xmipp.csh /etc/profile.d/ sudo chmod 755 /etc/profile.d/xmipp.csh
You may need to log out and log back in for these changes to take place, or source the environment script:
source /etc/profile.d/xmipp.sh
Test Xmipp by running ml_align2d program
xmipp_ml_align2d -h
2104:Argument -i not found or invalid argument File: libraries/data/args.cpp line: 502 Usage: ml_align2d [options] -i <selfile> : Selfile with input images -nref <int> : Number of references to generate automatically (recommended) OR -ref <selfile/image> OR selfile with initial references/single reference image [ -o <rootname> ] : Output rootname (default = "ml2d") [ -mirror ] : Also check mirror image of each reference [ -fast ] : Use pre-centered images to pre-calculate significant orientations [ -thr <N=1> ] : Use N parallel threads [ -more_options ] : Show all possible input parameters
< Install SPIDER | Install UCSF Chimera >
If you have a new computer(s) for your Leginon/Appion installation, we recommend installing CentOS because it is considered to be more stable than other varieties of Linux.
CentOS is the same as Red Hat Enterprise Linux (RHEL), except that it is free and supported by the community.
We have most experience in the installation on CentOS and this installation guide has specific instruction for the process.
see Linux distribution recommendation for more.
Latest version tested at NRAMM: CentOS 5.8
Note: All formally released versions of Appion (versions 1.x and 2.x) run on CentOS 5.x. Appion developers, please note that the development branch of Appion is targeting CentOS 6.x and Appion 3.0 will run on CentOS 6.x.
Perform a SHA1SUM confirmation:
sha1sum CentOS-5.8-i386-bin-DVD-1of2.iso
The result should be the same as in the sha1sum file provided by CentOS. This is found at the same location you downloaded the .iso file.
For example:
Use dvdrecord in Linux to burn disk.
dvdrecord -v -dao gracetime=10 dev=/dev/dvd speed=16 CentOS-5.8-i386-bin-DVD-1of2.iso
Note: This step is optional, however you will need root access to complete the Appion Installation.
Make sure you have root permission.
Open the file in an editor. ex. vi /etc/sudoers
Look for the line: root ALL=(ALL) ALL.
Add this line below the root version:
your_username ALL=(ALL) ALL
Logout and log back in with your username.
The CentOS installation is complete.
< Select Linux distribution to use | Network Configuration >
[tem] class: tecnai.Tecnai [camera] class: gatan.Gatan
[tem] class: tecnai.Tecnai
[camera] class: gatan.Gatan
cs is the coefficient of spherical aberration in meters. Find out from TEM manufacture the proper value for your tem.
zplane is a number that gives the order of camera. If a camera with low zplane value is going to acquire an image, Leginon will attempt to retract all camera at higher zplane values.
[tem] class: tecnai.Tecnai cs: 2.0e-3 [camera] class: gatan.Gatan zplane: 50
[tem] class: tecnai.Tecnai cs: 2.0e-3
[camera] class: gatan.Gatan zplane: 50
< Installation Troubleshooting | Start Leginon >
Since we have observed that, at least on FEI computage, the targeting accuracy is higher when the distance of movement is smaller, a special option is put in regarding how a target is moved to the center for imaging at the next scale. This method of movement is currently used in MSI-RCT, MSI-RCT raster, and MSI-Tomography applications at the final exposure step.
IMPORTANT: Do no use this option before a targeting node that uses queuing option
IMPORTANT: Because this process need to reacquire the parent image at each iteration, the electron dose in the area WILL accumulate. Make sure the dose used for the parent image preset is minimal and DO NOT use an "Naviation Target Tolerance" that takes 10 or more iterations to achieve.
< Monitor Progress of Queued Targets
The JAHC Hole Finder class is a variation of Hole Finder class. The purpose and operation is similar in the two node classes. The differences are 1: JAHC Hole Finder does not use edge image for correlation but the original, and 2: JAHC Hole Finder uses a scaled template image rather than a simple geometric ring for the correlation step. Like the Hole Finder, the values in this node vary so much from grid to grid (and from square to square) that the best way to find these parameters is by going through a step-by-step trial and error process. To proceed from one step of the hole targeting process to another, simply proceed from top to bottom through the display selection buttons in the image control panel. The display settings associated with each display selection are the locations where the JAHC Hole Finder parameters can be adjusted. To see the final acquisition and focus targets, enable only the Original, acquisition, and focus display selections.
Required bindings for recieving images and publishing targets:
previous Acquisition - (AcquisitionImagePublishEvent) -> JAHC Hole Finder
JAHC Hole Finder - (ImageTargetListPublishEvent) -> next Acquisition
JAHC Hole Finder - (QueuePublishEvent) -> next Acquisition
Required bindings for proper waiting among nodes:
JAHC Hole Finder- (ImageProcessDoneEvent) -> previous Acquisition
next Acquisition - (TargetListDoneEvent) -> JAHC Hole Finder
NOTE: To see the effects of Testing the settings for a particular Hole Finder step in the Image Control Panel, the corresponding JAHC Hole Finder step Display must be enabled before using the Test feature in that step's Display Settings.
To view the original input image without any image processing done to it, enable this button. Enabling this button will disable/override the Edge, Template, and Threshold Displays.
The purpose of the Template step is to cross correlate a template of the properly sized template holes against the original image.
To view the Template image, enable this button. Enabling this button will disable/override the Original, Edge, and Threshold Displays.
The purpose of the Threshold step is to apply a threshold to the previous Template image. It is in unit of number of standard deviation above the mean. The Threshold image should have dots that represent the center of all the found holes.
To view the Threshold image, enable this button. Enabling this button will disable/override the Original, Edge, and Template Displays.
The purpose of the Blobs step is to begin to narrow down the "hole center dots" that have been found. This step serves as additional criteria for finding good holes.
To view Blobs, either the Original, Edge, Template, or Threshold Displays must be enabled. The Blobs that pass this step will be shown with a turquoise crosshair.
The purpose of the Lattice step is to determine whether the blobs or "hole center dots" fit in a lattice that describes how the hole layout.
To view Lattice, either the Original, Template, or Threshold Displays must be enabled. The Lattice blobs that pass this step will be shown with a pink crosshair.
The purpose of the acquisition step is to select holes of the proper ice thickness and arrange the desired acquisition target layout. The "focus" and "acquisition" JAHC Hole Finder steps Display Settings appear in the same window. For the purpose of this documentation to facilitate the separation of steps in the user interface, acquisition and focus will be addressed separately. Therefore, only the parameters pertaining to acquisition targets will discussed in this section. The parameters not covered in this section are part of the focus section.
To view acquisition, either the Original, Edge, Template, or Threshold Displays must be enabled. The acquisition targets that pass this step will be shown with a green crosshair.
Ice Thickness Threshold:
Target Template:
The purpose of the focus step is to focus targets near selected holes. The "focus" and "acquisition" Hole Finder steps Display Settings appear in the same window. For the purpose of this documentation to facilitate the separation of steps in the user interface, acquisition and focus will be addressed separately. Therefore, only the parameters pertaining to focus targets will discussed in this section. The parameters not covered in this section are part of the acquisition section.
To view focus, either the Original, Edge, Template, or Threshold Displays must be enabled. The focus targets that pass this step will be shown with a blue crosshair.
Ice Thickness Threshold:
Target Template:
< Hole Depth | Manual Acquisition >
http://cryoem.nysbc.org/CemRobotics.html
[TEM] class: jeol1230.jeol1230
On the instrument host of the instrument, a TEM host that uses Tecnai class, for example, you can launch python command line window and try to create an instance of the instrument and then call a function such as getMagnifications in that like this:
import pyscope.registry s = pyscope.registry.getClass('jeol1230')() s.getMagnifications()
>>> import pyscope.registry Traceback (most recent call last): File "<stdin>", line 1, in <module> File "c:\Python25\Lib\site-packages\pyscope\registry.py", line 9, in <module> import config File "c:\Python25\Lib\site-packages\pyscope\config.py", line 39, in <module> mod = imp.load_module(fullmodname, *args) File "c:\Python25\Lib\site-packages\pyscope\jeol1230.py", line 8, in <module> from pyscope import jeol1230lib File "c:\Python25\Lib\site-packages\pyscope\jeol1230lib.py", line 8, in <module> import serial ImportError: No module named serial >>>
you need to install "Python Serial Port Extensions" http://pypi.python.org/pypi/pyserial
>>> import pyscope.registry >>> s = pyscope.registry.getClass('jeol1230')() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "c:\Python25\Lib\site-packages\pyscope\jeol1230.py", line 27, in __init__ self.jeol1230lib = jeol1230lib.jeol1230lib() File "c:\Python25\Lib\site-packages\pyscope\jeol1230lib.py", line 25, in __init__ self.zeroDefocus = self.readZeroDefocus() File "c:\Python25\Lib\site-packages\pyscope\jeol1230lib.py", line 35, in readZeroDefocus infile = open(self.defocusFile,"r") IOError: [Errno 2] No such file or directory: 'C:\\Python25\\Lib\\site-packages\\pyScope\\defocus.cfg' >>>
create an empty file called defocus.cfg
>>> import pyscope.registry >>> s = pyscope.registry.getClass('jeol1230')() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "c:\python25\Lib\site-packages\pyscope\jeol1230.py", line 27, in __init__ self.jeol1230lib = jeol1230lib.jeol1230lib() File "c:\python25\Lib\site-packages\pyscope\jeol1230lib.py", line 25, in __init__ self.zeroDefocus = self.readZeroDefocus() File "c:\python25\Lib\site-packages\pyscope\jeol1230lib.py", line 37, in readZeroDefocus line = lines[0] IndexError: list index out of range >>> s = pyscope.registry.getClass('jeol1230')() close connection to JEOL1230 through COM1 port Traceback (most recent call last): File "<stdin>", line 1, in <module> File "c:\python25\Lib\site-packages\pyscope\jeol1230.py", line 27, in __init__ self.jeol1230lib = jeol1230lib.jeol1230lib() File "c:\python25\Lib\site-packages\pyscope\jeol1230lib.py", line 18, in __init__ self.ser = serial.Serial(port='COM1', baudrate=9600, bytesize=8, parity='N', stopbits=1, xonxoff = 0, timeout=10, rt scts=0) File "serial\serialwin32.py", line 31, in __init__ SerialBase.__init__(self, *args, **kwargs) File "serial\serialutil.py", line 261, in __init__ self.open() File "serial\serialwin32.py", line 59, in open raise SerialException("could not open port %s: %s" % (self.portstr, ctypes.WinError())) serial.serialutil.SerialException: could not open port COM1: [Error 5] Access is denied. >>>
Dictionary ordering problem of MySQL query, No temporary solution.
Temporary solution: See <link linkend="bad_default_reference">Operation Trouble
Shooting</link> on the subject.
Temporary solution: Always use preset manager when move type is image shift.
No temporary solution.
Temporary solution: Close leginon and clients and restart.
Temporary solution: Always use Presets Manager to send the preset to be used in
simulation first before usinging Simulate Targets tool.
Temporary solution: None.
Temporary solution: Hold down to Ctrl key to select and deselect multiple presets.
Shift key still means selecting all between the two clicks.
Note: This problem is caused by some bug in wxPython for LINUX.
Temporary solution: None.
In addition to the bugs listed below, you may view the Known Bugs Report which contains a dynamic list of known bugs.
Temporary solution: Always use preset manager when move type is image shift.
No temporary solution.
Temporary solution: Close leginon and clients and restart.
Temporary solution: Always use Presets Manager to send the preset to be used in
simulation first before usinging Simulate Targets tool.
Temporary solution: None.
Temporary solution: Hold down to Ctrl key to select and deselect multiple presets.
Shift key still means selecting all between the two clicks.
Note: This problem is caused by some bug in wxPython for LINUX.
Temporary solution: None.
Please go to http://ami.scripps.edu/redmine/projects/leginon/issues and add Tracker-Bug as the filter to see all outstanding bugs. Those with status of New or Assigned are bugs that do not yet have a solution. Those in Code Review or Testing stage means that revisions have been made to fix the bug but have not yet been through Code Review (by a different developer) and/or Testing.
< Leginon "Manual Application" | Multi-Scale Imaging Applications in General >
< Start Leginon | Leginon "Calibrations" Application >
< Leginon "MSI_T" Application | Leginon "MSI-Raster" Application >
< Leginon "MSI-T" Application | Leginon "MSI-RCT" and MSI-RCT raster" Applications >
< Leginon "MSI-raster" Application | Leginon "RobotMSI-Section" Application >
< Multi-Scale Imaging Applications in General | Leginon "MSI-Edge" Application >
< Leginon "RobotMSI-Section" Application | Leginon "Robot-MSI-Screen" Applications >
< Leginon "MSI-Tomography" Application | Frequent Asked Questions >
< Leginon "MSI-RCT" and MSI-RCT raster" Applications | Leginon "MSI-Tomography" Application >
Leginon is a system designed for automated collection of images from a transmission electron microscope.
Please email amisoftware@scripps.edu with general concerns.
Report bugs and request features as New issues at this site.
Use Leginon user forum for asking questions and to see answers to previous questions.
Leginon is released under the Apache License, Version 2.0
Instructions for Using Leginon at Scripps.
Version 1.6 contains enhancement that is not available in version 1.5 and release of a
series of Robot Screening application. Most significant changes are the split of Drift Manager
functions to Transform Manager which handles the transformation of targets using any level of
ancestry rather than one in the original Drift Manager. This allows an expansion of method that
is meant to improve targeting accuracy. There are also significant improvement in Tomography
node and its operation.
< An introduction to Leginon | Update to Leginon System version 1.6 >
Version 2.0 is the first combined release with Appion, our processing pipeline. All related sub-packages distributed by NRAMM are now under one svn control. The web tools (nicknamed myamiweb, pronounced like Miami-web) serves as the GUI for Appion. Basic Leginon functions are unchanged with bug fixes and convenient features added. Several options and enhancement were for large montage image acquisition on tissue sections, speeding up such lower magnification, large area operation. Changes in the more accurate image-shift targeting may require new calibrations.
Version 2.1 contains refinement of previously available features and some bug fixes. Most importantly, we found that certain TEM scripting version gives beam tilt value in unit other than radians. We encourage all Leginon users to the script provided with the new pyscope to check the scaling on the scopes to ensure proper performance.
We list our experience and current progress here.
If you have a new computer(s) for your Leginon/Appion installation, we recommend installing CentOS because it is considered to be more stable than other varieties of Linux.
CentOS is the same as Red Hat Enterprise Linux (RHEL), except that it is free and supported by the community.
We have most experience in the installation of the supporting packages on CentOS and this installation guide has specific instruction for the process.
Start at Instructions for installing CentOS on your computer.
Start at Instructions for installing Fedora on your computer
Leginon uses Digital Micrograph software came with any Gatan camera to aquire images through a function call. It is therefore necessary to configure the camera in Digital Micrograph and the configuration need to be checked and be consistent among users of Leginon in order to use the same calibration.
First, find out which camera control digital output is connected physically to the pre-specimen shutter on the microscope. This should be the shutter used for low-dose imaging (beam-blank or pre-specimen shutter). You will need to find it out from your microscope engineer or those who install the camera. In most cases we've seen, this is shutter 1, also known as primary shutter in DM. The next part uses this as the example.
Second, start DM from the Menu bar, go to /Camera/Configure Camera...
This brings up the Camera Configuration Window.
Third. now that the exposure will need to be made by opening the pre-specimen shutter, We do not know exactly which if any of the three built-in recording mode is used by the function call from Leginon, but they should be consistent in low dose imaging, any way. This is under the menu /Camera/Camera Setup
For each of the mode (Search/Focus/Exposure), since in this example shutter 1 (primary) is the pre-specimen shutter that is normally closed, you should uncheck the box on "Use Alternate Shutter".
To check that your shuttering is right, you need to look at the LED on the camera control box. While the microscope main screen is down, LED lights for the two shutters should be on, meaning the shutters are open. When the main screen is up and the camera is inserted, the shutters would go to idle state, with the one corresponds to the pre-specimen dimmed while the one for the post-specimen lit. Next, try to acquire an image through Leginon at a relative long exposure ( > 0.5 s), and watch the LEDs. The one for pre-specimen should light up during the time of the exposure and then become dim again.
Camera flipping and shutter settings are configured per computer user. If you have several users, you will need to sync the flipping practices and make sure all of you are shuttering correctly.
Also as a warning, different data acquisition packages also require different configuration. If you have users using SerialEM, for example, it is important to coordinate with them to avoid conflicts.
< Calibrations required on FEI microscopes | Good Alignments Save Time>
Manual Acquisition is a node that allows the electron microscopist to acquire CCD images manually while at the microscope. This node essentially creates a button to acquire images manually with Leginon and gives all the benefits of the Leginon database and image storage.
Required bindings: None
- Use low dose = When enabled, Leginon will switch the microscope from focus to exposure mode of the Low Dose kit to acquire the image and then return to focus mode.
- Low Dose pause "4" seconds = Wait this amount of time before acquiring an image when using Low Dose on the microscope and acquiring images with the Acquire feature in this node. Increase the time if the microscope does not change modes fast enough.
< JAHC Hole Finder (Template Hole Finder) | Matlab Target Finder >
The Matlabe Target Finder node behaves like other target finding nodes in that it takes images as input and outputs a list of targets. In this case, Leginon sends the image to an externally running Matlab process, which then sends the list of targets back to Leginon.
In order to use the Matlab Target Finder, you must:
In addition to the usual target finder settings, this node needs to be configured with the matlab function (.m file) that should be executed on the image. The function should take the image as input in the form of a two dimensional array. The output should be two arrays, one for focus targets and one for acquisition targets. Each is an array of x,y pairs. Here is a simple example where the function generates a constant set of targets for any input image:
example Matlab module for target finding
function [acquisition, focus] = example(image) acquisition = [168, 234; 203, 54; 450, 390] focus = [324, 42; 36, 248; 151, 94]
Required bindings for receiving images and publishing targets:
previous Acquisition - (AcquisitionImagePublishEvent) -> Hole Finder
Hole Finder - (ImageTargetListPublishEvent) -> next Acquisition
Hole Finder - (QueuePublishEvent) -> next Acquisition
Required bindings for proper waiting among nodes:
Hole Finder- (ImageProcessDoneEvent) -> previous Acquisition
next Acquisition - (TargetListDoneEvent) -> Hole Finder
NOTE: To see the effects of Testing the settings for a particular Hole Finder step in the Image Control Panel, the corresponding Hole Finder step Display must be enabled before using the Test feature in that step's Display Settings.
To view the original input image, enable this button.
In Matlab target finder, the purpose of the acquisition setting is only for display and user selection.
To view acquisition, the Image Display must be enabled. The acquisition targets that the finder chooses will be shown with a green crosshair.
In Matlab target finder, the purpose of the focus setting is only for display and user selection.
To view focus, , the Image Display must be enabled. The focus targets that the finder chooses will be shown with a blue crosshair.
< Manual Acquisition | Matrix Calibrator >
Matrix calibrator performs four different calibrations that based on linear transformation conversion: Image shift, beam shift, stage position, and image/beam shift
Required bindings
Required bindings to use preset instrument configuration set by presets manager:
PresetsManagerNode - (PresetChangedEvent) -> MatrixCalibratorNode
Matrix calibration is made by making N sets of measurements (specified by "N Average"). Each measurement set acquires three images, first at a given origin, second with an x-axis movement in the specified "Parameter" by the specified "Shift Fraction" of the image, and third with an y-axis movement by the same shift fraction. The resulting shifts in the acquired images are obtained by cross correlation. A transformation matrix is then generated for the measurement set. The origin is shifted by the "Interval" specified in the node, in meters before the next set of measurements is taken. At the end, the N matrixes obtained are averaged and saved in the database at the specific magnification and movement type and can be applied to any camera configuration. "Tolerance", expressed in fraction of image, is used as an error check. The calibration is considered failed when the measured movement is much different from that calculated from pixel calibration
Because the calibration is based on correlation of the acquired images, well contrasted images with the intended movement clearly shown but not by such a large amount that the apparent feature is altered is the key for sucessful calibrations.
Image shift calibration is useful only on FEI microscope where image shift/beam shift compensation is calibrated and stored at the scope. Without such stored calibration, Image shift/Beam shift calibration is required instead.
This panel controls which image is shown in the Image Display area.
< Matlab Target Finder | Mosaic Click Target Finder >
This checklist is valid for users needing the full leginon capacity such as those of MSI application. "Manual" application users can set up the microscope in Low Dose Mode and follow their usual practice. The list in practical order includes alignments that are critical for Leginon operation and are ones Leginon can not perform, yet. Other alignments not mentioned here can often be refined within leginon. Conditions listed in [] show possible ways to check the alignment. In most cases, alignment is only needed if the check fails. * indicates tips for better results
The followings are optional alignment in LM mode. The alignment is needed only if serious problems are found and the alignment in general won't ever converge as nicely as those in HM mode.
< Good Alignments Save Time | Microscope Set-up ^
Microscope need to have the capacity for external control and network connected (See Network Configuration section for details on that. Here are known examples of Leginon implementation:
Gatan, Tietz, Eagle-minimal 1kx1k; NRAMM 4kx4k
At NRAMM, we separate the three activities into different computers that serve about 15 people with three microscopes that could be running at the same time. All scopes share the same database, web server, and file server. Each microscope has its own processing computer.
We no longer consider using a computer with Windows PC as the second computer as an option. A group tried it and it could not handle the memory demand
Minimal 2 GHz;
NRAMM:
The whole system with its image processing, database query and web serving, needs a lot of memory. Realistically, you will need minimal of 4GB memory for all processing+database+web server activities for one microscope operation with 4k camera that serves two persons (one operates the scope, one just look at the images from the web viewers) at the same time. We know of at least one successful daily usage at this configuration. For 2k camera, an all-in-one computer with 3GB memory has also been used successfully. If you are buying a new computer, get at least 6GB memory would be a good idea.
At NRAMM, to serve about 15 people viewing images and with three microscopes that could be running at the same time:
10 GB for the softwares and maybe a few hours worth of data collection. Much larger
for routine use. NRAMM 45Tb and growing although some are archived.
100 Mbps might be possible; NRAMM 1 Gbps
Leginon Home: http://www.leginon.org/
There are minimum of ten packages or single programs, some of them are included in your
Linux distribution.
adaexp.exe that is required if film exposure is to be made through Leginon on FEI Tecnai
machines is available by request. Please contact Max Otten: (mto at nl.feico.com)
and let him know what version of the Tecnai user interface you are using.
< Graphical User Interface | Getting Started >
The "GonioModeling" node, an instance of Modeler node class, models the goniometer/stage
movement to give a more accurate stage position/movement calibration. The stage position is
modeled in both x and y directions. For a more accurate calibration, many points or images
need to be acquired to give a more accurate mathematical fit to the function. This calibration
works best on a grid that will always give good cross correlations. Slot grids give large
areas that can cross correlate well, but this type of grid tends to drift. Negatively stained
grids or grids with dirts on it and carbon in the background will work well. Used Quantifoil
grid can be used, too, if there is enough dirt or large protein complex that keeps one hole
distinquishable from all others.
Modeled Stage Position calibration will also copy its results in image scale and rotation
in the form of stage position matrix calibration. Therefore, if Modeled Stage Position
calibration is performed in "GonioModeling" node, there is no need to calibration stage
position matrix alone in "Matrix" node.
How does modeled stage position calibration work?
There are two parts of results from doing a modeled stage calibration: 1) a function (in
the form of a harmonic series) that models the mechanical behavior of the stage, and 2) a
magnification adjustment (scaling and rotation) that allows the model function to be used at
different magnifications. Part 1 needs to be done at only one magnification, because the
result will be normalized in the database so that it can be used at any other magnification.
Part 2 needs to be done at any other magnifications that you wish to use this calibration.
The user interface of GonModeler node gives you two methods: "Fit Model" and "Rotation/Scale
Only" These two methods are really identical except for the final result they store in the
database. "Fit Model" will store both part 1 and 2 above. "Rotation/Scale Only" will only
store part 2 (and assumes that you already have part 1 done). Since "Fit Model" is
responsible for part 1, you generally need to measure a lot of points to get a good fit. You
will normally select between 2 and 5 terms for the harmonic series to get a good fit. The
"Mag Only" method will also fit a function to your measured points using the number of terms
you specify. But the resulting best fit function is not stored in the database. Only the
constant term of the resulting function is stored, because this can be used to scale the
existing normalized model function to the current magnification.
See ( http://ami.scripps.edu/publications/techreports/99-001/ ).
Starting from v1.4, the model can be used for building a mosaic of images (also called
an atlas).
NOTE: This full calibration needs to be completed for both the x and y axis, but at only
one magnification. The Magnification Adjustment calibration below can be after this has been
completed if the calibration needs to be improved.
If the data are over fitted, the modeled move may be worse than the simple linear
matrix calibration. In such cases, it is better to decrease the number of terms in the
fitting and redo the Fit Model step. For example, on our Two older FEI Tecnai, the x periods
was ~ 62 microns and fitted well with 5 harmonic terms. The y axis did not have a true
harmonic model, therefore, 0 terms were used.
During a data acquisition session, if the targeted holes are not being centered, first
check image alignment between sq and hl presets. If it is o.k., redo the Mag Only
calibration (see below) for a shorter calibration time. If fails, the full calibration is
needed.
Full GonModeling Calibration Need for the Example MSI:
Preset | magnification |
---|---|
sq | 550 |
A bad point is an outlier imagex or imagey measurement. The imagex and imagey values are
displayed in the message log window. They comes from, in most cases, failure in finding the
correct correlation peaks. Not all bad points will be rejected correctly because they can
accidentally fall within the tolerance. Since they can only be removed within the database
once inserted, avoiding them is preferable.
To avoid bad points coming from false correlation peaks, you can do one or more of the
following:
NOTE: Some of the valid data points may be rejected if the tolerance is set too low in
the measurement. They are, however, important in defining the model that is aimed to correct
these deviations. The tolerance should be increased if well correlated shifts are
rejected.
NOTE: Do NOT reuse the same label name that was used for the Full calibration step
above.
Once a full calibration of the goniometer model is done at one magnification, a so-call
"Scale/Rotation-only" calibration is all that is needed for using the model at a different
magnification. Small number of measurements is used as well.
GonModeling Mag Only Calibration Need for the Example MSI:
Preset | magnification |
---|---|
gr | 120 |
hl (optional if not acquiring tilted data) | 5000 |
< Stage Position matrix calibration | Checking Matrix and Modeled Stage Position Calibration >
Myamiweb that is the package that includes the web viewers has a script that estimate the time required to process the unfinished queue. Goto http://your_webserver/your_myamiweb/loi.php on a web browser where you can select your session to view the current count of the queue and the estimate time to completion. The estimate is based on processed queue of the same type in your session and will become more accurate once you have processed more queued targets automatically. This way, you can queue up enough for a good dinner or a hour of two on the beach.
< Queuing Example 3 - Both Exposure and Hole Targeting | Iterative Stage Movement Option >
Groups are used to associate users together. At the moment, Leginon does not use the group association for anything.
< Set up for a new regular user | Revert Settings >
Groups are used to associate users together. At the moment, Leginon does not use the group association for anything.
This is used to add details about the microscope and CCD Leginon will be connected to. More than one instrument can be added with different configurations. The "import" function is useful if the instrument information has been stored on different machines in different Leginon databases.
< More about Groups | Applications >
This is used to add details about the microscope and CCD Leginon will be connected to. More than one instrument can be added with different configurations. The "import" function is useful if the instrument information has been stored on different machines in different Leginon databases.
Mosaic Click Target Finder is a type of TargetFinder Node. It handles the loading, save, displaying and target selection of a list of images and and their composite.
Required bindings for Mosaic Click Target Finder Node:
Grid Targeting - (ImageTargetListPublishEvent) - > AcquisitionNodeAlias
AcquisitionNodeAlias- (AcquisitionImagePublishEvent) -> MosaicClickTargetFinder
MosaicClickTargetFinder - (ImageTargetListPublishEvent) -> AcquisitionNodeAlias
ClickTargetFinder - (ReferenceTargetListPublishEvent) -> AlignZeroLossPeak or MeasureDose
Required bindings for MosaicClickTargetFinder Node if Reference Targets are used:
MosaicClickTargetFinder - (ReferenceTargetListPublishEvent) -> AlignZeroLossPeak or MeasureDose
< Matrix Calibrator | Mosaic Target Maker >
< Mosaic Click Target Finder | Navigator >
Many preferences for nodes in "MSI-Tomography" application are the same as in MSI with queuing option. The example here is based on a working condition at the Jensen Lab.
The following should be set up by the user "administrator" which will then be used as system-wide default preference for new users. Once the new user starts the application, he/she can customize his/her own preferences. Not all preference has independent function. Therefore if you change one preference, check for the preference(configuration) of other nodes that might depend on it.
This application is normally used exclusively with the queuing option. Therefore, "wait for a node to process the image" option is always off. Note that the Process target type is default in all nodes except "Tomography Preview".
Node name: | preset: | move type (to reach the preset) : | wait for a node to process the image: | publish and wait for rejected targets: | adjust target for shift: | Process target type: |
---|---|---|---|---|---|---|
Grid Targeting | gr | N/A | N/A | N/A | N/A | N/A |
Grid | gr | modeled stage position | no | no | no | acquisition |
Square Q | sq | modeled stage position | no | no | no | acquisition |
Hole Q | hl | modeled stage postion | no | yes | yes | acquisition |
Z Focus | hl | modeled stage position | no | no | yes | focus |
Tomography Preview | preview | modeled stage position | no | no | yes | preview |
Tomo Focus | fc | modeled stage position | no | no | yes | focus |
Remember to press the "+" button in order to assign a preset to a node.
Leave other setting options to default. These default options are:
Enter 3 focus steps in the sequence list box by typing the name in the entry box and press "+" on its right.
Select individual step in the list box and set the following parameters
Step: | preset: | focus method: | Enabled: |
---|---|---|---|
Stage_Tilt_Auto | hl | Stage Tilt | Yes |
Beam_Tilt_Auto | hl | Beam Tilt | Yes |
Manual_after | fc | Manual | No |
For Stage_Tilt_Auto Step:
For Beam_Tilt_Auto Step:
Enter 3 focus steps in the sequence list box by typing the name in the entry box and press "+" on its right.
Select individual step in the list box and set the following parameters
Step: | preset: | focus method: | Enabled: |
---|---|---|---|
Stage_Tilt_Fine | fa | Stage Tilt | Yes |
Beam_Tilt_Fine | fa | Beam Tilt | Yes |
Manual_after | fc | Manual | No |
For Stage_Tilt_Fine Step:
For Beam_Tilt_Fine Step:
Tomography has many unique settings:
Once the goniometer model gives satisfactory results, Keep the tilt axis parameters fixed is recommended with the model set to be initialized with the model of "only this preset"
Defocus prediction smoothing is default to use shifts of 4 tilt images. A larger number can be set if the goniometer behavior is particularly jiggly.
Use defaults:
< Initial MSI application preference setup | Robot MSI-Section preference set-up >
The following sections will describe how to operate the MSI application once set-up is complete. MSI operation can vary depending on the quality of the specimen in the microscope and how well the calibrations have been completed. Once squares are manually picked from the atlas, the entire acquisition process is capable of proceeding without human intervention. This sort of hands-off operation does depend on how well holes can be found in the images of squares and how well high magnification exposure and focus targets can be picked in the the image of a hole. If the stage is drifting, the Drift Monitor will not allow acquisition to continue until the drift has settled down. Manual intervention in the acquisition process can make the hole finders operate better. Manual check before and after the autofocus routine runs is also possible in the Focus node. Manually checking after the autofocus routine finishes is a way for the Leginon user to verify that the autofocus routine worked properly.
If the computer does not have a lot of memory, it is recommended that Leginon should be the only application running on the computer during an experiment because all the imaging and processing take up a lot of memory.
1. local> start-leginon.py
2. Leginon Session> log in and select "Create session" if a new session is needed.
Create Session> Fill in needed information such as session name and comments. Select instrument and project, if project database is used. Image path is automatically selected.
3. Leginon Session> Select the session you have just created or use a previous session to start.
4. Leginon/Application/Run> Select the "MSI" application, the scope, and the local launcher. Click Run.
Important
The Atlas should have already been created by following the MSI everyday set-up checklist.
How to reload atlas:
This is used if Leginon was stopped and restarted.
1. Leginon/Square Targeting/Mosaic > Enter the size of the mosaic atlas loaded into the image display for better resolution. For example, Scale image to: 2048 for more resolution, 512 for fast loading
2. Leginon/Square Targeting/Tiles > Select the atlas label in "Load tiles from mosaic." The most recent one is the default.
3. Leginon/Square Targeting/Tiles> Click "Load"
Pick squares to collect data from by making selections on the atlas.
1. Leginon/Square Targeting> Refresh the target display by clicking .
2. Leginon/Square Targeting> Click the "acquisition" selection button .
3. Navigate around the atlas to find suitable squares for acquisition.
This step is purely empirical at this point (by eye). If using Quantifoil grids with ice, look for squares that have holes paler than the surrounding carbon. Although Leginon has automatic algorithm for square finding, the adjustment of parameters takes more time than what human can accomplish easily. Use the zoom to look at the holes more closely. Note that the zoom will take a long time on such a large image. Therefore...
NOTE: Be sure to be patient when clicking the zoom button, otherwise Leginon will
take a while to catch up to the number of zooms that have been asked for.
4. Click on squares that will be acquired.
5. Once all the targeted squares have been selected, click "Submit Targets."
6. Leginon will indicate where the next step is by showing active green icons next to the nodes that are being used. A question mark icon will appear when Leginon requires user interation. The message log for each node indicates what is happening that particular node.
Pick holes to collect data from by making selections on the first image of a square.
1. Leginon/Hole Targeting> Check whether holes were selected (acquisition targets = green crosshair, focus target = blue crosshair).
2. Edit the targets by mouse left click (add) or right click (delete) on the target in the image viewer with the picking tool for the target type active.
3. If the hole selection is acceptable, uncheck "Allow for user verification of picked holes" in Leginon/Hole Targeting/Settings>.
4. If the hole selection is not acceptable, try adjusting the Hole Targeting node to find holes in the current image of a square. Refer to the Hole Targeting Set-up.
5. Click "Submit Targets"
Manually checking the focus after eucentric focusing of hl images is recommended for bent grids.
1. When the Manual Focus window opens automatically (when Leginon reaches the Z Focus node), click "Eucentric focus to instrument" !http://ami.scripps.edu/software/leginon/images/icons/instrumentset.png. The rings of the CTF in the FFT should disappear if it is looking at the carbon support using fc preset. If hl preset is used to look at a hole during manual focus, look for the loss of contrast in IMAGE.
2. Adjust "Stage Z" until the image appears to be focused if not already so. Use a large step such as 5e-6 m.
3. If the defocus is consistently off by more than +/- 5 um., then the Beam Tilt calibrations (defocus) may need to be repeated.
Make sure that the stage is at eucentric height in the calibration and that the microscope has been well aligned.
4. Clicking the Stop button exits the maunal check.
5. Leginon/Z Focus/Focus Sequence> Disable "Manual_after" focus step when it is not required.
Pick exposure and focus targets on the first image of a hole.
1. Leginon/Exposure Targeting> Click the Original, acquisition, and focus selections in the image control panel.
2. Check whether exposure (green crosshair) and focus (blue crosshair) targets were selected correctly.
3. Edit the targets by mouse left click (add) or right click (delete) on the target in the image viewer with the picking tool for the target type active.
4. If the exposure and focus selection is acceptable, uncheck "Allow for user verification of picked holes" in Leginon/Exposure Targeting/Settings>.
5. If the exposure and focus selection is not acceptable, try adjusting the Hole Finder to pick the correct targets. Refer to Exposure Targeting Set-up.
6. Click "Submit Targets"
Manually check the focus after the first high magnification images that are acquired. Then turn off "manual_after" focus step once it has been verified that the autofocus routine is properly correcting the defocus and astigmatism.
1. When the Manual Focus window opens automatically (when Leginon reaches the Focus node), click "Set Instrument" to send what Leginon thinks is zero defocus to the microscope. The rings of the CTF in the FFT should disappear once the defocus is at zero.
2. If the rings are still visable or are astigmatic in the FFT, then the Beam Tilt calibrations (defocus and stimator) may need to be repeated.
Make sure that the stage is at eucentric height and that the microscope has been well aligned.
3. Clicking the Stop button exits the manual check.
4. Leginon/Focus/Focus Sequence> Disable "Manual_after" focus step when it is not required.
The images Leginon has acquired and published to the database can be viewed through the online viewers, the Leginon Image Viewer, the Leginon 3-Way Viewer, and the Leginon Observer Interface (LOI) which displays the currently acquired images.
1. Go to http://yourhost/myamiweb and open either the Leginon Image Viewer, the Leginon 3-Way Viewer, or the LOI.
2. Select today's Session from the pull-down list.
3. Have fun browsing through your images! You can view the parent images of images selected in the main viewer of the 3-way viewer in the smaller views by specify the appropriate preset.
Targets that are submitted can no longer be modified individually from the node where you selected them. If you need to abort the unprocessed targets in a list, you need to go to the node that receive it and click on the "Abort" button. In other words, if you want to abort all remaining holes in a square, you need to abort at the "Hole" node.
The same is true with pausing. Pausing is usually used when the cryo stage requires refill. To allow proper tracking of targets and drift, we recommend that you pause at "Hole" node for the purpose if exposure targets are not queued.
More information about interrupting data collection can be found in the Trouble Shooting Chapter regarding pausing and aborting during data collection
< Special Operation setup | Optimizing autofocusing >
Note: The following serves as a quick set-up guide for the MSI application and assumes you have set up Leginon before. Use default values unless otherwise specified. If you are choosing the hole and exposure targets manually, you can of course skip the part regarding setting up the hole finders.
< Special Operation Preference setup | MSI set-up in more details >
This section shows some of the more important and complicated steps in the set-up checklist. It assumes that the user knows the nomenclatures. See the full documentation if you want the detailed explanation. It also assumes that general set-up and calibrations exist from previous sessions so that most calibrations can remain unchanged. The steps that are NRAMM specific are marked. MSI now features stage Eucentric height correction at each square.
NOTE: The Tietz imaging software (EMMenu) must be turned OFF before Leginon is started. In contrast to this, the Gatan imaging software (Digital Micrograph) must be ON before Leginon is started.
Set up is most stable with a good microscope alignment.
1. Initial alignment at the microscope See Chapter on Microscope setup for details.
2. Start python-based leginon main program amd leginon
client. See Chapter on Start Leginon.
"Exception EAccessViolation in module adaExp.exe at....
Access violation at address xxxx in module 'adaExp.exe'. Read of address xxxx"
3. Start your preferred "MSI" application.
1. Leginon/Presets Manager> Send the sq preset at LM mode by choosing the preset name and click the "To Scope" tool on the right of the preset selection box.
2. scope> Move the grid to a position on the "align" square,
3. scope> Use stage alpha wobbler to move the sample to eucentric height if hasn't done so.
4. scope> Focus the beam to see only a small area of the intact square. Turn the focus knob to find the point where a scattering halo goes through the minimum which indicates that it is at focus. This procedure finds the focus easier than looking for minimal contrast in LM mode.
5. scope> Reset defocus to zero.
1. Leginon/Presets Manager> Send the fa preset at HM mode by choosing the preset name and click the "To Scope" tool on the right of the preset selection box.
2. scope> Use stage alpha wobbler to fine the specimen height to eucentric.
4. scope> Focus the image.
5. scope> Reset defocus to zero.
1. Leginon/Presets Manager> Send a preset at an intermediate mag at HM mode as the reference (e.g. hl) "To Scope"
Note: sq preset in LM mode can be used if the image alignment between LM and HM
is known to be good.
2. scope> Move the grid to a position on the "align" square, either on a recognizable object or burn a good hole through ice at the center of the CCD as preparation for lower mag preset image shift correction.
3. Leginon/Presets Manager> Click on the tool "Align presets to each other" .
4. Check, adjust, and save the preset(s) to be aligned.
The left panel displays and navigate by "Stage Position" of the reference preset while the right panel displays and navigate by "Image Shift" of the preset to be aligned * Leginon/Presets Manager/Align Presets> Choose the reference (hl) preset on the left panel.
Note: "Navigate" means selecting the navigate tool on the top right of image display and then double clicking the location of the new center that is translated by the given TEM Parameter.
Stage position model Scale and Rotation is stable as long as the LM eucentric height defocus is set to zero before each session, although variation from day to day is normal. Check the stage movement calibration of gr preset by navigating it in Navigation node. Within 10% error is satisfactory since reaching a square does not require high accuracy. If not, perform stage model position scale and rotation calibration> at gr preset using "Calibration" application as following:
Why goniometer model is better.
1. scope> Remove the objective aperture.
2. Leginon> Run "Calibrations" Application
3. Leginon/Presets Manager> Send "gr" preset to scope.
4. Leginon/GonioModeling/Settings/Measurement> Set axis=x, Points=5,Tolerance=25%, and Interval=1e-05 m. Default model label is the session name.
5. Leginon/GonioModeling/Settings/Modeling> Set "Scale and Rotation Adjustment Only"=Yes. Other settings will be set automatically once measurements are finished.
6. Leginon/GonioModeling> Click on will start "Measure" the shifts of between points that are moved on x axis of the goniometer.
7. Leginon/GonioModeling> Click on will "Calibrate" the scale and rotation of the model on x axis of the goniometer.
8. Leginon/GonioModeling> repeat 4-7 with the axis set to y.
1. scope> Remove the objective apperture.
2. Leginon/Grid Targeting> Click "Settings" to check the preset used, the size and name of the atlas.
3. Leginon/Grid Targeting> Click "Calculate Atlas"
4. Leginon/Grid Targeting> Click "Submit Targets" to begin acquiring the atlas.
5. Leginon/Square Targeting> Follow the atlas progress in the display. (***There is no sign at the end currently other than that nothing happens for a long time and that the atlas dimension is the same in other direction when it is completed.)
6. scope> Insert the objective aperture.
7. Leginon/Presets Manager/Send an HM preset "To Scope" several times to cycle all magnifications and warm up the objective lens to minimize the image shift hysteresis in switching between LM and HM modes. If the scope has been in LM mode for a long time, wait for at least 30 min before final image shift refinement of needed LM preset during acquisition (i.e. sq)
Exposure presets are the base presets for data collection. To keep it to low dose condition such as 10 electron/Angstrum, measurement of dose is performed and the exposure time is adjusted. If scope or camera parameters are changed during the session, the dose value is no longer valid and should be remeasured.
1. Leginon/Navigation/Toolbar/Stage Locations Send the "empty" position "To scope".
2. Leginon/Presets Manager/Preset Selector> Select a high mag exposure (i.e. "en" or "ef"), confirm that the parameters are what you desire for the experiment, and then send "To Scope" .
3. scope> Expand the beam to at least cover the CCD (> medium circle mark on the viewing screen) and to the size you desire.
4. Leginon/Presets Manager/Preset Selector> If you have changed the size or location of the beam or other preset scope parameters at the scope, you must retrieve
the preset parameter "From scope" first before checking and saving the dose value.
5. Leginon/Presets Manager/Preset Selector> "Acquire dose image" for the selected preset.
6. Leginon/Presets Manager/Dose Image> Check the "Dose" value.
7. Leginon/Presets Manager/Dose Image> If desired dose is known, fill in the value and then click "Match". This will change exposure time to give a close match of
the value entered.
8. Leginon/Presets Manager/Dose Image> If not satisfied with the value, click "No", change the exposure time by editing the preset, and try again (No need to send
the preset "To scope" again for the repeat)
9. If the scope can not give such illumination to satisfy dose, exposure time and area requirement, alignment is required or change of gun lens or spot size is needed.
10. Leginon/Presets Manager> Copy the preset parameter to the other exposure preset.
Exposure presets are the base presets for data collection. To make sure the best correction is applied to them, the correction images should be acquired prior to the experiment at session. Since no correlation is normally done on these images, only one channel is needed. Normalization image might need to be Bright and Dark reference images if a large chunk of region is blocked by a fallen debris.
1. Leginon/Presets Manager> Select a dose measured high mag exposure (i.e. "en" or "ef"), and then send "To Scope".
2. Leginon/Correction/Settings>
3. Leginon/Correction/Settings> Click OK to exit settings.
4. Leginon/Correction/Toolbar> Select "Raw image " from the pull down list of acquisition modes and then click on "Acquire" button next to the selector to view an image that is not corrected.
5. Leginon/Correction/Toolbar> Select "Dark reference" in the acquisition mode selector and then click "Acquire" to acquire the Dark reference image for this particular camera configuration.
6. Leginon/Correction/Toolbar> Select "Bright reference" and repeat the acquisition to obtain the Bright reference.
7. Leginon/Correction/Toolbar> Select "Corrected image" and then "Acquire" to view the corrected image. A corrected image should be free of artifacts and have
smaller standard deviation than the raw image, in general.
8. Leginon/Correction/Toolbar> If there are regions consistently over normalizes the acquired image, either select the region and use the "+" tool to "Add Region to Bad Pixel List", or click on to "Add Extreme Points to Bad Pixel List" one of more times to find the outliers. Right click on a shown bad pixel removes it from the list.
Preset image shift alignment can be done follow the same procedure as the section "Grid preset image shift refinement" but is more efficient using the automated mode as follows.
1. Leginon/Presets Manager> Send one of the exposure preset as the reference (e.g. en) "To Scope"
2. scope> Move the grid to a position on the "align" square, either on a recognizable object or burn a good hole through ice at the center of the CCD as preparation for lower mag preset image shift correction.
3. Leginon/Presets Manager> Click on the tool "Align presets to each other" . The tool automatically select the reference preset that was selected in the Presets Manager mainpanel and choose a preset at closest magnification as the starting aligning preset.
4. Leginon/Presets Manager/Align Presets> Click "Start" to acquire the first image pair.
5. Check, adjust, and save the preset(s) to be aligned.
The left panel displays and navigate by "Stage Position" of the reference preset while the right panel displays and navigate by "Image Shift" of the preset to be aligned
6. Repeat the process if desired.
The setup that requires you to be next to the microscope is completed. Go to the section on MSI Operation You can come back and continue on this section after you have learned how to go through the operation without automated hole finding.
We can use any image that is already loaded into Hole Targeting to adjust these parameters. The values in this node vary so much from grid to grid that the best way to find these parameters is by going through a step-by-step trial-and-error process. To see the final acquisition and focus targets, enable only the Original, acquisition, and focus display selections. Refer to Introduction Chapter on how the various tools behave in the control panel.
The loaded image normally comes from the image acquired through "Square" node when you submit targets on the grid atlas in "Square Targeting" node. You can also do a practice run using the default image comes with Leginon. To load the default image, leave the filename entry blank when you click "Load" in the hole finding settings window for the step "Original". The default values in the node gives an example of reasonable target finding with such a default image.
Setting up Hole Targeting Depends on which MSI flavor you are running:
1. MSI-Edge uses template matching of the edge image
2. MSI-T uses template matching of the original image
3. MSI-Raster creates raster points from a given origin
4. MSI-Tomography does not use automatic target finding. Therefore, it does not requires set up.
Like hole targeting, we can use any image that is already loaded into Exposure Targeting to adjust these parameters. There is also a different default image came with Leginon for your practice.
Setting up Exposure Targeting Depends on which MSI flavor you are running.
1. MSI-Edge uses template matching of the edge image
2. MSI-T uses template matching of the original image
3. MSI-Raster creates raster points from a given origin
4. MSI-Tomography does not use automatic target finding. Therefore, it does not requires set up.
There are two focusers in MSI. "Z Focus" node usually moves stage in Z direction to Eucentric height at lower mags. "Focus" node usually just correct the defocus in the way equivalent to turning the focus adjustment knob on the scope at a higher mag. The defocus measurements in both nodes are based on the same principle of beam-tilt induced image shift. A correlation (normally phase) is used to obtain the image shift. Therefore, it is important to test and preform autofocus measurement at area with recognizable feature that does not move significantly during the defocus measurement.
The test use "Manual_after" focus step in the focus sequence for checking. Two procedures can be used to reach a area for good correlation measurements:
1. Using Simulate Target tool
2. Submitting focus target from Hole Targeting
Note: To use this procedure, there has to be a grid mosaic, and the Hole Targeting should allow user verification of targets
Check the performance of autofocus by the following criteria:
1. During autofocusing:
2. During manual focusing
< MSI Quick-start | Special Operation setup >
< Leginon "Calibrations" Application | Leginon "MSI-T" Application >
Multi-Scale Imaging (MSI) is the back-bone of many Leginon applications. The setup and
calibrations required for an imaging sequence can be understood better when it is compared to
a low dose mode on a typical electron microscope such as FEI Tecnai.
A typical low dose kit contains three modes: Exposure, Focus, and Search
This figure shows the steps of targeting an object for low dose image collection.
First, move the object (gray star) to the center of the viewing screen in Search Mode
(yellow circle). If properly aligned, then Focus at the set offset radius and angles,
and at last acquire final image at the center in Exposure mode (Red square).
Because of the large difference in magnification, it is often necessary to adjust
the image shift of the Search Mode to achieve proper alignment to Exposure mode.
Although not obvious to everyone, the low dose kit does require set up. These
include:
This figure illustrates the consequence of misalignment of image shift of the lower
magnification Search Mode to the Exposure Mode. The yellow circle represents the field of
the view in the search mode, the gray star an object that the user centers as a target for
final exposure (red square). When the image shift in the Search mode is not aligned to the
exposure, the object centered in the field of the view in Search mode is not centered in
the Exposure mode image. Note that in this case, the image shift offset origin of the two
Focus modes (black) is such that it is aligned with Exposure mode.
Leginon separates the function of the low dose kit idea into three parts: defining the
presets, choosing Acquisition/Focus targets, and moving to a target on an image.
The presets in Leginon can be set up like the three modes in the low dose kit with two
exceptions: First, there is only one Focus preset, and second, the focus preset has the
same image shift as the Exposure preset.
Low-Dose-Kit equivalent preset parameters:
Magnification (example): | Preset name: | Image Shift (x,y): |
---|---|---|
550 | Search | Aligned |
100000 | Focus | 0,0* |
50000 | Exposure | 0,0 |
*Focus Preset is also at image shift (0,0) since the target selected for it is
separated from that for Exposure Preset.
Leginon users can select more than one type of targets on a single image. For a
low-dose-kit analog, we can define one or many Acquisition targets (used for acquiring
images at Exposure Preset) on an image acquired in the Search Preset. In addition, we
define one Focus target on the same image (for focusing at Focus Preset, of
course).
Because the focus targets can be selected independently from the those for the final
exposure, the image shift for the Focus preset is (0,0) rather than microns away from the
origin. At its current state, Leginon only focus at one position per low mag Search
image.
When a person operates in low-dose mode, he/she finds a target on the image in the
viewing screen and move the stage according to its relative position to the viewing screen
to reach the target, i.e., center the target on the screen in Search mode. Leginon moves
to the targets using a similar logic. When a target is selected from an image acquired
using the Search Preset in Leginon, in order to acquire a new image in Focus or Exposure
mode at this target, the program move the target relative to the center of the CCD
detector using the knowledge (i.e., calibrations) of the Search Preset at which the old
image is acquired, not that of the Focus or Exposure Preset with which the new image will
be acquired.
This four paneled figure shows how Leginon performs a low-dose kit type of image acquisition
sequence where the focus target (blue) is first moved to the center of the CCD and then
the exposure target(green). Compare this with the one on low dose
kit.
As a consequence, let's say that we decide to move to the target by moving the stage,
we will want the Exposure node to use the following settings: Preset-Exposure; Move
Type-Stage. However, the required stage position matrix calibration is at that of the
Search Preset.
Set up of the presets is therefore not very different from that for the low dose
kit.
For the above imaging sequence, the calibration requirements with manual focusing and
target selection are
Ways of Moving to Targets in Nodes that acquire images inside MSI >
The Navigator node is quite useful because it allows the user to test many of the calibrations that have been completed, such as image shift, beam shift, stage position, modeled stage position, and dose measurements (indirectly). Additionally, Navigator could be used to simply navigate across the grid in the microscope using Leginon calibrations and
acquire images directly. A iterative stage movement requested by Acquisition Node Class is also possible.
Required bindings to use preset instrument configuration set by presets manager:
PresetsManagerNode - (PresetChangedEvent) -> NavigatorNode
Required bindings to use Navigator to move to a target (iteratively) by Aquisition node class:
AcquisitionNode - (MoveToTargetEvent) -> NavigatorNode
A particular calibration, "stage position, image shift, modeled stage position, or beam shift," can be chosen to navigate across the grid (or the current image in Navigator). The "beam shift" calibration will center the beam. While using the "beam shift" TEM parameter option, try to double click towards the center of the beam (that is displayed in the CCD imaging area). The new image will try to center the beam around the point where the mouse was double clicked.
Available calibrations (these calibrations are only available if they have been completed):
Navigation, especially navigation by stage position movement, has error that is larger at larger moving distance. Therefore, the accuracy of the navigation by stage movement can be improved by multiple moves. By specifying the tolerance of the navigation error, Leginon can achieve more accurate navigation. This feature is activated by giving a non-zero value for "Move to within xx m of clicked position" within Navigator for direct click-and-move or from an Acquisition node class that uses Navigator as the mover.
Calibration Error Checking can calculate and display how much error there is between the targets that were selected and how accurate the selected calibration moved to that target.
Save (x, y) stage positions in the Stage Locations section to later revisit the same positions. Keep the From Scope gets X and Y Only check box enabled, otherwise the z will also be recorded (this is most probably not useful for later checking).
Save a new location:
- The new saved location will appear in the Location Selector.
Go to a saved location:
Update / Remove a saved location:
< Mosaic Target Maker | Pixel Size Calibrator >
< Select Linux distribution to use | Where to register and download Leginon >
Leginon not seeing the microscope host
For more discussion, see the Leginon forum thread on network problems .
< Test run operation problems | Troubles with Imaging >
Images can be one of the three status: Normal, Hidden, or Exemplar. Clicking on the hide
button above the displayed image where it is available moves the image from its current
list. In other words, to hide an image from any of the normal preset list, click on "hide"
while display a normal image. This image will now display only if "hidden" is selected from
the preset list. Clicking on "hide" above an image displayed in the hidden list removes it
from the "hidden" list and return it back to the normal list. Images put in the "exemplar"
list will also be shown in the normal list.
The cache system allows faster access to the same image next time.
You can manually define min/max of the display range in absolute number or relative
percentage, as well as in standard deviation unit based on the statistics of the image. The
manually determined values are saved for individual image displayed in the same panel until
the page is closed.
It updates the number of unprocessed queue targets and estimate how much time it will
still take to finish them.
Click on this tool<inlinegraphic
fileref="http://ami.scripps.edu/software/leginon/images/images/deq_bt_off.gif"
format="GIF"/> above a displayed image pops up a window where you can remove targets
derived from that and all its descendent images. In other words. if you have put in the
queue targets from 10 holes, each selected from the same square image, you will delete all
theses targets if you perform queue deletion on the square image. Please use this
carefully.
You can see your custom hole templates saved and used in the past leginon sessions in
the hole template viewer. 2-way viewer gives you a bigger view of the parent images than the
3-way viewer.
The model paramters can be displayed for diagnosis by activating the check box.
The "Mark for deletion" button saves the selected tilt series in the leginon database in
a table that the system administrator can look up and delete from the file server in a later
time.
If you install Appion's processing server programs, the processing tag direct you to its
menu page.
This is used to enter grid information for robot trays.
This is used to create and link the project to a new database ready for Appion usage.
< Updated Applications (All) | New dbemtool Web Tool Features (1.5.1) >
Simple beam shift adjustment to correct unstable beam position in long runs.
Visual aid to coma-tilt alignment. It is used to acquire images of beam tilt
difractogram tableau. The user can then click at the location of the tableau where he/she
considers as the coma-free and therefore adjust the beam tilt. See Node Description Chapter
for details.
Dynamic template finder is developed for tissue section imaging. An initial template is
defined by the user. The subsequent images it receives are then shifted and rotated against
the template to find the best match to the section so that the target selected on the
template can be transferred on to the new image.
Direct entry of grid information to Leginon database to organize the data acquired. The
main use is for simple one-pass grid screening of multiple grids when the robot does not
exist.
Base class for process images of a completed image target list. Mainly used for
development of batch processing of the images acquired such as image stack creation of a
tilt series. An example of its use is in filenames.py.
This class will eventually handle the transformation of an old target to a new one for
reacquisition after shift, tilt, and/or rotation in the grid plane. The current use is to
replace the shift adjustment in Drift Manager. As an option, it can transform targets based
on more than just its parent but all direct ancestors which makes the range of shift it can
handle much larger than the original drift manager implementation.
< pyScope Change | Updated Applications (All) >
< PyScope Changes | New Web Tool Features >
< PyScope Changes | New Web Tool Features >
User login is designed to improve user experience when many users and many experiments are run and processed by Leginon and Appion. When the feature is activated, the user will see only projects belong to them unless he/she belongs to the administrator group. It is not required, but certain steps need to be taken if it is turned on later.
See User_Management
< New User Features > | Bug Fixes >
< New User Features > | Bug Fixes >
See Next chapter on Administration Tools.
See the chapter on Using Project Management Tools.
See the chapter on Start Leginon.
< Installation on the microscope computer | Backup Practices >
< Preferences Setup | Create and Edit Applications >
Leginon does not know if you switch grids and pretend!
< Summary of these applications | Grid Registration >
Focus, Z Focus, tomo Focus and other variation of focus nodes use the same Focus class but with different settings, focus sequence and position in the MSI sequence to achieve different effects. Each need to be optimized for your instrument and usage. The defaults we provide works for us but an understanding of how it works can help you having the smoothest run and getting the best data.
Node Name | Found in Application | Prerequisite | Performance Target |
Z Focus | all MSI | visible area on the grid | grid almost at eucentric height, defocus zero is no more than what Focus node can handle |
Focus | most MSI | grid almost at eucentric height to allow using only defocus to make correction without significant beam shift | defocus zero is reset to within acceptable tolerance for final exposure |
Tomo Focus | MSI-Tomography | grid close to eucentric height, defocus zero is at eucentric height | grid is accurately set at eucentric height |
focus1 image | focus2 image |
At Focus node of your MSI application, you can watch their display. Make sure that the beam has not shifted off the view (an indication of bad Beam Tilt Pivot Point Alignment) and the contrast does not reverse (Objective aperture not centered or too small for the beam tilt applied).
In the same node, you can make it display the correlation by selecting the display panel on the left of the image like this:
The correlation map shown in Leginon has origin (identical image correlation) at top left corner and is wrapped around so that peaks close to all corners means smaller shift than peaks close to the center of the correlation map. In this example, phase correlation is used, and focus2 is shifted from focus1 to the top-left by a distance of about 1/15 of the image. Therefore, we see a peak at bottom-right. and the phase correlation peak is sharp with flat background.
You may notice that the peak is elongated and have modulation around it. This is caused by the coma effect of the beam tilt. The coma effect changes the apparent defocus and astigmation so that the two images are not related only by a shift.
If you turn on also the Peak display, you can determine if the peak finding has correctly identify the maximal peak of the correlation map.
In general, larger beam tilt and smaller pixel size give better accuracy of defocus measurement, and therefore autofocusing result. However, beam tilt coma-effect and the limitation of the objective aperture size, and the stability of the beam shift during the beam tilt process often determines the limit toward this end. On the other end, smaller beam tilt and larger imaging area both in number of pixels and in physical units give larger range of measurable defocus, and hence the range the correction can be made reliably.
For example, if you require an eucentric defocus accuracy of 0.1 micron while being able to handle an starting error of 500 micron. This is unlikely to be achieved in one focus sequence step.
Displacement of image, d, at defocus z as induced by a beam tilt of a is given approximately,
d = Cs * a^3 + z * a
where Cs is the spherical aberration constant. Two different defocus z1 and z2 would therefore see a difference in d as
d1-d2 = (z1-z2) * a
To tell a difference, the pixel size of the image need to be smaller than the displacement (d1-d2). Let's say that the beam tilt is limited by the objective aperture to have a maximal value of 0.01 radian, this means the pixel size to reach the autofocusing accuracy of 0.1 um will be 1 nm. A reliable image shift measurement is limited by other coma-effect and is in about 1/4 of the image from our experience. Therefore, the range of defocus it can handle is 1000 x 0.1 micron = 100 micron if 4kx4k image is used. Unfortunately, image processing of 4kx4k image is too slow still, so you are likely use 1kx1k with binned pixel to be 1 nm. As a result, the range of defocus this can handle is now 250 x 0.1 micron = 25 micron.
An additional consideration is the stability of the optics. If you use only the defocus correction to correct for 300 micron error, the scope alignment is unlikely stay optimal which is why Z Focus node pirmarily does adjustment of z height to move the stage to a range that is close to the eucentric heigh where scope alignment is performed. Furthermore, there are stronger defocus hysteresis if the magnification used in the adjacent focus sequence is very different.
To achieve the example requirement, you will need to do it in two steps if you are using 0.01 radian beam tilt:
If there is strong defocus hysteresis problem, you may add an intermediate autofocus step in either node to reduce the error in the final step.
There are more data than variable when we measure the image shift induced by beam-tilt to determine the defocus. Therefore, as a fitting residual can be calculated from the fit. If the residual is large, it indicates that the peak positions determined from correlating the two beam-tilted images are not reliable.
However, the fit residual is not normalized. Therefore, the value we set as the default limit in the focus step may not work if the preset pixel size and beam tilt values are very different from at NRAMM. The easiest way for find the proper fit residual limit is to perform autofocusing a few times, if the shift peaks as shown in the earlier part of this page looks good but its fit residual exceeds the fit limit you assigned, raise the fit limit in the autofocus step. Give it enough room for error but not to allow anything to get through the threshold because if you let random peaks go through the fit limit, it might want to change defocus by 1 meter when the focusing area is blank.
< MSI Operation | Adding a new focus sequence to a focus node >
Defaults set by Administrator are listed in the chapter regarding Initial MSI application preference setup.
< Raster Generation node set-up | Tips on Operation >
Users may need to pause leginon data collection when filling cryo-stage and cold trap or making adjustment to image or beam shift of a preset or even perform certain microscopy alignment. Pausing is possible when leginon is waiting for user input at target finder level. Alternatively, pausing can be made in any acquisition node with the pause tool.
The pause tool (as well as the abort tool), when clicked, does not interrupt acquisition until the next possible point that is at the end of an acquisition sequence for a target. When the play tool is clicked at a later point of time, leginon should move the stage and image shift to that defined by the next image. Here are some examples of the valid pausing
points.
For those using MSI-type of application, we recommand the following pausing point:
Case 1: Exposure Targets are NOT queuedCase 2: Exposure Targets are queued
See http://ami.scripps.edu/redmine/boards/6/topics/146#message-187
< Do and Do Not in leginon | General operation problems >
In addition to the downloads from our svn repository, there are several other requirements that you will get either from your OS installation source, or from its respective website. The system check in the Leginon package checks your system to see if you already have these requirements.
cd myami/leginon/ python syscheck.py
If python is not installed, this, of course will not run. If you see any lines like "*** Failed...", then you have something missing. Otherwise, everything should result in "OK".
< Download Appion/Leginon Files | Install Leginon Packages >
Pixel Size Calibration allows entry and simple extrapolation of pixel size values for various magnifications. The entry value should be calculated in (m/pixel). Enter pixel size for all the magnifications that will be used. Extrapolation can be used to enter the pixel sizes for magnifications that have not been calibrated at the microscope with a standard specimen, such as catalase crystals.
Preset | magnification |
---|---|
gr | 120 |
sq | 550 |
hl | 5000 |
fc,fa,en,ef | 50000 |
< Calibration without presets | Bright and Dark reference images >
At the moment Pixel Size Calibrator is only for inputting and extrapolating pixel size calibrations of the instrument. Noe real calibration is made. However, the instrument configuration applies as other calibrator nodes.
Required bindings to use preset instrument configuration set by presets manager:
PresetsManagerNode - (PresetChangedEvent) -> BeamTiltCalibratorNode
< Navigator | Presets Manager >
This information is useful if you want to open specific ports between computers with a
firewall in between.
There is no strict port assignment since we could potentially have more than one
Leginon process running on the same linux host talking to different TEM hosts. It is
probably good enough if you only worry about opening up the first few of those ports in
your firewall (maybe 49152 through 49160, or something like that).
See more discussion at Leginon bulletin board thread on Network problem - Leginon not seeing tecnai host.
The five functions can be distributed to five different computers on a network or all on
one single computer (with web server not viewing the images). However, since the latter minimal setup requires the use of the computer
attached to the microscope and digital camera for all functions, it is not advisable.
Processing server of Leginion is a multi-platform software, meaning it can run on both
Microsoft Windows and Linux, although we and others have found that Windows have trouble managing its memory for such a demanding task. MySQL used in the database server is also supported by multiple platforms. This is
not true for the Web server because the custom php-MRC module used in the web viewer only compiles
on linux machines. Therefore, one of the computer not part of the microscope/camera control must be a linux.
The following examples show several arrangements that take advantage of distributed system.
Other combinations are possible, but will basically be variations on one of the following
themes.
See special notes on Using Leginon on a system where the microscope and camera are controlled by different computers if it applies to you.
One or more Windows computers that control the microscope and your digital camera ; 4 Linux computers (one for
each function) (Good for multiple microsopes, users and large-scale acquisition)
This is the set-up at NRAMM. It has the processing server side of Leginon installed on
the Windows computer attached to the microscope and on the Linux computer that is used for
running Leginon. A second Linux machine is dedicated to the database while the web-based
viewer is hosted by another server.
The data storage may be on one of these computers that is accessable by the web and the processing
computers.
See also Minimum_Requirements_and_current_NRAMM_setup
< What is in this Chapter | What Linux distribution should be used? >
To start your own MSI experiment, you must decide what presets you want to use. Presets are used to define scope and camera parameters with which images are acquired.
MSI presets can be customized to your need of data collection. By matching nodes/subnodes in MSI with presets and move types, the behavior of the node is
defined.
For easy reference, preset names in MSI has been standardized at NRAMM although there is no reason they have to be called in the way they are now. They are abbreviated to 2 letter codes to reduce the length of the filenames that contains every preset used in its family history.
Example MSI preset nomenclature:
Preset name: | abbrev for: | in the context of: |
---|---|---|
gr | grid | em grid |
sq | square | em grid square |
hl | hole | quantifoil hole |
fc | focus | focus image to be checked with fft |
fa | focus-auto | automatic focusing |
en | exposure-near | close-to-zero defocus exposure image in a focal pair |
ef | exposure-far | far-from-zero defocus exposure image in a focal pair |
Example MSI preset parameters (based on 120 or 200 kV high tension, 100 um C2 aperture and 100 um objective aperture on a 4k ccd with pixel size at 1.6 angstrom at scope nominal magnification of 50,000x):
Magnification: | Preset name: | Image Shift (x,y): | Dimension: | Binning: | Beam Coverage: | Exposure Time (ms): | Spot Size: | Defocus (m): |
---|---|---|---|---|---|---|---|---|
120 | gr | Aligned | 512 | 8 | max | 20 | 4 | 0.0 |
550 | sq | Aligned | 1024 | 4 | 1x CCD size | 100 | 4 | -2e-3 |
5000 | hl | Aligned | 512 | 8 | 1x CCD | 20 | 4 | -1.5e-4 |
50000 | fc | 0,0 | 512 | 1 | <~ 1x CCD | 300 | 4 | -2e-6 |
50000 | fa | 0,0 | 1024 | 4 | >2x CCD | 50 | 4 | -2e-6 |
50000 | en | 0,0 | 4096 | 1 | 2x CCD | 170 (10e/A^2) | 4 | -1e-6 |
50000 | ef | 0,0 | 4096 | 1 | 2x CCD | 170 (10e/A^2) | 4 | -2e-6 |
The preset parameters in this example are chosen to give the following properties:
In designing your own preset, follow the above properties using a mag that gives the required coverage with your scope, camera, and grid mesh. If you have a 2k or 1k camera, binning may not be as necessary as for a 4k camera whose data acquisition time is 10-30 sec without binning.
Tecnai F20 200 kV high tension, Gun Lens 3 extraction voltage 4300, 50 um C2 aperture and 100 um objective aperture (except when obtaining grid atlas).
Camera is a 4k ccd with pixel size at 1.6 angstrom at scope nominal magnification of 50,000x):
Magnification: | Preset name: | Image Shift (x,y): | Dimension: | Binning: | Beam Coverage: | Exposure Time (ms): | Dose (e/A^2): | Spot Size: | Defocus (m): | C2 (um): |
---|---|---|---|---|---|---|---|---|---|---|
120 | gr | Aligned | 512 | 8 | max | 20 | n/a | 4 | 0.0 | 100 |
1700 | sq | Aligned | 1024 | 4 | 1x CCD size | 10 | n/a | 4 | -2e-4 | 50 |
5000 | hl | Aligned | 1024 | 4 | 1x CCD | 7 | 0.004 | 4 | -1.5e-4 | 50 |
100000 | fc | 0,0 | 512 | 2 | <~ 1x CCD | 200 | 164 | 4 | -2.9e-7 | 50 |
100000 | fa | 0,0 | 1024 | 4 | ~4x CCD | 50 | 2.5 | 4 | -1.5e-6 | 50 |
100000 | en | 0,0 | 4096 | 1 | 1.3 um on the specimen | 407 | 20 | 4 | (-1e-6 to -2e-6) | 50 |
29000 | ed | 0,0 | 3kx4k | 1 | 1.3 um on the specimen | 407 | 20 | 4 | (-1e-6 to -2e-6) | 50 |
If this is the first time calibrations have ever been completed for Leginon, complete all the calibrations listed in the chapter on calibrations. Calibrations are extremely important to operate the TEM in a consistent manner. As long as the calibrations are stable, later users do not need to perform them. Most calibrations are HT and magnification dependent. Therefore, new calibration may be required if your presets use different HT and/or magnification from all previous users.
< Summary of MSI applications | Initial MSI application preferences >
< Trouble shooting | Node Descriptions >
< How to Update from v1.6 (Microscope Windows Computer)
The main difference between MSI-RCT applications and other MSI's is that a low
magnification image is needed for the target transformation algorithm to reliably find
features to match between tilts. Two strategies has be used with success.
The sq preset is set at a magnification in the HM mode so that hysteresis is minimized.
and the hl preset is eliminated The "sq" preset is used both at "Square" and "Centered
Square" nodes.
Presets and Magnification for a typical MSI-RCT
Preset | magnification | defocus (m) |
---|---|---|
gr | 120 | 0 |
sq | 1700 | -2.5e-4 |
fc,fa,en | 50000 | (what you need) |
The sq preset is set at the usual LM magnification. The hl preset is set at the low end
of HM mode. The "sq" preset is at "Square" node and "hl" preset is used at "Centered Square"
nodes.
Presets and Magnification for a typical MSI-RCT
Preset | magnification | defocus (m) |
---|---|---|
gr | 120 | 0 |
sq | 550 | -2e-3 |
hl | 1700 | -2.5e-4 |
fc,fa,en | 50000 | (what you need) |
< RCT node set-up | RCT calibration need >
Configuring the Presets can be critical to many different applications. Presets describe camera configurations such as image size and exposure time as well as many other microscope parameters such as magnification and defocus. Different nodes can use these predefined presets to change conditions of the microscope and CCD.
Required bindings for using preset image shift alignment tool:
Presets Manager - (MoveToTargetEvent) -> NavigatorNode
Required bindings for using presets in any acquisition class (including focuser) of nodes:
AcquisitionNodeAlias - (ChangePresetEvent) -> Presets Manager
Presets Manager - (PresetChangedEvent) -> AcquisitionNodeAlias
Required bindings for nodes that can use preset instrument configuration set by presets manager:
PresetsManagerNode - (PresetChangedEvent) -> Node
Required bindings for auto dose measurement as initiated by MSI-Tomography:
TomographyNode - (MeasureDosePublishEvent) -> MeasureDoseNodeAlias
MeasureDoseNodeAlias - (ChangePresetEvent) -> Presets Manager
- The pause allows the optics to settle between preset changes
- Rather than target to x,y,z,alpha, and beta settings of the goniometer, only x and y axis values are sent. Checking this selection allows eucentric height adjustment at regular interval during a long session.
Hysteresis of image and beam shift is experienced everyday when using the microscope. This general hysteresis affects many Leginon calibrations. Keeping current in the lenses, particularly the objective lens, has been seen to help reduce the effects of this hysteresis. Likewise, stepping through magnifications in a fixed order (low to highest to low to highest etc.) has been empirically helped reducing the hysteresis effects.
It is highly recommended to leave the first two check boxes in this section (Leginon/Presets Manager/Settings) enabled. Cycle Magnification Only should be checked if the hysteresis from changing beam intensity is negligible.
- The presets' cycle Order will be used whenever changing between presets.
- If there are multiple presets with the same magnification in the Cycle Order, only the first preset in the order list or the destined preset will be sent. This helps speed up the cycling time. Use of this option assumes that the main source of hysteresis is change of magnification.
- Other than the case for the final destination preset, only the magnification will be sent to the microscope instead of all the other preset's parameters. All of the destined preset's settings will be sent to the microscope. This option will reduce the cycle time as well. Use of this option also assumes that the main source of hysteresis is change of magnification.
NOTE: To reduce cycling time, it is best to group the presets that often occur consecutively in order. For example, the typical MSI preset order is
[ gr, sq, hl, fc, fa, en, ef ]
This section is used to acquire a "Dose Image" and calculate the electron dose per area on the specimen at the current preset using the averaged intensity of the image and various calibrations. The dose value is then updated in the database for the current preset. To acquire a dose image, no object must obstruct the path of the electron beam.
The dose calculated by this function relies on the camera sensitivity calibration obtained in the Dosecal node as well as the pixel size calibration. The result of the calibration is CCD sensitivity value that converts number of electrons to camera signal count (i.e. intensity).
With both information, the average CCD intensity of the Dose Image acquired through the Presets Manager can be used to calculate the dose in unit of electrons per angstrum. Change of preset scope parameters will reset the dose value.
To align presets by image shift, first a global reference is chosen. The global reference serves two purposes. First as the parking preset that the scope returns to after acquiring images at various mags. Second as the preset for initial alignment. The automatic sequence centered at the magnification of the global reference First it aligns pairs of
magnification towards higher and higher magnification for those at higher magnification than the global reference and then toward lower and lower magnification for those at lower magnification than the global reference.
For each magnification, a preset is automatically chosen to be used in the alignment and is displayed in the window. The left panel displays the reference preset and the right panel displays the preset to be aligned. Navigate on the reference image moves the stage while navigate on the align image moves image shift.
The image shift is saved at each move to the specified preset but not other presets of the same magnification until "continue" is clicked.
To switch to custom alignment between arbitrary presets, change the preset assigned for either panel when the window is first open.
This section may prove to be very useful to troubleshoot calibration problems. Over time, certain calibrations may need to be repeated. This section will display the latest calibrations that were completed for the settings the current preset has and when they were completed.
If a new presets needs to be created. Then after creating the new preset, check this section to see which calibrations the new preset will need to be completed.
Select the instruments available on the scope client
- Pay attention to the binning and offset to ensure the proper actual coverage of the CCD.
An exposure onto film can be done instead of acquiring an image with the CCD. To acquire an image onto film, simply enable the "film" checkbox:
If EFTEM is on, and if "Energe Filtered" is checked, the energy filter will be set to a width of the specified value when the preset is sent to the scope
< Pixel Size Calibrator | Raster Finder >
< File Server Setup Considerations | Web Server Installation >
With increasing number of instrument conflict, a configuration file is now required to
specify the instrument available on a host.
Queuing targets for Exposure node is used when a large number of exposure images need to be acquired and immediate need of evaluation is required only up to intermediate mag of Hole images. One example for such data collection mode is during high throughput single particle data acquisition.
Use the configuration for MSI until queuing is about to be used.
1. /Square/Toolbar/Setup/Wait for a node to process image = yes (as in depth-first MSI).
2. /Hole Targeting/Toolbar/Setup/Queue up targets=no (as in depth-first MSI).
3. /Hole/Toolbar/Setup/Wait for a node to process image = yes or no
yes: Pro-It won't cause problem if you forget to change this when you decide not to use queuing later. Con-Time is wasted while holefinder picks targets. (recommended)
no: Pro-It saves some time by acquiring images while holefinder and YOU are picking targets. Con-If you forget to switch it back on when you decide not to use queue later, many things can go wrong, starting from nodes competing for the microscope
4. /Exposure Targeting/Toolbar/Setup/Queue up targets=yes.
"Declare drift when queue is submitted" is optional but recommended. Use it if accurate targeting is required. The time required to finish target will be longer.
5. /Exposure Targeting/Toolbar/Setup/Declare drift when queue is submitted=yes.
You may leave it off if you do not require acturate targeting (>0.5 um). The time
required to finish target will be longer with the option on.
6. /Z Focus/Focus Sequence/Manual_after Enable=yes (optional but highly recommended because further z height adjustment in Focus node affects only the current hole in queuing mode)
1. Select square targets on grid atlas and submit as usual.
2. One sq image will be acquired and then "Hole Targeting" finds the targets on the sq image.
3. If user verification is turned on in "Hole Targeting", the targets should be submitted using "submit" tool.
4. The Z focus target will be processed first and the grid U-centered at the square.
5. Check if the grid is at U-center height in manual focus window. Note that you won't see nice Thon rings because the preset is "hl"
6. All hl images from the sq images will be acquired while "Exposure Targeting" finds the targets on each hl image if waiting in "Hole" node is off. Note that since the "Hole" node acquires images continuously, both hole finding and acquisition may compete for processing and memory time. If it affects your interaction with the program, just wait for the acquisition to complete.
7. If user verification is turned on in "Exposure Targeting", the targets should be submitted using "submit" tool.
8. You may refresh atlas in "Square Targeting" and repeat the above steps to add more targets to the queue.
9. The Queue is processed only when "Submit Queued Target" icon is clicked.
****Important: You should only do Submit Queued Target when leginon IS DONE acquiring image if there is no waiting on "Hole". Otherwise, the "Hole" and "Exposure" nodes may compete for the microscope and you can have images with the wrong magnification.
Hole and Square acquisitions are paused and aborted as usual.
Once the queue is submitted there are several modes of interruption:
1. If leginon crashes during queue processing, the data queue acquisition can be resumed by "Submit Queued Target" in "Exposure Targeting" node.
2. Queued targets can be paused in "Exposure" node with the "pause" button and is the recommanded pausing point for the liquid nitrogen refill of the side-entry cryo stage.
3. The "Abort" button in "Exposure" node aborts the acquisition of the remaining targets from the same parent "hl" image and proceeds to process targets from next hole in the queue.
4. The "Abort Queue" button in "Exposure" node aborts all remaining targets in the queue.
5. If you want to pause queue processing and switch to depth-first mode temporarily, and then continue the queue processing, do the following:
6. Since the queued targets first reverts to its parent image stage position (including stage Z), you CAN NOT rescue bad U-centric height adjustment once the queue is submitted. You will have to abort the targets from the same square and hope the next square works.
7. You can still change image shift, beam shift, exposure time of the presets during queue processing. Again, pause the queue and first send the problem preset to scope before making adjustment. You are warmed that the current location will be sacrificed during this process if the sample is exposed to the beam during your adjustment.
It is possible to add more targets to the queue even when the queue is still being processed. The reason is that "Submit Queued Target" really only signals that there are new targets updated to the queue that is to be processed.
1. Pause in "Exposure" node with the "pause" button and is the recommended pausing point for the liquid nitrogen refill of the side-entry cryo stage.
2. Go to "Square Targeting" node, submit more square targets.
3. Go to "Hole Targeting" node, submit more hole and z-focus targets as the images come in.
4. Go to "Exposure Targeting", submit to the queue more exposure and focus targets as the images
5. When you have enough targets, click on "Submit Queued Target" icon in "Exposure Targeting".
6. Go back to "Exposure", click on to continue data acquisition.
< Queuing option | Queuing Example 2 - Hole Targeting only >
Queuing in "Hole Targeting" is useful when rare objects can be identified at "sq" preset and a quick survey of the grid is desirable before acquiring images at higher mags. An example for such a situation is for data acquisition of 2D crystals.
1. /Square/Toolbar/Setup/Wait for a node to process image = yes or no
yes: Pro-won't cause problem if you forget to change this when you decide not to use queuing later. Con-time wasted while holefinder is picking targets.
no: Pro-saves some time by acquiring images while holefinder and YOU are picking targets. Con-if you forget to switch it back on when you decide not to use queue later, many things can go wrong, starting from nodes competing for the microscope
2. /Hole Targeting/Toolbar/Setup/Queue up targets=yes.
"Declare drift when queue is submitted" is not necessary because Z focus, which is the first targets for each square parent image will cause a drift declare of its own.
3. /Hole/Toolbar/Setup/Wait for a node to process image = yes (as in MSI depth-first mode).
4. /Exposure Targeting/Toolbar/Setup/Queue up targets=no (as in MSI depth-first mode).
1. Select square targets on grid atlas and submit as usual.
2. All sq images will be acquired while "Hole Targeting" finds the targets on each sq image if waiting in "Square" node is off. Note that since the square node acquires images continuously, both hole finding and acquisition may compete for processing and memory time. If it affects your interaction with the program, just wait for the acquisition to complete.
3. If you have just acquired many (such as 50) sq images in LM mode, the microscope has stayed in LM for a long time. It is advisable to set the instrument to one of the preset in HM mode as soon as the acquisitions are completed and check for possible image shift inconsistency between presets.
4. If user verification is turned on in "Hole Targeting", the targets should be submitted using "submit" tool.
5. The Queue is submitted and processed only when "Submit Queued Target" tool is clicked.
6. Since queuing is not turned on at "Hole" and "Exposure Targeting" in this case, the data acquisition is ordered as in depth-first mode so that the exposure/focus targets on a hole are acquired before the next hole.
7. In case when leginon crashes during queue processing, the data acquisition should be resumed by "Submit Queued Target" in "Hole Targeting" node.
Once the queue is submitted there are several modes of interruption:
1. If leginon crashes during queue processing, the data queue acquisition can be resumed by "Submit Queued Target" in "Hole Targeting" node.
2. Exposure targets are paused and aborted as usual.
3. Queued targets can be paused in "Hole" node with "pause" button and is recommanded for the liquid nitrogen refill of the side-entry cryo stage.
4. The "Abort" button in "Hole" node aborts the acquisition of the remaining targets from the same parent "hl" image and proceeds to process targets from next square in the queue.
5. The "Abort Queue" button in "Hole" node aborts all remaining targets in the queue.
6. If you want to pause queue processing and switch to depth-first mode temporarily, and then continue the queue processing, do the following:
7. Since Z focus is performed as the first target in the queue from individual square and there is no more z reverting for other holes in the square, you can rescue bad U-centric height adjustment during "Hole" and "Exposure" acquisition as in the full depth-first mode.
< Queuing Example 1 - Exposure Targeting | Queuing Example 3 - Both Exposure and Hole Targeting >
MSI-Tomography application is an example of such queuing set up. It is also the useful
when energy filter is used. It is chosen so that the microscope stays at the same presets as
long as possible to obtain all the images so that LM preset sq will not need to be used once
tomography data collection starts.
1. /Square/Toolbar/Setup/Wait for a node to process image = no
The "no" setting saves time by acquiring images while holefinder and YOU are picking targets.
2. /Hole Targeting/Toolbar/Setup/Queue up targets = yes.
3. /Hole Targeting/Toolbar/Setup/Allow user verification of the selected targets=yes, if desired.
4. /Hole/Toolbar/Setup/Wait for a node to process image = no.
5. /Exposure Targeting/Toolbar/Setup/Queue up targets = yes.
6. /Exposure Targeting/Toolbar/Setup/Allow user verification of the selected targets = yes, if desired.
1. Select square targets on grid atlas and submit as usual.
2. All sq images will be acquired while "Hole Targeting" finds the targets on each sq
image since waiting in "Square" node is off. Note that since the square node acquires
images continuously, both hole finding and acquisition may compete for processing and
memory time. If it affects your interaction with the program, just wait for the
acquisition to complete.
3. If you have just acquired many (such as 50) sq images in LM mode, the microscope
has stayed in LM for a long time. It is advisable to set the instrument to one of the
preset in HM mode as soon as the acquisitions are completed and check for possible image
shift inconsistency between presets. If energy filter need to be on for higher
magnification imaging, do so now.
4. If user verification is turned on in "Hole Targeting", the targets should be
submitted using "submit" tool.
5. The Queue is submitted and processed only when "Submit Queued Target" tool is clicked.
6. Repeat the same target selection and submission process at "Exposure Targeting" node.
7. In case when leginon crashes during queue processing, the data acquisition should be resumed by
"Submit Queued Target" in "Exposure Targeting" node first. If nothing happens, it means the queue in that node is empty. In that case, repeat it in "Hole Targeting" to resume.
Once the queue is submitted there are several modes of interruption:
1. If leginon crashes during queue processing, the data queue acquisition can be
resumed by "Submit Queued Target" in first the "Exposure Targeting Q" node, then if
nothing happens, in the "Hole Targeting" node.
2. Queued targets from "Hole Targeting" can be paused in "Hole" node with "pause"
button and is recommanded for the liquid nitrogen refill of the side-entry cryo stage.
3. The "Abort" button
in "Hole" node aborts the acquisition of the remaining targets from the same parent "hl"
image and proceeds to process targets from next square in the queue.
4. The "Abort Queue" button in "Hole" node aborts all remaining targets in the queue.
5. Exposure targets are paused and aborted in a way similar to the queued Hole Targets.
< Queuing Example 2 - Hole Targeting only | Monitor Progress of Queued Targets >
Queuing option puts in a queue the selected targets on multiple images from the same acquisition node. The queue can then processed as a batch. Therefore, targets from multiple squares can be selected before any hole image image is acquired in any grid square. Alternatively, targets from multiple holes of the same square can be selected before any exposure is taken. Because the event bindings are identical in MSI application. Target processing scheme can be switched between the queuing (breadth-first) mode and the depth-first mode at appropriate point.
In queuing mode, the movement of the stage is more complicated as targets in the same subtree are not acquired in close time frame and often need readjustment of targets when it is finally the time to acquire the child image. This is all taken care of by the drift manager by reversing the stage position (including stage z) of the parent image when the first child image is to be acquired after the drift declared event. Users of the queuing mode should know that this frequent interaction with the drift manager makes the time for completing the target list longer but is necessary when targeting accuracy is important.
The other consideration is that if queuing is activated at Hole Targeting node so that a large number of images are acquired in "sq" preset at LM mode in a batch without ever cycling to HM presets, the objective lens may cool down sufficiently that the image alignment is different from during normal acquisition cycle. We recommend that either setting the scope to one of the HM mode, wait for 30 or more minute and recheck the image alignment or processing a smaller batch of "sq" preset each time so that the scope does not operate in LM for extended amount of time. Our experience is that it is better not to activate queuing at Hole Targeting but queue up only at exposure targeting so that the above problem is less likely to occur.
The user should start with the preference and configuration of the nodes in MSI application in the depth-first mode and follow the quick start procedure. Once the function of all nodes are confirmed to be normal, then switch to queuing. There are two possible points for queuing, at Hole Targeting or at Exposure Targeting. The two can be used in any combination with the depth-first mode.
The algorithm for target adjustment can not handle this particular combination.
Configuration of two nodes are affected by each queuing and they should be set in the following order if the two are currently processing data:
1. The option for "Queue up targets" should be selected in the HoleFinder. "Declare drift when queue is submitted" is optional. Use it if accurate targeting is required. The time required to finish target will be longer.
2. The acquisition node that acquires the image on which targets will be selected do not need to wait for HoleFinder node to process the image before next acquisition. This option is deselected in /Tool/Setup/. Leave it on if you are willing to wait for HoleFinder before next image acquisition.
In operation, the behavior of the above two nodes plus the acquisition node after the queuing holefinder are affected.
1. All targets submitted to the above-mentioned acquisition node will be acquired first(Waiting off) rather than one after each target submission (Waiting on). These targets would be considered "done" by Leginon at restart or target refresh.
2. The normal "submit" in the targetfinder only stores the selected targets in the queue rather than proceeding to target processing.
3. Upon "Submit Queue" the queued target list is processed by the next acquisition node in which individual targets can be aborted by the abort button , paused as in MSI, and the whole queue list can be aborted using the abort queue button .
4. The queued target list is in fact a list of lists where targets are grouped by their parent images. At the start of target processing of any unfinished sub-list by an acquisition node, leginon reverts the z stage position to that of the parent and processes rejected targets (i.e., the focus targets) first if the option is on as it is for "Hole" and "Exposure" nodes whether they have been processed previously. The rest of the unfinished acquisition targets are then processed.
5. The targets that generate images in the non-waiting acquisition node is considered done once acquired. Therefore, if Leginon is interrupted and restarted, you can not continue the acquisition and process the queued targets by submiting refreshed targets in "Square Targeting" node as in MSI. Instead, you should resubmit the queue in the corresponding holefinder node. Leginon will find out which targets have not been completed and continue the acquisition.
< Adding a new focus sequence to a focus node | Queuing Example 1 - Exposure Targeting >
Queuing option is also available in MSI Raster (1.1). See description in MSI application and substitute whereever "Hole" node is mentioned with "Sub-Square"
< raster finder nodes set-up | Improving Autofocusing >
Queuing option is also available in MSI-T. See description in MSI application.
It is really a raster generator. It adopted the name because it is a subclass of
TargetFilter that takes in targets and output targets.
Required bindings for recieving targets and publishing targets:
previous Target Finder - (TargetListPublishEvent) -> Raster Filter
Target Filter - (ImageTargetListPublishEvent) -> next Acquisition
Target Filter - (QueuePublishEvent) -> next Acquisition
Required bindings for proper waiting among nodes:
Raster Filter- (TargetListDoneEvent) -> previous Target Finder
next Acquisition - (TargetListDoneEvent) -> Raster Filter
A subclass of TargetFinder
Required bindings for recieving images and publishing targets:
previous Acquisition - (AcquisitionImagePublishEvent) -> Hole Finder
Hole Finder - (ImageTargetListPublishEvent) -> next Acquisition
Hole Finder - (QueuePublishEvent) -> next Acquisition
Required bindings for proper waiting among nodes:
Hole Finder- (ImageProcessDoneEvent) -> previous Acquisition
next Acquisition - (TargetListDoneEvent) -> Hole Finder
< Presets Manager | Raster Filter >
The user should setup the presets and the preference configuration of the nodes in MSI raster application in the way identical to MSI application. Since MSI raster application is used when continuous carbon support is used rather than holey film, the name of the nodes are changed accordingly so that the node "Hole Targeting" in MSI is now "Sub-Square Targeting" and "Hole" is now "Sub-Square". Both "Sub-Square Targeting" and "Exposure Targeting" nodes are now derived from "raster finder" node class and the following set-up apply to both nodes.
Subsquare Targeting/Settings and Exposure Targeting/Settings>
Raster finder works in five steps:
1. It creates raster points on the image defined by the center, the spacing between the points and the angle of the raster axis from the image axis. Number of points defines the number across each raster axis. The total number of raster points are also limited by the image size as no raster point is allowed outside the image.
A symmetric raster has equal spacing and number at both raster axis. If symetric is chosen, only x spacing and number need to be entered.
2. If an image acquired is loaded, it is possible to calculate the best spacing and angle to achieve a desired overlapping image. The calculator uses the preset used in the loaded image and the preset with which the raster images will be collected and their calibrations for the move type the raster targets will be moved by.
3. A polygon can be drawn by the user to limit the raster region that will be considered in the later steps. This is used mostly with tissue section imaging. No limit is imposed if no polygon points are picked on the image.
4. Ice thickness is used to limit the valid raster points to usable region.
5. Target templates are applied to the valid raster points to create the final acquisition and focus targets. The template can be constant, meaning that it is defined relative to the image coordinate. The template can also be convolved with the raster points which will create multiple targets, each defined relative to the coordinate of the valid raster points.
In this example, the acquisition targets are convolved with a relative target at (5,5), the focus target is a constant target at (70,70)
Select a raster arrangement to collect data from by making selections on the first image of a square.
1. Go to Leginon/Sub-Square Targeting> It should display the current square image. If not, following MSI operation instruction on Selecting Squares on Atlas.
2. If the target selection is acceptable, uncheck User Check in Leginon/Sub-Square Targeting/Toolbar/Settings>.
For repeated experiments of the same type of sample and grid on the same scope and presets, Reference Intensity in "Acquistion or Focus Settings/Ice Thickness>" should be the only parameter that requires adjustment from day to day.
3. If the target spacing or orientation is not acceptable, try adjusting the Raster Finder to find holes in the current image of a square.4. If the exposure and focus selection is not acceptable, try adjusting the Raster Finder to pick the correct targets.
5. Click Submit (in Leginon/Sub-Square Targeting/Toolbar> to process the final targets.
6. If the target selection is acceptable, uncheck User Check in Leginon/Sub-Square Targeting/Toolbar/Settings>.
Pick exposure and focus targets on the first hole preset (Sub-Square) image. The aim is normally to image all area on the sub-square image at higher magnification after a fine-focusing procedure.
1. Go to Leginon/Exposure Targeting> It should display the current Sub-Square image
2. Check whether exposure (red cross hair) and focus (blue cross hair) targets were selected correctly (in the correct raster fashion).
3. If the target selection is acceptable, uncheck User Check in Leginon/Exposure Targeting/Toolbar/Settings>.
4. If the target selection is not acceptable, try adjusting the Raster Finder to find holes in the current image of a sub-square.
5. Click Submit in Leginon/Exposure Targeting/Toolbar> to process the targets.
6. If the target selection is acceptable, uncheck User Check in Leginon/Exposure Targeting/Toolbar/Settings>.
< Summary of this application | Queuing Option >
The Raster Generation node belongs to Raster Target Filter Class. It accepts a list of targets and then convolving each with a raster of targets.
The settings can be divided into two functions: First, the raster parameters, and second, an raster parameter calculator. The first can function without the second.
Raster Generation/Settings>
Raster Generation/Settings/Target Raster/Limiting Ellipse>
The algorithm first generate a raster of the above defined spacing and angle, and then use the following parameter to filter the targets whose image touches within the ellipse.
For example, the ellipse in this figure has a axis at 1 raster spacing while b axis is 2 raster spacing with angle of 25 deg. Only the images (assuming 0% overlapping and aligned with the raster axes) acquired by the green targets are accepted. Some approximation was involved in this calculation. You should experiment with your sample.
Raster Generation/Settings/Calculator>
The raster generation settings can be verified with the option activated. If there are uncertainty in the raster spacing and angle, it is worth testing with small rasters and view the results on web image viewers.
If the ellipse does not follow the tissue of interest, manual editing of the raster points can be made with verification activated. Leginon will pause after each raster of targets is made. You can then right click to remove or left click to add targets. Click on Submit button to acquire images of the final target raster or click stop to abort data acquisition of these targets.
< Summary of this application | Other special preference set-up >
RCT stands for Random Conical Tilt. It can also used for Orthogonal Tilt image acquisition. This should be used with Navigator multiple move for best results.
Required bindings to Presets Manager:
RCTNode - (ChangePresetEvent) -> PresetsManagerNode
PresetManagerNode - (PresetChangedEvent) -> RCTNode
Required bindings to a Target Finder:
TargetFinderNode - (ImageTargetListPublishEvent) -> RCTNode
RCTNode - (TargetListDoneEvent) -> TargetFinderNode
Required Bindings with Navigator to allow (iterative) target move correction:
RCTNode - (MoveToTargetEvent) -> NavigatorNodeAlias
Required Bindings for waiting for drift to stop after tilting:
RCTrNode - (DriftMonitorRequestEvent) -> DriftManagerNode
DriftManagerNode - (DriftMonitorResultEvent) -> RCTNode
Required Binding to correct drift from tilting as well as thermal expansion:
RCTNode - (NeedTargetShiftEvent) - > DriftManagerNode
DriftManagerNode-(AcquisitionImageDriftPublishEvent) -> RCTNode
Required Bindings to use drift check image in the node (???):
DriftManagerNode - (AcquisitionImagePublishEvent) -> RCTNode
RCT type of data collection need the normal MSI calibration. In addition, the followings are also required.
< Presets for MSI-RCT applications
The default values in the RCT node may not work for your sample, trials should be made
to optimize the parameters. The good parameters should find hundreds, but not thousands of
features in your untilted image for good results.
1. Presets Manager> send the preset used in "Centered Square" to scope at the center
of a square.
2. RCT/toolbar> Click on the "acquire" button at the far right to acquire a test image
of which the feature finding algorithm will be applied after the acquisition.
3. RCT> Check the result of the numbers of feature found. A few hundred but not
thousands would be a good settings.
4. RCT/Settings> Adjust Min Feature Size (most sensitive) and/or Max Feature Size or
the filters and then repeat 2 and 3 to get better results.
5. Target templates are applied to the valid raster points to create the final
acquisition and focus targets. The template can be constant, meaning that it is defined
relative to the image coordinate. The template can also be convolved with the raster
points which will create multiple targets, each defined relative to the coordinate of
the valid raster points.
< Summary of this application | Presets for MSI-RCT applications >
The graphs found in http://your_host/myamiweb/tomography/ are very useful for trouble shooting.
Figure 1 shows a typical result.
Figure 1
By activate "show model parameters" check box in the viewer, more plots are shown (Figure 2).
Figure 2
phi is the angle between the tilt axis with y-axis. offset is the distance between the tilt axis and the CCD center, z0 is the height difference between eucentric point and the untilted specimen.
To first approximation, if the object tomography application try to track is perfect in xy but off in z ( off eucentric, shown as z0 in the model parameter), the movement of the z-projected object during tilting follows a sine curve. On the other hand, if the object is perfect in z but offset on the xy plane in direction perpendicular to the tilt axis, the movement of the projected object follows a cosine curve, as shown here:
Therefore, the curve below on x-axis which is almost perpendicular to the tilt axis (phi ~ 0) suggests the specimen is 10 um ( = 7 um / sin(45 degrees) ) off in z and the tilt axis passes quite close to the center of the CCD.
Running the application
< Running the application | Fitting the tilt axis model >
The user with username "administrator" is a special user in Leginon/Appion. It belongs to the administrator group with highest level of privileges if the login is enabled at the web server. For legion operation, once the setting preferences in a node that shares the same class and alias are defined by the administrator, all newly created users get these settings when they launch the node until they make changes themselves. This allows a faster setup per database (institute) for the beginners. The web server setup wizard should have guided you to create this user.
If you are the Leginon guru at your institute, you may want to start Leginon as the administrator and modify its node settings once you have figured out the appropriate values at your institute so that you won't have to check and modify them for every new users.
A Leginon?Appion user set in the adminstration tool defines his/her own Leginon preferences once changed from the "adminstrator" user default above. The user profile is also used for the login feature in the web imageviewers and Appion interface. It is important to know that this user is not related to the computer login user. Therefore, Follow the steps outlined in Set up for a new regular user section to register a new user.
Steps involved in the installation >
The user with username "administrator" is a special user in Leginon/Appion. It belongs to the administrator group with highest level of privileges if the login is enabled at the web server. For legion operation, once the setting preferences in a node that shares the same class and alias are defined by the administrator, all newly created users get these settings when they launch the node until they make changes themselves. This allows a faster setup per database (institute) for the beginners. The web server setup wizard should have guided you to create this user.
If you are the Leginon guru at your institute, you may want to start Leginon as the administrator and modify its node settings once you have figured out the appropriate values at your institute so that you won't have to check and modify them for every new users.
A Leginon?Appion user set in the adminstration tool defines his/her own Leginon preferences once changed from the "adminstrator" user default above. The user profile is also used for the login feature in the web imageviewers and Appion interface. It is important to know that this user is not related to the computer login user. Therefore, Follow the steps outlined in Set up for a new regular user section to register a new user.
Division by long-term goal guarantee continuity across users.
If you checked "adjust target for drift" in any node of Acquisition class, it should be
changed to select "one" ancestor. A python script "update16.py" is provided for a complete
update of such setting in all related nodes. If the drift is so large that the different
versions of the parent images can not be correlated, you should change the choice from "one"
to "all" ancestors.
Please follow the preferences suggested in the new <link linkend="Tomo_pref"
MIS-Tomography Preference recommendation</link>.
redux is a library for loading an image, doing some basic processing and generating a viewable image.
Investigating gstreamer as a framework on which to build redux. gstreamer allows plugins called "elements" to be connected together to form a pipeline or graph that does multimedia processing. Here is an example application built using the command line program "gst-launch":
gst-launch filesrc location=example.png ! pngdec ! jpegenc ! filesink location=test.jpg
INTRODUCTION Redux is a utility for running a pipeline of simple image processing routines. The main purpose is to produce display worthy images (JPEG, PNG, etc) from raw MRC images. It includes a caching mechanism to reduce processing time at the expence of disk or memory usage. INSTALL: prerequisites: python2.6 and above, numpy, scipy, pyfilesystem, pyami, numextension Install using "python setup.py install" or just use a local sandbox and just make sure redux is in your pythonpath USING IT: There are two basic ways to use redux. The first is to use it directly as a python package. You import redux and do processing in your python script. The second is to start a redux server, which can be located elsewhere on your network. You then make requests to the server using the client of your choice (python, php, etc.). TRY IT: Run the stand-alone redux script (bin/redux). Without any options or arguments, it will print out a help message. To Do: cache management, clean up old files, etc. server and client config scripts security
For example, to change the class of a target finder node while retaining its bindings, right click on the name of the node (ended with the word "Targeting") and choose property, choose the class you want to replace it with in the pop-up window, and click o.k.
< Use the Application Editor to create Leginon applications | Edit an existing application as an xml file >
How to reload atlas:
This is used if Leginon was stopped and restarted.
1. Leginon/Square Targeting/Mosaic > Enter the size of the mosaic atlas loaded into the image display for better resolution. For example, Scale image to: 2048 for more resolution, 512 for fast loading
2. Leginon/Square Targeting/Tiles > Select the atlas label in "Load tiles from mosaic." The most recent one is the default.
3. Leginon/Square Targeting/Tiles> Click "Load"
Revert Settings is a tool for use with the Leginon image acquisition software.
Leginon settings for the applications are saved in the database during the installation. When a user use Leginon the first time, the settings or the Appion/Leginon administrator user will be loaded. The user can change them and Leginon will remember the new values from then on.
In the case that a user incorrectly modifies Leginon application settings, the user or an administrator may revert all the settings of a specific user to the default values.
Robot node sits between robot controlling program and other Leginon acquisition sequence.
Leginon Robot node communicates with the grid-loading robot controlling program to:
Note: This node works only with NRAMM grid loading robot. You should modify it to suit your robot for the above functions. As long as it has the same event binding to perform the following functions, your custom node can be used with any Leginon acquisition sequence.
For normal MSI application, the user select grids from an existing grid tray in the Robot node first, then the node interacts with an acquisition sequence in the Leginon application to:
Normal MSI application Required bindings:
Robot - (MakeTargetListEvent) -> MosaicTargetMaker
target handler such as Acquisition or TargetFilter - (TargetListDone) -> Robot
Required bindings for 2nd Pass application that re-registrate targets on the specific grid:
Robot - (GridLoadedEvent) -> RobotAtlasTargetFinder
RobotAtlasTargetFinder - (UnloadGridEvent) -> Robot
RobotAtlasTargetFinder - (QueueGridEvent) -> Robot
Additional Requirement: project database with robot grid and tray information.
< RCT | RobotAtlasTargetFinder >
RobotAtlasTargetFinder node display old grid atlas of all grids from the same session, allow targets to be picked or loaded, initiate, readjust the targets according to a reacquired image from the robot-reloaded grid, and publish the new targets for proper imaging in the 2nd pass.
Required bindings with Robot node:
Robot - (GridLoadedEvent) -> RobotAtlasTargetFinder
RobotAtlasTargetFinder - (UnloadGridEvent) -> Robot
RobotAtlasTargetFinder - (QueueGridEvent) -> Robot
Required bindings to publish new targets and wait for them to be done:
RobotAtlasTargetFinder - (ImageTargetListPublishEvent) -> next Acquisition
next Acquisition - (TargetListDoneEvent) -> RobotAtlasTargetFinder
Required bindings to reacquire a image to readjust the targets on the grid:
RobotAtlasTargetFinder - (ChangePresetEvent) -> Presets Manager
Presets Manager - (PresetChangedEvent) -> RobotAtlasTargetFinder
The settings can be divided into two functions: First, the raster parameters, and second, an raster parameter calculator. The first can function without the second.
Raster Generation/Settings>
Raster Generation/Settings/Target Raster/Limiting Ellipse>
The algorithm first generate a raster of the above defined spacing and angle, and then use the following parameter to filter the targets whose image touches within the ellipse.
For example, the ellipse in this figure has a axis at 1 raster spacing while b axis is 2 raster spacing with angle of 25 deg. Only the images (assuming 0% overlapping and aligned with the raster axes) acquired by the green targets are accepted. Some approximation was involved in this calculation. Therefore the results is not exact. You should experiment with your sample.
Raster Generation/Settings/Calculator>
With final targets directly selected from grid atlas, drift management does not function properly. Therefore, all drift managememt functions should be turned off.
Settings/Image Acquisition>
As the last acquisition node, waiting should be turned off and rejected focus targets should be acquired first.
Settings/Image Acquisition>
Robot node uses Robot2 class which commnunicates to the robot controller through database and robot server specific to the avialable grid-loading robot or robots. The grid tray and grids will not appear unless they are registered in the database. For consistent run, Default Z Position in its settings should be set according to the aproximate eucentric height for the holder used.
< Register the grids in the database | 1st Pass application >
< Startup | Advanced Features >
Tomography node saves the images in a different format from other Acquisition nodes. By
default, the flat-field correct CCD counts are multiplied by 10 and converted to signed
16-bit integer before the image is displayed and saved. This makes CCD counts of 3276.8 or
larger overflow to negatives. Other Leginon Acquisition images are saved as float without
manipulation.
To avoid this problem, find out what exposure time corresponds to the fractionated dose
from your tilt angle step and range and total dose and take an image at tomo preset with
such an exposure in Navigation node. You will need to reduce the total dose if a good
fraction of the counts are larger than 3200 even though it would not appear to be saturated
in the float scale without the 10x factor. Alternatively, change the scale factor in
Tomography node.
If "Measure Dose before collection" is checked in Tomography node, the stage will be
moved to the reference target and a dose image of the "tomo" preset will be acquired (center
512x512 of whateven binning of the preset) before each tilt series if the interval between
the series is longer than the limit time set in the settings of Dose Measurement node. The
measured value will then be used to recalculate the proper exposure time for tomography
imaging.
For this function to behave properly, the followings should be done during
operation:
This function applies only to Gatan energy filter EFTEM. If "Align ZLP before
collection" is checked in Tomography node, the stage will be moved to the reference target
and starts the procedure to align zero loss peak before each tilt series if the interval
between the series is longer than the limit time set in the settings of Dose Measurement
node.
For this function to behave properly, the followings should be done during
operation:
The goniometer-tilt-axis-based tracking model developed by Zheng et. al. corrects the
specimen height (z-axis) by a change of defocus using measured shift of feature shifts in
the images (x and y-axes). The tracking in the x and y directions does not involve the use
of such model, but is done by smooth curve fitting or preceding tilts. Therefore, to judge
the adequacy of the model, one should check the resulting defocii of the images in the
series remain unchanged.
On the other hand, the feature tracking in x and y is likely to fail only if the tilting
does not induce a smooth shift of the imaging feature a sudden drop of specimen position at
a particular tilt angle often throws off the smooth curve fitting. It is possible to reduce
such effect by increasing the number of data points included in the smoothing as set in the
model section of the tomography node settings window. Otherwise, the goniometer need to be
serviced.
Tomography Trouble Shooting section covers many of the problems we have encountered.
< Set-up Before Running | Reading the tomography graphs >
Leginon Client is run on the microscope-controlling computer (and the robot controlling computer, if applicable) so that the main Leginon program on the remote computer can launch the necessary node at the right place. For example, in order for the remote computer to get and set microscope parameters, the Instrument node need to be launched on the microscope-controlling computer. Before starting Leginon Client, check that your camera controlling software is set up properly for Leginon interaction:
Exception EAccessViolation in module adaExp.exe at .... Access violation at address xxxx in module 'adaExp.exe'. Read of address xxxx"
Do NOT touch this message box, or leginon client will need restarting.
See Using_Leginon_on_a_system_where_the_microscope_and_camera_are_controlled_by_different_computers.
< Test Network Connection Between Remote and Microscope Computers | Start Leginon at your main working station remotely >
We list our experience and current progress here.
If you have a new computer(s) for your Leginon/Appion installation, we recommend installing CentOS because it is considered to be more stable than other varieties of Linux.
CentOS is the same as Red Hat Enterprise Linux (RHEL), except that it is free and supported by the community.
We have most experience in the installation of the supporting packages on CentOS and this installation guide has specific instruction for the process.
Start at Instructions for installing CentOS on your computer.
Start at Instructions for installing Fedora on your computer
< Possible Computer Set-up Configurations | Network Configuration >
Preset design includes the normal gr, sq, hl, fa, and fc presets as in MSI. "tomo" preset is the preset used to collect the final tomogram. "preview" is set at minimal dose to check the quality of the region before final acquisition. The table here is for FEI Tecnai F30. For F20, your may use standard MSI application presets with the addition of "tomo" and "preview" at the magnification apropriate to your specimen.
Magnification: | Preset name: | Image Shift (x,y): | Dimension: | Binning: | Beam Coverage: | Exposure Time (ms): | Spot Size: | Defocus (m): | Skip when cycling: |
---|---|---|---|---|---|---|---|---|---|
220 | gr | Aligned* | 512 | 8 | max | 25 | 8 | -1e-3 | no** |
480 | sq | Aligned* | 1024 | 4 | 1x CCD size | 125 | 8 | -1.5e-3 | no** |
4500 | hl | Aligned* | 1024 | 4 | 1x CCD | 125 | 8 | -1.2e-5 | no |
34000 | fc | 0,0 | 1024 | 1 | <~ 1x CCD | 500 | 8 | -1e-5 | no |
34000 | fa | 0,0 | 1024 | 4 | <~ 2x CCD | 100 | 8 | -5e-6 | no |
34000 | tomo | 0,0 | 4096 | 1 | >2x CCD | 160 | 8 | -1e-5 | no |
34000 | preview | 0,0 | 1024 | 4 | 2x CCD | 12 (0.25e/A^2) | 8 | -1.2e-5 | no |
*The image shift for these presets need to be aligned against one of the high mag preset such as "fa" or "tomo".
**Protocol from Lu Gan suggest activate "Skip when cycling for these LM presets" after all tomography targets are selected in "Tomography Targeting" node so that these presets are not used any more. The newer protocol by Jian Shi does not do so.
This application has the same calibration requirement as MSI applications, no additional calibration is needed if the same magnification and camera configuration are used. The exception is that the Tomography node uses images acquired in the same node to make the off axis correction in the tilt axis. As the result, the calibration of the move type the Tomography node uses and at the magnification of "tomo" preset is required. Since we normally perform image-shift calibration for all magnifications, it should already be included.
Preset | magnification | calibration type | optional calibration |
---|---|---|---|
tomo | 34000 | image shift matrix | stage position matrix or rotation and scale-only modeled stage position (if using tilt-corrected correlation) |
hl | 4500 | modeled stage position |
Again the calibration is required only once in most cases. See the chapter on calibration for more details.
The default settings loaded at installation should be reasonably good for the first trial. See the section on MSI-Tomography preference settings in the chapter on initial MSI application preference setup.
< Summary of this application | Running the application >
A Leginon user set in the adminstration tool defines his/her own preferences once changed from the "adminstrator" user default above. It is also not related to the computer login user. Therefore, it is is necessary to go through the following steps to set up an existing computer user as a new Leginon user. With login feature activated in myamiweb, this user is also used for logging into the web server to see and process data belong to him/her:
Modify the [user] "Fullname" field in leginon.cfg to correspond to the "firstname"+" "+"lastname" fields in the Leginon Administration User Tools.
< Steps involved in the installation | More about Groups >
A Leginon user set in the adminstration tool defines his/her own preferences once changed from the "adminstrator" user default above. It is also not related to the computer login user. Therefore, it is is necessary to go through the following steps to set up an existing computer user as a new Leginon user. With login feature activated in myamiweb, this user is also used for logging into the web server to see and process data belong to him/her:
Modify the [user] "Fullname" field in leginon.cfg to correspond to the "firstname"+" "+"lastname" fields in the Leginon Administration User Tools.
We are still in the process of adapting the comarray package to work with the FEI Eagle cameras. The pre-packaged comarray EXE installer that we provide here will not work, so you will need to download comarray from our SVN repository and do a manual installation of the python module to your python site-packages. Here is the procedure:
Check out comarray to your local sandbox on a linux system like this:
svn co http://ami.scripps.edu/svn/myami/trunk/comarray
Now browse through the files in your new comarray sandbox. You will find a folder "py2.5". In there you will find a few files including:
__init__.py NumpySafeArraySlow.py NumpySafeArray.pyd NumpySafeArrayTIA.pyd setup.py
Make a new folder C:\Python25\Lib\site-packages\comarray\
Copy "__init__.py" and "NumpySafeArrayTIA.pyd" to the new site-packages/comarray folder.
In the site-packages/comarray folder, rename NumpySafeArrayTIA.pyd to NumpySafeArray.pyd
Hysteresis of image shift at very high mags such as 200 kx can be reduced by setting the following configuration
If the grid is flat and the offset of targets is small enough that it can be corrected in the hole image, we recommend using the Queuing option at Exposure Targeting. The sq preset is still used after Stage Z adjustment to correct the hole targets but will not be used when queued exposure targets are processed.
If the offset of targets is minimal even after stage Z adjustment, set the following to avoid using ancestor images obtained in LM for drift management purpose, queuing or not.
Large image shift can cause sufficient beam tilt that creates problems such as bad autofocus, beam shift, and loss of resolution (but probably only if better than 4 angstrom is needed). Image shift is used in Leginon for targeting exposure because it is much more accurate than a single movement by the specimen goniometer, even after it is modeled for mechanical periodicity.
The accuracy of the stage movement is lower when it moves a long distance. Therefore, using iterative stage movement can improve the targeting, and therefore reduce the amount of image shift required for the final exposure. To use this feature, change the following preference in Hole node (or Subsquare node in MSI-Raster).
It is important to know that in order to check whether the precision is reached, image is taken at the preset at which the target is selected on (in this case, sq preset), so the dose should be kept at minimal. On our microscope 0.2 micron precision can be obtained within 2 to 3 moves.
Hole/Settings/Image Acquisition>
Navigation/Settings/Error Checking and Correction>
A different approach is being developed to minimize image shift while maintaining final targeting accuracy-A combination of stage movement and image shift. This approach can only be used in limited cases such as targets selected for the tomography node or exposure node, and is only experimental in the latter case.
Tomography or Exposure/Settings/Image Acquisition>
The focus sequence in Focus and Z Focus nodes can and should be optimize for specific cases. The activated sequence in the default setting is good for a flat holey grid and is meant for high resolution imaging at 50k x or higher. If accurate defocus is not important, focusing once per grid square may be sufficient, for which all focus sequence in Focus node can be deactivated and the same autofocus step can be added to Z Focus node instead.
There are two methods to determine the defocus automatically : Stage tilt (Equivalent to stage wobbling) and Beam tilt. There are also two possible ways for correcting the defocus measured: Defocus (Equivalent to turning the focusing knob on the scope and reset the defocus) and Stage Z (Moving the stage to the zero defocus height).
The following observations at NRAMM may help you determine what is the best to use:
MSI-Raster Chapter contains an example of an alternative Z Focus node focus sequence for grid that show little contrast at medium magnifications.
< Initial MSI application preferences | MSI Quick-start >
If film is used to collect data with one or more exposure presets, Edit the preset setting in Presets Manager when you are ready to do so. The exposure time of the preset will be applied to film exposure. A warning message will come up when the cassette is exhausted and Leginon paused. You will need to reset the stock number after new film is added.
All targeting and focusing works on tilted specimen with correction made within Leginon automatically.
1. Z adjustment to the defocus allows images acquired from image-shifted targets to exhibit equivalent defocus regardless of location.
Additional stage position matrix calibration is therefore needed for MSI at hl preset magnification where the targets are selected in Hole node.
2. Distortion correction is made to beam-tilted images that are used for autofocusing to boost peak signal.
Rotation centers are therefore needed to be stored at the magnification and HT for fa and hl that are used in Z focus and Focus nodes for autofocusing, respectively. This is stored (and retrieved) in Beam Tilt node of Calibration application. Because rotation center may change from day to day, the correction is made only if the required rotation center is stored under the same session.
****Because of the additional calibrations, this is not recommended for beginners.
< MSI set-up in more details | MSI Operation >
Stage Position matrix calibrations can used to navigate at low magnifications (lower than
~1000x when accuracy of better than 2 um is not required. However, since the Modeled Stage
Position Rotation/Scale calibration also saves such matrix, this calibration is not necessary.
The procedure is provided here for reference.
How does matrix calibration work?
< Beam Shift matrix calibration | Modeled Stage Position calibration >
See Instruction in "Start Leginon" Chapter about Run Leginon Client on the Microscope Computer
See Instruction in "Start Leginon" Chapter about Run Leginon at your main working station
Leginon/Main menu/Application> select "Run...." and choose the application named "Manual", select the microscope/camera hostname for "scope" and the local computer as "main", and then launch the application. See Using_Leginon_on_a_system_where_the_microscope_and_camera_are_controlled_by_different_computers if your camera and microscope are controlled by two computers.
< The Application | Running "Manual" Application >
See Instruction in "Start Leginon" Chapter about Run Leginon Client on the Microscope Computer
See Instruction in "Start Leginon" Chapter about Run Leginon at your main working station
Leginon/Main menu/Application> select "Run...." and choose the application named "Calibrations", select the microscope name as the instrument and the local computer as "main", and then launch the application.
< Grids for Calibration | Creating Presets for the first time >
< Microscope Set-up | Leginon "Manual Application" >
< Run Leginon Client on the Microscope Computer | What is next .
< Start Leginon at your main working station remotely
See Installation Troubleshooting and the Leginon Forum searching for "admin" if you run into problems.
Open a web browser. Go to 'http://yourhost/myamiweb/admin.php'
If the login system is activated, you will have to log in as administrator user.
If you are using installed using the auto-installation script or myamiweb setup wizard, you should have a number of default groups and users already in your database:
Group name | Description | Privilege |
---|---|---|
administrators | may view and modify all groups, users, projects and experiments in the system | All at administration level |
power users | may view and modify anything that is not specifically owned by the default Administrator User | View all but administrate owned |
users | may view and modify project that they own and view experiments that have been shared with the user | Administrate/view only owned projects and view shared experiments |
guests | may view projects owned by the user and experiments shared with the user | View owned projects and shared experiments |
Username | Firstname Lastname Displayed | Group | Description |
---|---|---|---|
administrator | Leginon-Appion Administrator | administrators | Default leginon settings are saved under this user |
anonymous | Public User | guests | If you want to allow public viewing to a project or an experiment, assign it to this user |
A Leginon user set in the adminstration tool defines his/her own preferences once changed from the "adminstrator" user default above. It is also not related to the computer login user. Therefore, it is is necessary to go through the following steps to set up an existing computer user as a new Leginon user. With login feature activated in myamiweb, this user is also used for logging into the web server to see and process data belong to him/her:
Modify the [user] "Fullname" field in leginon.cfg to correspond to the "firstname"+" "+"lastname" fields in the Leginon Administration User Tools.
If you have used auto-installation tool to install, you should have a few applications imported already. These include Calibrations, Manual, and a few flavors of MSI applications.
The most commonly used Leginon applications are included as part of the Leginon download. These XML files are in subdirectory of your Leginon download and installation called "applications". The XML files should be imported either using the web based application import tool. Each application includes "(1.5)" in its name to indicate that it will work with this new version of Leginon. The applications that carry the older version name are compatible with the older Leginon.
To find Leginon installation path on Linux:
>start-leginon.py -v
The rest of this chapter is for references.
Installation instruction: Add a new project for testing installation >
Chapter thread: < Recommandation for setup at a new institute | Set up for a new regular user >
See Installation Troubleshooting and Leginon Forum searching for "admin" if you run into problems.
Open a web browser. Go to 'http://yourhost/myamiweb/admin.php'
If the login system is activated, you will have to log in as administrator user.
Set up for a new regular user shared
A Leginon user set in the adminstration tool defines his/her own preferences once changed from the "adminstrator" user default above. It is also not related to the computer login user. Therefore, it is is necessary to go through the following steps to set up an existing computer user as a new Leginon user. With login feature activated in myamiweb, this user is also used for logging into the web server to see and process data belong to him/her:
Modify the [user] "Fullname" field in leginon.cfg to correspond to the "firstname"+" "+"lastname" fields in the Leginon Administration User Tools.
< Steps involved in the installation | More about Groups >
See the section on Instrument Tool for more details.
The most commonly used Leginon applications are included as part of the Leginon download. These XML files are in subdirectory of your Leginon download and installation called "applications". The XML files should be imported either using the web based application import tool. Each application includes "(1.5)" in its name to indicate that it will work with this new version of Leginon. The applications that carry the older version name are compatible with the older Leginon.
To find Leginon installation path on Linux:
>start-leginon.py -v
Leginon test runs test for tem/ccd controls and network communications. The rest of this chapter is for references.
Some Tietz camera dimensions are slightly larger than a standard size, for example, 2084 x 2084 instead of the standard 2048 x 2048. Some software will have trouble dealing with these dimensions. It is recommended to force the camera to the lower standard size (some multiple of 2^n). Modify the function that gets camera dimension in tietz.py, gatan.py, or tia.py depending on which camera you are using.
def getCameraSize(self): return {'x': 2048, 'y': 2048}
All the MSI applications share the same scheme. They are 5-stage acquisition processes
which include a grid atlas, squares acquisition, holes (called subsquare in MSI-Raster)
acquisition, focusing, and final exposures (Tomography for MSI-Tomography). Target finding at
each stage leads to acquisition at the next stage. Drift management, eucentric height
correction, and autofocusing is also involved. The diagram below shows the flow of control in
MSI. The detailed event bindings involved are for advanced users only and can be found in the
chapter covering creating/editing application at the end of the full manual.
The black arrows show the flow of execution from the node where the arrow starts
on initiation of execution to the node that the arrow is pointed to. The green arrow shows
the control of target shift correction by drift manager. The red,blue, purple, and magenta
frames enclose nodes that processes acquisition, focus, reference and preview targets,
respectively. These nodes set presets through Presets Manager and moved to their targets
using either Presets Manager or Navigation node. The green frames are nodes for drift
management.
The following list is a cursory glance at the steps to run this application:
This chapter has been divided into sections to facilitate everyday usage:
Pre-MSI Set-up: Prior to setting up Leginon for the day, make sure that the presets have been designed and Leginon calibrated for your purpose.
MSI preferences and configuration: The comprehensive MSI preferences and configuration example.
MSI Quick Start checklist: A short check list for users who are familiar with the application and have saved preferences.
MSI set-up in more details: The more complicated MSI Leginon application set-up that should be completed before collecting data.
MSI queuing option: Introduction to the queuing option.
MSI Exposure Target queuing: The setup and operation of queuing mode for large number of exposure targets and/or for avoiding accessing sq presets after initial acquisition and targeting.
MSI Hole Target queuing: The setup and operation of queuing mode recommanded for quick overall survey of rare hole targets in grid squares.
Queuing at both levels: The setup and operation of queuing mode recommanded for more advanced user who will wait for one operation done before proceeding.
MSI Trouble shooting: This trouble shooting section addresses some of the possible challenges a Leginon user may face while using the MSI application.
< Flavors of MSI applications | Pre-MSI Set-up >
MSI-Edge uses a template matching of the Edge image for hole finding both in "Hole Targeting" and "Exposure Targeting".
See the previous chapter for general description of all MSI applications:
Pre-MSI Set-up: Prior to setting up Leginon for the day, make sure that Leginon has been previously set-up (this step is in case the ambitious user decides to proceed to this section for the first time and hasn't gone through all the calibrations...).
MSI preferences and configuration: The comprehensive MSI preferences and configuration example.
MSI Quick Start checklist: A short check list for users who are familiar with the application and have saved preferences.
MSI set-up in more details: The more complicated MSI Leginon application set-up that should be completed before collecting data.
MSI queuing option: Introduction to the queuing option.
Queuing Example 1 - Exposure Targeting: The setup and operation of queuing mode for large number of exposure targets and/or for avoiding accessing sq presets after initial acquisition and targeting.
Queuing Example 2 - Hole Targeting only: The setup and operation of queuing mode recommended for quick overall survey of rare hole targets in grid squares.
Queuing Example 3 - Both Exposure and Hole Targeting: Use this only after you are familiar with the queuing operation.
MSI Trouble shooting: This trouble shooting sections addresses some of the possible challenges a Leginon user may face while using the MSI application.
The Leginon "MSI-raster" application is essentially a duplicate of "MSI-Edge" or "MSI-T" except that the Hold Finder nodes have been replaced by Raster Finder nodes. The raster finder nodes can pick raster targets across an image in order to image negatively stained grids for example. MSI raster is a 5-stage acquisition process which includes a grid atlas, squares acquisition, holes acquisition, focusing, and final exposures. Target finding at each stage leads to acquisition at the next stage. Drift management and autofocusing is also involved. The following list is a cursory glance at the steps to run this application:
Since MSI raster is essentially the same as other MSI, reference "MSI in general" chapter for help on the entire process of setting up and operating MSI raster. The main difference is how to set-up the raster finder nodes.
Pre-MSI Set-up: Prior to setting up Leginon for the day, make sure that Leginon has been previously set-up (this step is in case the ambitious user decides to proceed to this section for the first time and hasn't gone through all the calibrations...).
MSI preference and configuration: The comprehensive MSI preferences and configuration example. The node name change in MSI raster are: "Hole Targeting" -> "Sub-Square Targeting" and "Hole" -> "Sub-Square".
MSI Quick Start checklist: A short check list for users who are familiar with the application and have saved preferences.
MSI set-up in more details: The more complicated MSI Leginon application set-up that should be completed before collecting data.
Queuing option: An option that groups human interaction together by putting the submitted targets from different images at the same level of target finders into a queue and process them later.
Trouble shooting: This trouble shooting sections addresses some of the possible challenges a Leginon user may face.
In this chapter:
Raster Finder nodes set-up: A short guide to set-up the raster finder nodes in the MSI raster Leginon application.
NOTE: The Tietz imaging software (EMMenu) must be turned OFF before Leginon is started. In contrast to this, the Gatan imaging software (Digital Micrograph) must be ON before Leginon is started.
Random conical tilt (RCT) and orthogonal tilt reconstruction (OTR) image acquisition schemes require images pairs taken at two different tilt angles. The two Leginon "MSI-RCT" applications replace the Exposure node with a specialized node that acquire a batch of targets at one tilt and then the other. A feature matching algorithm is used to transform targets from the selected targets on one parent image at one tilt to the other tilt (and more tilts if needed).
The two applications differ in the target finding nodes. Therefore, MSI-RCT is suitable for specimen suspended in regular holes from support film such as Quantifoil and C-flat. MSI-RCT-raster is suitable for specimen lay down on continuous carbon film
See JAHC_finder_nodes_set-up and Raster_finder_nodes_set-up on how to setup automated targetfinders in the two cases.
Reference "MSI in general" chapter for help on the entire process of setting up . The main difference is that the preset used to acquire the parent image of RCT targeting is set at a magnification in the HM mode to give large viewing area and offer the stronger feature contrast needed for the target transformation between tilts.
Pre-MSI Set-up: Prior to setting up Leginon for the day, make sure that Leginon has been previously set-up (this step is in case the ambitious user decides to proceed to this section for the first time and hasn't gone through all the calibrations...).
MSI preference & configuration: The comprehensive MSI preferences and configuration example. The node name change in MSI raster are: "Hole Targeting" -> "Square Centering", "Hole" -> "Centered Square", "Exposure Targeting" -> "RCT Targeting", "Focus" ->"RCT Focus", and "Exposure" ->"RCT".
MSI Quick Start checklist: A short check list for users who are familiar with the application and have saved preferences.
MSI set-up in more details: The more complicated MSI Leginon application set-up that should be completed before collecting data.
Queuing option: "RCT Targeting" node is operated in queuing mode.
Iterative Stage Movement: "RCT" node target centering uses this option.
Trouble shooting: This trouble shooting sections addresses some of the possible challenges a Leginon user may face.
In this chapter:
RCT nodes set-up: A short guide to set-up the raster finder nodes in the MSI raster Leginon application.
NOTE: The Tietz imaging software (EMMenu) must be turned OFF before Leginon is started. In contrast to this, the Gatan imaging software (Digital Micrograph) must be ON before Leginon is started.
The Leginon "MSI T" application uses JAHC Finder (Template Hole Finder) nodes to perform automated hole finding. This hole finder uses a template image of the the hole for correlation. Users should read Multi-Scale Imaging Applications in General chapter and consult this chapter when it comes to Hole Targeting and Exposure Targeting. We have the plan to consolidate the hole finders into one, but not in this version, yet.
Related pages:
Pre-MSI Set-up: Prior to setting up Leginon for the day, make sure that Leginon has been previously set-up (this step is in case the ambitious user decides to proceed to this section for the first time and hasn't gone through all the calibrations...).
MSI preference and configuration: The comprehensive MSI preferences and configuration example.
MSI Quick Start checklist: A short check list for users who are familiar with the application and have saved preferences.
MSI set-up in more details: The more complicated MSI Leginon application set-up that should be completed before collecting data.
Queuing option: An option that groups human interaction together by putting the submitted targets from different images at the same level of target finders into a queue and process them later.
Trouble shooting: This trouble shooting sections addresses some of the possible challenges a Leginon user may face.
In this chapter:
NOTE: JAHC stands for Joel's Amazing Holey Carbon, the experimental holed carbon support that is now sold as C-flat from Protochips Inc. Since it lacks the lips around the hole, this hole finder is especially useful.
The Leginon "MSI-Tomography" application is originally contributed by Christian Soluway
and Grant Jensen at Caltech in collaboration with David Agard and Shawn Zhang at UC San
Francisco. Appion team has made some modification since. The documentation here is edited from
the protocol from Lu Gan and modified to reflect the new changes.
This application uses many of the same calibration as in other MSI applications. The
multiscale targeting and imaging also follows the same principle. Therefore, familiarity to
the latter will help. The following links are the relevant sections in MSI
applications.
MSI Quick Start checklist: A short check list for
users who are familiar with the application and have saved preferences.
MSI set-up in more details: The more complicated
MSI Leginon application set-up that should be completed before collecting data. Ignore the
automatic hole finding set-ups since this application uses user target selection and
queuing.
Queuing option: standard operation mode of
"MSI-Tomography".
Trouble shooting: This trouble shooting
sections addresses some of the possible challenges a Leginon user may face.
"Robot-MSI-Screen" applications are a set of three applications designed for 2D-crystal screening. The screening uses a two-pass approach to reduce screening time on obviously bad trials. A user-interactive evaluation is made between the two automated robotic applications. Please refer to Cheng et. al. (2007) J. Struct. Biology vol.160, 324-331 for detail discussions and timing of the process.
If you don't have a grid insertion robot, you may use this set of application in robot "simulation" mode. However, because human does not repeat placing of the grids on the holder at the same accuracy as the robot, you may have to perform the two passes in tendom of the same grid.
Reference "MSI in general" chapter for help on the entire process of setting up and operation.
Pre-MSI Set-up: Prior to setting up Leginon for the day, make sure that Leginon has been previously set-up (this step is in case the ambitious user decides to proceed to this section for the first time and hasn't gone through all the calibrations...).
Initial_MSI_application_preferences: The comprehensive MSI preferences and configuration example. The data flow for RobotMSI-Screen 1st Pass and 2nd Pass are most similar to MSI-Raster application. The default settings loaded at the time of Leginon installation would make the application unique.
MSI Quick Start checklist: A short check list for users who are familiar with MSI applications.
MSI set-up in more details: The more complicated MSI Leginon application set-up that should be completed before collecting data.
Trouble shooting: This trouble shooting sections addresses some of the possible challenges a Leginon user may face.
"RobotMSI-Section" application is a simplified MSI-Raster with interface to grid-loading robot. Without the robot and project database structure for grid management (not released), this application can still be used with manual grid loading and entry of grid name at appropriate place. A better application "MSI-Section3step" is also available and should be used instead if possible.
Reference "MSI in general" chapter for help on the entire process of setting up and operation. Reference The set up of the Raster Generation node (of RasterTargetFilter Class) is very similar to Raster Finder nodes
Pre-MSI Set-up: Prior to setting up Leginon for the day, make sure that Leginon has been previously set-up (this step is in case the ambitious user decides to proceed to this section for the first time and hasn't gone through all the calibrations...).
MSI preference and configuration: The comprehensive MSI preferences and configuration example. The node name change in RobotMSI-Section are: "Grid Targeting" -> "Grid Targeting Robot" and "Hole" -> "Final Section". Nodes not found in this application are irrelevent for this application.
MSI Quick Start checklist: A short check list for users who are familiar with MSI applications.
MSI set-up in more details: The more complicated MSI Leginon application set-up that should be completed before collecting data.
Trouble shooting: This trouble shooting sections addresses some of the possible challenges a Leginon user may face.
In this chapter:
NOTE: The Tietz imaging software (EMMenu) must be turned OFF before Leginon is started. In contrast to this, the Gatan imaging software (Digital Micrograph) must be ON before Leginon is started.
^ Leginon "RobotMSI-Section" Application | Raster Generation node set-up >
Leginon and its subsystem pyscope uses the property Illumination.RotationCenter in Tecnai/TEM Scripting to set/get beam tilt values. We have noticed that some version of the TEM or Tecnai Scripting defines the function for set/get Ilumination.RotationCenter in units other than the original radians. Known versions with this problem are Tecnai 3.1.1 are Titan 1.0.0. We also know that it is fixed in Tecnai 3.1.2 and Titan 1.0.2 (Thanks to Wim Hagen for the information). Since Leginon need the values in radians, a scale factor need to be assigned. We do not not know which version requires non-default scale factors. Therefore, we recommend that all scopes be checked before using Leginon MSI applications with beam-tilt-based autofocusing.
gold_diffraction = wavelength/0.236e-9
# This scale convert beam tilt readout in radian to # Tecnai or TEM Scripting Illumination.RotationCenter value # Depending on the version, this may be 1.0 or closer to 6 rotation_center_scale = 1.0
A Leginon application is image acquisition process that is built of several smaller
pieces called 'nodes'. An application defines your preferred scheme for how to acquire
images. An application definition includes which nodes to use, how they are connected, and
where they are running (possibly distributed across several machines). These three concepts
of applications (nodes, events, launchers) are described in more detail below. A typical
application involves several stages of image acquisition and image processing. Once an
application is designed, it can be used repeatedly for different sessions. An application
design can be exported for use on other Leginon installations.
A session is defined as an execution from start to finish of a Leginon application. All
data (images, results, etc.) that are created by Leginon is associated with some session.
The first thing a user must do when starting Leginon is create a session, or continue an
existing session.
An instrument is the microscope/camera system used for acquiring data during a
particular session. The facility at which Leginon is installed may have several different
microscopes, each with a unique camera setup. Each system is an instance of an
Instrument.
Nodes are the building blocks of Leginon applications. Nodes are defined for specific
tasks. For instance, an "Acquisition" node is designed to acquire images when it receives
targets from another node, which is typically some type of 'TargetFinder' node. Nodes can
"publish" the data they create. This means they are making their data public for other nodes
to use. The other nodes can "research" to find a specific item of data. Nodes may
communicate with each other by generating "events".
An event is a message sent out from a node to notify other nodes that something of
interest has happened. A common example is to announce that some data has been published.
Another example is to announce that some process has finished. The declaration of which
events are routed between which nodes is part of the application design process.
Manager is the master of all nodes in an application. Its existence is usually
transparent while running a session, but it is responsible for starting up the application
with all its nodes and event bindings. It works behind the scenes to ensure that events are
properly distributed throughout the system.
A Launcher is the parent process for a set of nodes. There is typically one launcher
running on each machine that you intend to have nodes running on. The assignment of which
nodes will be started on a particular launcher is defined as part of the application.
A preset is a piece of data which encapsulates the state of an instrument. At any time,
the current state of an instrument (magnification, image shifts, camera settings, etc) can
be recorded for later use. There is a particular class of Node called the PresetsManager
which maintains a list of presets for the current Leginon session. These presets are used by
other nodes to set the state of the instrument prior to acquiring an image. This allows for
a series of images to be acquired at a consistent state, but possibly different targets (see
below). This is very similar to the "Low Dose" system on many microscopes, which consists of
a few presets like "Search", "Focus", and "Exposure". The Leginon PresetsManager is a more
generalized approach which allows for and unlimited number of presets to be used (like
several search presets at different magnifications, or multiple exposure presets at
different defocus).
A target is a location where an image will be acquired. Targets are often selected from
existing images (using a TargetFinder node). Acquisition nodes are responsible for
interpreting Targets and then acquiring images of them.
< What is the Leginon System? | Graphical User Interface >
On the instrument host of the instrument, a TEM host that uses Tecnai class, for example, you can launch python command line window and try to create an instance of the instrument and then call a function such as getMagnifications in that like this:
import pyscope.registry s = pyscope.registry.getClass('Tecnai')() s.getMagnifications()
< Install Ace2 | Processing Server Installation ^
Exception EAccessViolation in module adaExp.exe at .... Access violation at address xxxx in module 'adaExp.exe'. Read of address xxxx
The best way to close Leginon program is to close the python command window (normally black) that shows up when the Leginon GUI appears since Leginon GUI window on Windows is controlled through the python command window
If you first close the GUI window, the python process is not ended. Therefore, the latter become frozen and you will have to wait for TaskManager to ask you to close the broken process.
Most common problem at this point is that your TEM or CCDCamera does not show up in Leginon for use. It is caused by lack of proper functioning or non-communicating microscope scripting or CCD drivers to Leginon system's python wrapper in pyscope package. See Installation Troubleshooting and pyScope Bulletin Board regarding testing if pyscope is working for more.
If everything goes smoothly, test the network connection as in the next section and then do the same above image acquisition test through from the remote computer.
< Test Leginon with Simulator | Test Network Connection Between Remote and Microscope Computers >
TEM and CCD simulators are created automatically on the computer Leginon program started
at. They are convenient as a way to look around the GUI to try out buttons. The images
"acquired" are just random squares on background. Here we will use them to test the database
connection and storage disk mapping.
Follow the instruction in Manual Application Chapter.
Most problems regarding this test are caused by bad configuration. You should double
check your leginon.cfg, sinedon.cfg, config.php as outlined in
complete installation chapter. See Installation
Troubleshooting, and the Leginon Forum or Web Tools Forum such as the topic " information not saved to db"
for common problems.
If everything goes smoothly, do a test directly on the computer controlling the microscope as in the next section.
Test Leginon on the Computer Controlling the Microscope >
By far the biggest installation problem comes from network connection is block at the microscope computer from the remote computer where the main Leginon program is run. Here is a test to do before trying to start leginon operation at the remote computer. Leginon bulletin board has a thread that has various problems and solutions from users.
C:\Python25\Lib\site-packages\Leginon\
INFO localtransport server created at location {'instance': <localtransport.Server object at 0x40e614cc>} INFO tcptransport server created at location {'hostname': 'myscope', 'port': 49152} INFO <class 'event.SetManagerEvent'> binding added for destination myscope, method <function printData at 0x40e63c34> ACCEPTING CONNECTIONS AT: myscope:49152 hit enter to kill
start-leginon.py -v
remote linux computer/Leginon>test2.py myscope 49152
INFO localtransport server created at location {'instance': <localtransport.Server object at 0x2b08e0d43810>} INFO tcptransport server created at location {'hostname': 'myremote', 'port': 49152} ACCEPTING CONNECTIONS AT: myremote:49152 INFO <class 'event.NodeAvailableEvent'> binding added for destination myremote, method <function printData at 0x2b08e0d51c80> CONNECTING TO: myscope:49154 WARNING localtransport client add failed INFO tcptransport client added INFO server location set to to {'TCP transport': {'hostname': 'myscope', 'port': 49154}} hit enter to kill INFO handling threaded INFO inserted in queue (class NodeAvailableEvent) INFO <class 'event.NodeAvailableEvent'> handling destination defcon1, method <function printData at 0x2b08e0d51c80> REMOTE CLIENT RESPONDED: myscope:49154
If you get the last line "REMOTE CLIENT RESPONDED" with correct hostname and port, the
connection is fine. You can go to next section to test Leginon run on the remote
computer.
You can ignore the following error message print out in test1.py on the microscope PC when you exit it.
tcptransport.TransportError: No route to host
Modify your host file to include the host (Create it if not exist).
/etc/hosts
C:\\WINDOWS\system32\drivers\etc\hosts
C:\\WINNT\system32\drivers\etc\hosts
You can modify it using the "hostname" command.
To confirm what python thinks the hosname is, run the following in python command line:
import socket socket.gethostname()
< Test Leginon on the Computer Controlling the Microscope | Run Leginon Client on the Microscope Computer >
Windows/Start Menu/All Programs/Python2.5/Python (command line)
If the missing module is not installed under one of the Python module search path
found in the syscheck output, it need to be moved.
Windows/Start Menu/All Programs/Python2.5/Python (command line)
For example, if "Tecnai" is missing from the instrument list, try
this:
Python>from pyScope import tecnai Python>myscope = tecnai.Tecnai() Python>myscope.getMagnification()
Why:
first time the TEM is used by leginon and the database, the valid magnification
for the instrument needs to be saved in the database.
Solution: On the scope: Leginon/Instrument> select the microscope to display
parameters and click "Get Magnification" button (The icon is of a calculator) on the
tool bar.
Solution:
Put on your computer more memory and more memory swap space.
Solution:
Let us know if you have one.
Solution:
Double click updatecom.py to run it in the (installed) pyScope folder.
< Administration Tool problems | Network problems >
Manual Application is the simplest application example of leginon. It is designed for users who want direct interaction with the microscope but prefer the convenience of browsing through images with the leginon web-based viewer. The application records CCD images at user's command either using the current microscope setup in normal mode or switching automatically to the exposure mode setup in the low-dose mode. In other words, pressing the "Acquire" tool in the application's manual node is equivalent to hitting the "exposure" button on the microscope except that the image is recorded on CCD rather than on film. This application is still under development, especially regarding its use without the project database, an NRAMM internal database for tracking project information.
The following is a diagram showing control of functions in nodes and the location of them on the two launchers:
The EM node or tab is the node that is running on the microscope computer. This node is responsible for communicating to the microscope, CCD, and Leginon. Without the EM node, Leginon cannot control the microscope.
Required bindings: None
Select TEM to view and sometimes change microscope parameters
enabled = pause for example 2s before acquiring an image (pauses set in acquisition nodes)
The current camera parameters are displayed in Leginon/EM>
Information:
Settings:
Register the Tietz ping callback function. From a command line window:
cd C:\python25\Lib\Site-Packages\pyScope C:\python25\python.exe tietzping.py
Some Tietz camera dimensions are slightly larger than a standard size, for example, 2084 x 2084 instead of the standard 2048 x 2048. Some software will have trouble dealing with these dimensions. It is recommended to force the camera to the lower standard size (some multiple of 2^n). Modify the function that gets camera dimension in tietz.py, gatan.py, or tia.py depending on which camera you are using.
def getCameraSize(self): return {'x': 2048, 'y': 2048}
< Calibrations required on FEI microscopes | Good Alignments Save Time>
< Other special preference set-up | Leginon "RobotMSI-Section" Application ^
The Tomography node is a subclass of Acquisition. This node receives a Published Target List and navigates to each target using the specified Move Type. Then, a series of images at assigned tilt angles are acquired and published to the database. Many of the Algorithms are based on UCSF Tomo. The node can also initiate dose measurement and alignment of zero loss peak for Gatan energy filter.
Be aware that this node multiplies the CCD counts by 10 and converts the values into signed Int16 before it is displayed and saved as MRC file to reduce the file size. Therefore, a CCD count (after binning and flat-field correction) of 3276.8 or higher will overflow.
Required bindings:
TomographyNodeAlias- (ChangePresetEvent) -> PresetsManagerNode
PresetsManagerNode - (PresetChangedEvent) -> TomographyNodeAlias
Bindings with the previous target makers or click target finder:
TargetMakerNodeAlias - (ImageTargetListPublishEvent) -> TomographyNodeAlias
TomographyNodeAlias - (TargetListDoneEvent) -> TargetMakerNodeAlias
Optional Bindings with DriftManager to allow target correction after drift:
TomographyNodeAlias - (NeedTargetShiftEvent) -> DriftManagerNodeAlias
DriftManagerNodeAlias - (AcquisitionImageDriftPublishEvent) -> TomographyNodeAlias
Optional Bindings with another Acqusition subclass (for example, Focuser or Acquisition) that processes target types rejected by Tomography node:
TomographyNodeAlias - (ImageTargetListPublishEvent) -> AnotherAcquisitionSubNodeAlias
AnotherAcquisitionSubNodeAlias - (TargetListDoneEvent) -> TomographyNodeAlias
Optional Bindings to Reference subclass (for example, DoseMeasurement or AlighZLP) that initiates a set process at the reference target position:
TomographyNodeAlias - (DoseMeasurementPublishEvent) -> MeasureDoseNodeAlias
TomographyNodeAlias - (AlignZeroLossPeakPublishEvent) -> AlighZeroLossPeakAlias
The top portion is identical to Acquisition/Settings in an Acquisition node. Only the part related to Tomography is described.
Start at 0 degree and using a negative step cause the node to collect data in the negative angles first.
< RobotAtlasTargetFinder | Transform Manager >
The Transform Manager handles all shift corrections that need to be done after drift is declared. The class will be expand to do transformation other than shift in the future.
By the request of an Acquisition Node, the transform manager reaquires ancestors of the target that requires transformation in order to create the transformed target.
Any acquisition or focuser node that need target correction requires two bindings.
AcquisitionNode or FocuserNode - (TransformTargetEvent) - > TransformManagerNode
TransformManagerNode-(TransformTargetDoneEvent) -> AcquisitionNode orFocuserNode
For TransformManager to change presets, two bindings are needed:
TransformManagerNode - (ChangePresetEvent) -> PresetsManagerNode
PresetsManagerNode -(PresetChangedEvent) -> TransformManagerNode
Commonly Why: Instrument was not selected correctly when Leginon is installed
Solution: Check the parameters of the named instrument in Administration Tool
*Display correlation map in the matrix calibration node during the calibration can help identify the source of the failure.
Observations and Why:
Solutions:
Solutions:
< Troubles with Focusing and Drift Check | Troubles with Tomography >
Commonly Why: Threshold set in focuser/autofocus is significantly smaller than that in drift manager in absolute scale. This is a bug in Leginon to some extend caused by a small movement of the image when the a new state of the beam is set so that the focuser records bigger drift than the drift manager.
Solution: Increase Focuser/Autofocus Drift Threshold and/or increase the wait time between checking drift in Drift Manager.
Still not working: Despike might not work in the corrector
Solution: Consider increasing Despike neighbor size (odd number only) or decreasing despike threshold.
Still not working: You are on a day with a lot of cosmic events that cause the cross correlation fails.
Solution: Finding a way to reduce exposure time might help as it reduces the possibility of cosmic ray hitting the CCD.
Commonly Why:
Solutions:
Commonly Why:
To identify which is the source, observe the image, correlation, and peak during beam tilt autofocusing. Also check in the log the residual value (so called min) of the fitting.
Solutions:
In this case of autofocus failure, objects such as holes change from lighter than matrix to darker as if a dark-field image is collected during the autofocus beam tilts.
Commonly Why:
Solutions:
< Troubles with Targeting | Troubles with Calibrations >
< Network problems | Troubles with Calibrations >
Commonly Why:
Commonly Why:
Commonly Why: You don't have permission to read their image files
Solution:
The person is not around when this happens:
Acquire your own reference images at the camera setting that needs the dark and bright images. However, Leginon always look for the most recent calibration in the database by anyone. Every user will have to do this everytime if the permission problem is not solved.
Commonly Why:
Commonly Why:
If the accuracy of moving stage to eucentric height by the focus sequences in "Z Focus" is still not sufficient. Add another focus step performing the same task as Z_to_Encentric step. Repeating beam-tilt based autofocusing often improve the accuracy unless the calibration is off.
Still not working: You have chosen a target that requires too much image shift for an independent image shift from beam shift. This is necessary when the lower mag targetting is not good either because the preset image shifts are not aligned or the stage position movement is not properly modeled.
Solution: For image shift problem see solution for "Target is consistently off in the same direction and distance". For stage model problem, see "Modeled stage calibration" in setup notes.
Commonly Why:
Solution: Check and correct microscopic alignment error. Preset parameters checking and reset may be necessary after the correction.
Comments: If the problem persist, the original stage matrix calibration may have been performed with a bad alignment. The calibration should be redone with a well-aligned scope in LM mode.
Commonly Why:
Solution: Check and correct microscopic alignment error. Preset parameters checking and reset may be necessary after the correction.
This issue may occur when the shutter is incorrectly configured through Digital Micrograph (the imaging software for the Gatan CCD that resides on the TEM computer) or simply a bad dose calibration or too long an exposure time. To issue these corrections:
This issue may occur when the main screen is left up during very long (such as over 30 sec) ice melting and at high HT. Leginon has a mechanism that put the screen down during ice melting. It is caused by over-saturating the Phosphur layer on the CCD. If you see this effect, the screen may have failed to lower. Please test it by observing the screen movement with simulating target in any focuser node that has ice melt time set not to zero. Report the problem back to the leginon team if you are sure it is not your scope's problem.
< Hardware Troubles | Troubles with Targeting >
Commonly Why: Image shifts in "hl", "sq", or "gr"presets are not aligned with the presets at higher mags. The low mag "sq" preset is especially prone to this problem.
Important: When the targeted image is off, it normally means the image shift of the preset where the target comes from is off. That is, if hole images appear off, it is not the image shift of "hl" preset that needs correcting but that of "sq" preset.
Solution:
Perform Preset Image Shift Alignment
Still not working: You may have an invalid combination of settings such as using Iterative Stage Movement while queuing up targets on the images so obtained.
Solution:
Commonly Why: Camera configuration is different in calibration and now.
Commonly Why: Not well understood but may be related to microscopy alignment and settings such as normalization of lenses. up to 1.5 um error has been observed even with a reasonable calibration. The following solutions only works some times.
Commonly Why: Not well understood but may be related to microscopy image shift causes different physical movement at different magnifications since Leginon uses the image shift calibration at the lower mag where the target comes from to determine the required image shift at the higher mag.
No current solution
Commonly Why:
Solutions
Solution
< Troubles with Imaging | Troubles with Focusing and Drift Check >
Two possible reasons:
Find out how smooth the movement is by comparing the images.
If transition is smooth and linear:
If transition is not smooth nor linear:
Feature tracking in x and y axes is a 2nd order polynomial fit of preceeding data points. The default uses 5 data points. When a sudden jump occurs in the tracking error, it
tend to follow the trend of the last point. If the jump is a temporary clich in the goniometer, this tend to over correct the tracking error and eventually loose track as shown
in Figure 1. A possible fix is to increase the number of data points in the fitting. This can be set in the tomography setting "Smooth n tilts for defocus prediction". 4 in defocus
prediction is equivalent to 5 points (n+1) for xy tracking.
Figure 1
The first image in each tilt group of the tilt series at the "start" angle (normally 0 deg) and the second image at tilt of "step" angle from the "start" angle do not use the
fitted model. It is assumed that the eucentric height judged by stage alpha wobbling in the "Tomo Focus" node gives a stage height that the tracking of feature by such a small tilt
would be good enough. In most cases this is a reasonable assumption. However, we have had experience of goniometer alignment problem where the assumption fails. The symptom is
illustrated in Figure 6 below. Note that the Feature tracking error is displayed as percentage of the image length.
Figure 2
This tilt series was taken with a starting angle of zero and at an image size of < 1 um. As can be seen here, apart from the 2 and minus 2 degree tilts, the tracking error was less
than 2 % of the image. Only the tracking of the feature between 0 and +/- 2 degrees are large. At close to 20 % error, this made the overlap between plus and minus 2 degrees unacceptable and
often cause popular alignment programs to misalign the two half of the series.
The first solution is of course to report it to your microscope service engineer. When we had this problem, many users noticed that it was difficult to adjust stage to eucentric height manually with alpha wobbler. Features jumped while the goniometer changed rotation direction. In addition, different magnitude of tilt range suggests different eucentric heights. It is not easy to fix this, so it might take a while. At the end, a loose screw was found which makes the motor slips when it starts to tilt in one of the direction.
Before the hardware is fixed physically, it is still possible collect tomograms. The model fitting of the overall curve in the above case gave z0 of +5 um through the whole tilt series (Figure not shown). Therefore, by moving the stage up by such an amount after the stage-tilt-based autofocusing can bring us to the correct height for tomography. This can be acheived by saving the "tomo eucentric" focus current to the database, align rotation center for this stage height and focus. Then change the correction type of the "Beam_Tilt_Fine" focusing step to "Stage Z".
The model used in the defocus correction in Leginon tomography node is a very simplified one. There are a few cases when the approach fails. Here are ones that we have encountered:
The microscope goniometer does not move on only the tilt axis. With its complex structure, a common problem is that when the stage is highly tilt, the position slips in the y-direction. This is known as looping. Figure 3 shows an example of this problem.
Figure 3
While the x-axis position shifts monotonically as a stable model should be, the y-axis in the positive tilt direction changes little from 0-30 degrees before it increases rapidly after 30 degrees. Even though the tracking in xy plane is still good, the defocii correction at these higher tilts may no longer be correct if the tilt axis parameters are fitted dynamically. Figure 4 shows the model parameters of the same tilt series where the fitted phi and offset starts to change above 30 degrees even though the tilt axis has not moved according to the shrinking behavior of the images during the tilts. Note that in this particular case the looping problem is still mild so that the over-correction is not very strong. only a small slope change is resulted in z0 prediction. In worst cases, the defocus over-correction is so large that the adjacent images can not correlate properly and even the xy tracking would fail. The spikes around zero tilt is a display data sorting error of the identical starting tilt of the two tilt groups.
Figure 4
Other than asking microscope service engineer to fix the looping, one can find the best fixed model in the series to apply to future tilt data collection. To make the fixed
model permantly saved to the database, follow these steps:
When the holder does not hold the grid tightly, the grid slips to a different position when the first tilt direction ends and the goniometer quickly returns to zero tilt. Leginon is designed to adjust the target before the second tilt group starts. The default setting for this function is to use only the parent image (i.e. one ancestor) where the target comes from as reference. If the slip is larger than the size of the parent image, the adjustment may fail, and a random target would be acquired in the second tilt group.
Starting from Leginon 1.6, the target adjustment can be done with all ancestor images of the target by choosing "all" in the acquisition part of the tomography node setting to adjust target with all ancestors. The node "Target Adjustment" limits the lowest magnification that this target adjustment would go up in ancestry. The default is at 300x so that the presence of the objective aperture does not create difference in the reacquired ancestor image from its original.
The model used in Leginon considers any shift of feature in the image a result of tilt axis not aligning to the center of the detector. With the phi and offset fixed, all errors are accumulated in z0 and results in bad defocus correction. There is no solution to this at the moment.
< Troubles with Calibrations - Troubleshooting
< Frequent Asked Questions | Preferences Setup >
Power spectrum can be automatically calucated from the acquired image and displayed in
its own node to allow easy inspection.
New binding required by Navigation node.
New binding required by Navigation node. Drift management is divided between Drift
Monitor and Target Adjustment. A Preview and a Beam Fixing node are now standard in all MSI
applications
Robot2 class that uses database as midpoint to communicate bettween leginon and the
robot controller replaces Robot class
< New User Features | New Project Web Tool Features >
The updates from v1.1 and v1.2 are not availabe. You will have to first update to v1.3 in
order to update to v1.4 because of a change in database behavior.
Upgrade to Leginon System version 1.6 ^
The changes from v1.3 includes update of all in-house components of Leginon and dbemtools,
mrctools but not the database. A new configuration file (sinedon.cfg) is required. The updated
mrctools and dbemtools installation (required) is now performed through "php devel" so that it
can be customized according to the php version installed on the web server.
Follow the instruction for your specific Linux distribution.
For example, SUSE users can use YaST to install them
Name: | Download site: |
---|---|
NumPy 1.0b5 or higher | http://www.scipy.org |
SciPy 0.5.1 or higher* | http://www.scipy.org ", http://repos.opensuse.org/science":http://repos.opensuse.org/science |
*SciPy may not build properly on some versions of SuSE due to an incompatible LAPACK
package that comes with SuSE. You can get scipy as well as a compatible LAPACK etc. from
http://repos.opensuse.org/science (need to specify your SuSE version and machine
etc.)
You can check whether php devel is installed by
typing
>cd [webdirectory] #/var/www/html in this example >phpize
Follow the instruction for your specific Linux distribution. http://rpmfind.net/linux/RPM/Development_Languages_PHP.html has some
examples.
For example, SUSE users can use YaST to install them
mrctools 1.4 will work better with Leginon 1.4 and 1.5. It is no longer included in
dbemtools and is now installed from php devel directory.
None
None
Upgrade to Leginon System version 16 ^
Follow update instruction for update from v1.5. In addition, clean up leginon and sinedo
configuration as instructed here whether your installation is on Windows or Linux.
Sinedon now have full control of database interaction, therefore, the database
configuration in leginon.cfg is no longer needed.
[Database] host:[your_host] name: <link linkend="db_example_names">dbemdata</link> user: <link linkend="db_example_names">usr_object</link> passwd:
Since Leginon 1.5 release, Sinedon configuration can either be globally configured by
including sinedon.cfg with the sinedon installation or overwriten by users by including the
same-named file in his/her home directory.
See <link linkend="sinedon_cfg">sinedon configuration</link> subsection in Complete
Installation Chapter.
Upgrade to Leginon System version 16 ^
From time to time, we discover critical bugs that users are encouraged to update within the branch (x.x version) that they have checked out. Here is how to update when these situation arrives.
svn info
svn update
RIght-click on the checkout top folder icon to select TotoisSVN Update
cd /_your_myami_svn_checkout_/leginon python setup.py install
cd \_your_myami_svn_checkout_\leginon C:\Python25\python.exe setup.py install
< Version Change Log | Complete Installation >
Upgrade to Leginon System version 2.0 from version 1.6 >
Procedure for upgrading from 1.6 to 2.1 is identical to that to 2.0 Please follow its instruction but substitute for 2.1 where ever version 2.0 is called for.
How to Update from v1.6 (Linux) >
< Upgrade to Leginon System version 2.0 from version 1.6
< Upgrade to Leginon System version 2.1 from version 2.0
< Upgrade from earlier versions to Leginon System version 1.6
You may register grid boxes and grids by projects. This is mainly used with grid handling
robot.
Reload and Edit an existing application >
MSI-SimuTomography application uses the images and parameters saved for a particular tilt series to recreate and display what the algorithm has done during the data collection. It is mainly for spotting problems that was not observed since the users are often away from the computer running the Leginon during data collection.
The application is available in your myami installation under leginon/applications and you can import it following the instruction for Application Import through the web administration tools.
This application does not require the microscope to run and should always run on an existing session since you want to simulate an existing tilt series from an existing session.
start-leginon.py
Leginon/Tomography> click on "Simulated Target" tool to start the simulation. You can repeat the process as many times as you like.
The display layout looks like the tomography node in the actual data collection. You should check:If you find a better set of parameters, try them out on other tilt series in the same session to make sure that they do not cause degradation of tracking performance on them. If there is no problem, you can use the new parameter next time when you acquire tilt series of the similar sample.
< Full Protocol on a F30 with an energy filter | Leginon "MSI-Tomography" Application ^
/ami/sw/bin/betaleginon
If you believe you have found a bug in Leginon, try to find someone in the AMI group to help you. There may be a known solution to your problem. If all else fails, you can revert to using "leginon" instead of "betaleginon". This starts up an older stable version of Leginon, but may be missing some of the latest features.
Leginon
Appion
Newer digital camera often comes with its own Windows PC for faster processing. Leginon can handle this case by having one Leginon Client running on each of the Windows PC. The installation is identical on the two Windows PC except at two places:
When Leginon is used, the separated microscope/camera computers are accounted for by including both hosts in the client list and by opening applications that allow Leginon to put separate Instrument nodes on the two hosts. Therefore:
We only made two-client applications that are more popular in the repository. If you need others made, here is the procedure.
Project database and the php tools called "project" are designed to divide experiment
sessions into related groups. Experiments in each project usually are of the same of similar
specimens or under the same long-term goal. Security can be added to the data of a particular
project although the current release does not include the particular mechanism used at NRAMM.
Please contact us if you need such implementation. The results from different sessions of the
same project may be combined for analysis by Appion.
< Leginon Administration Tools | Installation Troubleshooting >
< An introduction to Leginon | Upgrade Instructions >
/ami/sw/bin/betaleginon
If you believe you have found a bug in Leginon, try to find someone in the AMI group to help you. There may be a known solution to your problem. If all else fails, you can revert to using "leginon" instead of "betaleginon". This starts up an older stable version of Leginon, but may be missing some of the latest features.
Leginon
Appion
Nodes that acquire images at each of the multi-scale mostly belong to a base class called Acquisition and have an icon that looks like a camera. There are many settings related to this main building block with many options for moving the received target to the detector center (targeting, in short).
Targets can be moved to the center of the detector for image acquisition using one of the
following calibrations:
There are two movers to chose from: Presets Manager and Navigation. Presets Manager provides
a simple one trial movement. It assumes that the move calibration is good enough to reach the
target directly. Navigation Node is more flexible, since it can be configured to perform
multiple trials. However, most of multiple movement benefit is only relevant in the case of
Stage Position/Modeled Stage Position move type. It is also not recommended to be used to
acquire images that queued targets will be selected on.
To achieve a movement of defined tolerance, movement by Navigation Node with multiple
trials checks the error of targeting after each trial move. If the error is larger than the
tolerance, the target location is recalculated from the current location, and the targeting
movement repeated. It was noticed that on FEI microscope, the movement error is lower if the
required move is smaller. Therefore this algorithm allows even a badly performed goniometer to
target accurately, at the expanse of multiple exposure in the general area. At low
magnification and highly binned short exposure, this is usually not a problem.
The settings in the Acquisition Class that determines the above tolerance is named
"Navigator Target Tolerance". You can set this setting to 0 which will turn off multiple move
option and perform the move as if it is Presets Manager.
Occasionally, the additional trials do not further reduce the targeting error due to
sluggishness of the goniometer movement. The user may want either to accept this closest
targeting or to abandon the acquisition sequence. The decision often lies in how long the
acquisition sequence is and how likely that such image with lower standard is likely to be
useful. For example, as a target for tomography tilt series, a missed target can translate to
30 min of wasted scope time. However, a slight miss that causes the target not centered but
still in the view is worth data collection effort.
The settings in the Acquisition Class that determines the above abort/proceed tolerance is
named "Navigator Acceptable Tolerance". The "Acceptable Tolerance" should always be larger
than the "Target Tolerance".
In addition, a final image shift can be applied to resulting multiple move location
although in most cases this does not improves the targeting if the targeting error is already
smaller than 1e-7 m.
< Multi-Scale Imaging Concept | Flavors of MSI applications >
The following applies to the computer that will host the web-accessable image viewers and project management tools. This also provides the main user interface for Appion.
< Processing Server Installation | Additional Database Server Setup >
Leginon runs under both the Linux and Microsoft Windows Operating systems. However, the
current php-mrctool can not be installed on Windows which means mrc images can not be viewed
on the web. See the section on Possible Computer Set-up Configurations for details.
The many components for the Leginon system are divided into packages and need to be
installed separately. It has been integrated with several third party software packages that
are necessary for its operation. The installation documentation will describe how to set-up
Leginon and give hints as to how to install and set-up the necessary third-party software.
This documentation is not intended to support the additional, but necessary third-party
software.
There has been interest in installing Leginon under Mac OS X. While this is possible in
theory, we have not been successful in installing a fully functional system. The two main
problems are (1) compilation of php-mrctool from the pre-installed php and (2) wxPython on Mac
is unable to hide bitmap objects which makes Leginon graphical user interface difficult to
use.
See Installation Troubleshooting and the Leginon Forum searching for "install" if you run into problems.
< Four Parts of the Leginon System | Possible Computer Set-up Configurations >
The ice thickness (t), as a first approximation, is proportional to the image contrast where image contrast is defined as the natural log of the ratio of the incident beam intensity (I0) to the transmitted beam intensity (I).
t = k * ln( I0 / I )
where k is known as mean free-mass thickness.
In various holefinders in Leginon, k is assumed to be 1 which makes t in an arbitrary unit. I0 is usually obtained from an empty hole under the same imaging condition, while I is that measured from the interested hole with ice. As demonstrated in our 2006 paper (J. Struct. Biol. v154,p303), k varies with defocus and can be affected by the presence of objective aperture. At high defocus, the relationship between image contrast and the ice thickness can also become non-linear. For practical purpose, it is important to maintain the same defocus when ice thickness of two experiment session is to be compared.
< Why is the first Grid Image Not Numbered 00001?
Abstract
Leginon system includes the python-side programs that are writen in python and c, the
MySQL database and server, and the mainly php-based image and data viewers on a web
server.
The python-side programs provide a modular framework for building applications for TEM
image acquisition and analysis. Nodes can be connected through abstract events in Leginon's
modular architecture design. This gives Leginon the flexibility of application customization
at multiple levels. Because nodes can be launched from different machines, Leginon's
applications can inherently use distributed memory systems.
The MySQL-side database and server keep track of all information (metadata) accompanying
the acquired images efficiently.
The php-side web server and scripts retrieve information from the database and the file
storage system to display both raw information and organized reports.
NRAMM development includes the python-side and the php-side scripts. MySQL side uses
directly the open-source distribution.
The website http://leginon.scripps.edu/
is the central location for leginon information and links.
The Forums are where users and
developers post their questions and answers.
Official bug report and feature request should be entered through this website using the New Issue tab.
http://www.leginon.org/ is the home.
Download Myami 2.1 (contains Appion and Leginon) using one of the following options:
This is a stable supported release available as a tar file.
myami-2.1.3.tar.gz
Unzip with
tar -zxvf myami-2.1.3.tar.gz
This is a stable supported branch from our code repository.
Change directories to the location that you would like to checkout the files to (such as /usr/local) and then execute the following command:
svn co http://ami.scripps.edu/svn/myami/branches/myami-2.1 myami/
This contains features that may still be under development. It is not supported and may not be stable. Use at your own risk.
svn co http://ami.scripps.edu/svn/myami/trunk myami/
< Network Configuration | Database Server Installation >
Each target in the target list an Acquisition node class or subclass receives has a unique number. Grid atlas targets often contains targets that are out of range of the goniometer. These numbers are therefore skipped in the naming.
< How does Leginon Name the Files? | What is the definition of ice thickness in the hole finders? >
This list does not include pyton XML module because it is included in the python
package for window.
Name: | Download site: |
---|---|
Python 2.5* | http://www.python.org |
Python for Windows extension (pywin32) | http://sourceforge.net/projects/pywin32/ |
wxPython 2.5.2.8 or newer | http://www.wxpython.org |
MySQL Python client 1.2 or newer | http://sourceforge.net/projects/mysql-python |
Python Imaging Library (PIL) 1.1.4 or newer | http://www.pythonware.com/products/pil/ |
NumPy 1.0b5 (tested, others may work) | http://www.scipy.org |
SciPy 0.5.1 or newer | http://www.scipy.org |
Tortoise SVN client | http://tortoisesvn.tigris.org |
*Python 2.5 is the only python version that we have compiled numExtension. libCV and
comarray in. Therefore no other python version works for now.
Execute the installer file and follow the directions.
These are the packages you will install with the python installer.
Name: | Purpose: |
---|---|
leginon | modular TEM image acquisition |
pyami | general functions |
sinedon | Leginon/database interaction |
pyscope | microscope control and monitoring |
imageviewer | image viewing for tomography |
Because numextension and libcv requires extra compilers, we have created window
installer for them for python 2.5 and made them available through http://www.leginon.org/.
These are the Leginon v2.0 python 2.5 compiled packages installed through python installer on Windows.
Downloadfile Name | Installed Python Package File | Purpose: |
---|---|---|
NumExtension-1.2.0.win32-py2.5.exe | numextension.pyd | c extension for numerical processing |
libCV-0.2.win32-py2.5.exe | libCV.pyd | small c library of algorithm from computer vision field |
cd Your_Download_Place\Leginon2.0\leginon c:\\python25\python.exe setup.py install
Excute the installer files and follow the instruction.
If you plan to run Leginon directly on the Windows machine, such as in Configuration C, and your data files are served through a Samba server on a Linux machine, you will need to map the network drive. For example, if your Samba server has a hostname your_smbserver, and you have set up a share called [your_share_point] which points to /your_data_path/ and leginon data will be saved under a folder in /your_data_path/leginon/.
Enter shared path in Windows format
as
\\your_smbserver\your_share_point
[Drive Mapping] Z:/your_data_path
[Images] path:/your_data_path/leginon
Follow the instructions in Configure leginon.cfg located in
the section for Linux installation but note the location of the configuration files
follows. In addition, if the storage disk is mapped onto the Windows PC as drive Z, this
mapping should be included in leginon.cfg. See above.
<Python directory>\Lib\site-packages\Leginon\config\leginon.cfg
Example:
C:\Python25\Lib\site-packages\Leginon\config\leginon.cfg
<Home directory>\leginon.cfg
Example:
C:\Documents and Settings\Leginon User\leginon.cfg
C:\Python25\Lib\site-packages\Leginon\config\default.cfg
Sinedon is designed to be able to interact with multiple databases.
Follow instruction in Configure sinedon.cfg in
the section for Linux installation but note the location of the configuration files
follows.
C:\Python25\Lib\site-packages\sinedon\sinedon.cfg
C:\Documents and Settings\your_name>
C:\Python25\Lib\site-packages\sinedon\examples\sinedon.cfg
This instruction applies to Windows XP.
C:\Python25\Lib\site-packages\leginon
C:\Documents and Settings\All Users\Start Menu\Programs\Leginon
TightVNC (http://www.tightvnc.com)
For a good Windows specific instruction for general PHP configuration with MySQL for
Apache 2 in Windows, try http://www.artfulsoftware.com/php_mysql_win.html.
< Web Server Installation | Additional installation on the microscope computer >