Project

General

Profile

Leginon Developer Guide » History » Version 12

Anchi Cheng, 01/21/2016 12:04 PM

1 1 Jim Pulokas
h1. Leginon Developer Guide
2
3 4 Jim Pulokas
h2. Overview of the code repository
4
5
Over the years, Leginon has grown and divided.  With the addition of the Appion processing pipeline, several components that were once subsystems of Leginon were broken out to be used as a common tool set for both Leginon and Appion.  The top level master package that now contains the entire software suite developed at AMI is called _myami_.  Inside of myami you will find leginon, appion and all of these common packages.  Here is a brief description of the contents of the AMI software repository:
6
7
* *myami* - the complete suite of software
8
** *appion* - the processing pipeline
9
** *comarray* - Python extension to retrieve COM SafeArrays into NumPy arrays (deprecated, see [[Installing comtypes]] instead)
10
** *dbschema* - If you are running your myami system out of a sandbox and frequently pulling changes from the repository, then your database schema is generally kept up to date automaticall.  But most production installations update only between major revisions.  The dbschema directory summarizes all of the database schema updates between revisions, which can be applied in sequence when doing a major jump in revisions.
11 5 Jim Pulokas
** *imageviewer* - this is a newer image viewer widget for wx meant to replace the old ImageViewer widget in the Leginon GUI.  So far only the tomography node uses it.
12 6 Jim Pulokas
** *install* - adds automation to the installation process
13 1 Jim Pulokas
** *leginon* - microscope control and automation
14 6 Jim Pulokas
** *modules* - python extensions that must be compiled
15
*** *libcv* - key point detection and matching
16
*** *numextension* - misc image functions
17
*** *radermacher* - functions for tilt picker, see http://emg.nysbc.org/projects/tiltpicker/wiki/TiltPicker_Installation
18 7 Jim Pulokas
** *myamiweb* - all of the php web server stuff for the the web viewer, appion pipeline, etc.
19
** *programs* - 
20
** *pyami* - miscellaneous pure python modules that are usefull for both leginon and appion
21
** *pyscope* - Python interface to several TEMs and cameras
22
** *redux* - a Python replacement for php_mrc, but also generally useful on its own for image conversions, FFTs, resizing, etc.
23
** *sinedon* - object relational mapping module, so you can use python objects to populate your MySQL database
24 1 Jim Pulokas
25 7 Jim Pulokas
h2. Brief description of the design of Leginon
26 1 Jim Pulokas
27 8 Jim Pulokas
Leginon is a flexible framework for automating your TEM data collection. The flexibility comes from the fact that key tasks are coded into _nodes_, which can then be dynamically assembled into an event driven _application_.  Each node performs a task, and generates events to trigger other nodes to perform their tasks.  In addition to passing events between each other, nodes may also share the data they produce.  For example, an Acquisition node may acquire an image from the instrument, then generate an event to notify another node to process that image.  Another area of flexibility is in how applications may distribute the nodes among several hosts on the network.  Processing could be optimized depending on which nodes are on the instrument host versus which ones are on a more powerful host elsewhere.
28 1 Jim Pulokas
29 7 Jim Pulokas
h2. Adding new features and functionality to Leginon
30 4 Jim Pulokas
31 7 Jim Pulokas
The two most common ways you will be adding a new idea to Leginon:
32 4 Jim Pulokas
33 10 Jim Pulokas
* A small addition to an existing node.  For example, a new parameter to auto focusing would require a new entry box in the GUI and a modification to some underlying function call.
34
* A completely new feature that is different enough to belong in its own node.  For example, a new target finding technique.  See [[Creating a new Leginon node]]
35 7 Jim Pulokas
36
h2. Simulation: when you do not have access to a real TEM and/or camera.
37
38
* You still need the overall infrastructure in place:  myami installed, database created, etc., but at least this can still be an option for a stand-alone laptop that is not even connected to the network.
39
* configure your instruments.cfg file with SimTEM and SimCCDCamera instruments.
40
* Start Leginon and do not connect to any external clients during the session setup wizard
41 12 Anchi Cheng
* Go through calibrations as if they are real microscope and camera.  You can however, [[Fake calibrations for Leginon simulator|fake the values]].
42 7 Jim Pulokas
* Most functionality can be tested, however your images will be simulated and the more advanced target finders may not work so well.
43 3 Anchi Cheng
44
h2. Useful diagonosis scripts
45
46 9 Jim Pulokas
* [[testing pyscope instrument]] functions without Leginon.
47 11 Anchi Cheng
* [[setup simulator with VMware]]