Matlab Target Finder » History » Version 4
Amber Herold, 06/25/2010 12:33 PM
1 | 1 | Amber Herold | h1. Matlab Target Finder |
---|---|---|---|
2 | |||
3 | 3 | Eric Hou | 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. |
4 | 1 | Amber Herold | |
5 | In order to use the Matlab Target Finder, you must: |
||
6 | |||
7 | 4 | Amber Herold | * have matlab installed on the machine where the node will run |
8 | * have the pymat python module installed (pymat.sourceforge.net) |
||
9 | * include the path of libeng.so in the environment variable LD_LIBRARY_PATH. This library is dynamically linked by pymat in order to connect with matlab. |
||
10 | 1 | Amber Herold | |
11 | 3 | Eric Hou | 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: |
12 | 1 | Amber Herold | |
13 | 3 | Eric Hou | _example Matlab module for target finding_ |
14 | 4 | Amber Herold | <pre> |
15 | 1 | Amber Herold | function [acquisition, focus] = example(image) |
16 | acquisition = [168, 234; 203, 54; 450, 390] |
||
17 | focus = [324, 42; 36, 248; 151, 94]</pre> |
||
18 | 4 | Amber Herold | </pre> |
19 | 3 | Eric Hou | This generates three acquisition targets and three focus targets. Leginon will display the targets on the image and optionally allow the user to edit the targets before submitting them. |
20 | |||
21 | 4 | Amber Herold | *Required bindings for receiving images and publishing targets:* |
22 | 1 | Amber Herold | |
23 | 3 | Eric Hou | previous Acquisition - (AcquisitionImagePublishEvent) -> Hole Finder |
24 | Hole Finder - (ImageTargetListPublishEvent) -> next Acquisition |
||
25 | Hole Finder - (QueuePublishEvent) -> next Acquisition |
||
26 | |||
27 | 4 | Amber Herold | *Required bindings for proper waiting among nodes:* |
28 | 1 | Amber Herold | |
29 | 3 | Eric Hou | Hole Finder- (ImageProcessDoneEvent) -> previous Acquisition |
30 | next Acquisition - (TargetListDoneEvent) -> Hole Finder |
||
31 | 1 | Amber Herold | |
32 | h2. Settings |
||
33 | |||
34 | 3 | Eric Hou | * Allow for user verification of picked holes = When enabled, this feature will pause and wait for the user to verify whether the correct exposure and focus targets have been selected after the Hole Finder finished processing the input image. |
35 | 1 | Amber Herold | |
36 | 3 | Eric Hou | * Queue up targets = When enabled, submitting targets do not publish them immediately but to put them in a target list queue. |
37 | 1 | Amber Herold | |
38 | 3 | Eric Hou | * Declare drift when queue submitted= When enabled, the node forces target shift correction when the queue is submitted. Useful when accurate targeting is needed. |
39 | 1 | Amber Herold | |
40 | 3 | Eric Hou | * Matlab Module File = the entry defines the Matlab script file used in the target finder. |
41 | 1 | Amber Herold | |
42 | h2. Image Control Panel |
||
43 | |||
44 | 3 | Eric Hou | 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. |
45 | 1 | Amber Herold | |
46 | h2. Image |
||
47 | |||
48 | 3 | Eric Hou | h3. Display |
49 | 1 | Amber Herold | |
50 | To view the original input image, enable this button. |
||
51 | |||
52 | 3 | Eric Hou | h3. Display Settings |
53 | 1 | Amber Herold | |
54 | 3 | Eric Hou | * Test Image: File Entry = Enter the path and name of a MRC image that the Matlab Target Finder can be tested on. |
55 | 1 | Amber Herold | |
56 | h2. acquisition |
||
57 | |||
58 | 3 | Eric Hou | In Matlab target finder, the purpose of the acquisition setting is only for display and user selection. |
59 | 1 | Amber Herold | |
60 | 3 | Eric Hou | h3. Display |
61 | 1 | Amber Herold | |
62 | 3 | Eric Hou | To view acquisition, the Image Display must be enabled. The acquisition targets that the finder chooses will be shown with a green crosshair. |
63 | 1 | Amber Herold | |
64 | h2. focus |
||
65 | |||
66 | 3 | Eric Hou | In Matlab target finder, the purpose of the focus setting is only for display and user selection. |
67 | 1 | Amber Herold | |
68 | 3 | Eric Hou | h3. Display |
69 | 2 | Amber Herold | |
70 | 3 | Eric Hou | To view focus, , the Image Display must be enabled. The focus targets that the finder chooses will be shown with a blue crosshair. |
71 | 2 | Amber Herold | |
72 | ______ |
||
73 | |||
74 | [[Manual Acquisition|< Manual Acquisition]] | [[Matrix Calibrator|Matrix Calibrator >]] |
||
75 | |||
76 | ______ |