Project

General

Profile

Matlab Target Finder » History » Version 1

Amber Herold, 04/23/2010 10:01 AM

1 1 Amber Herold
h1. Matlab Target Finder
2
3
4
5
The Matlabe Target Finder node behaves like other target finding nodes in that it takes
6
images as input and outputs a list of targets. In this case, Leginon sends the image to an
7
externally running Matlab process, which then sends the list of targets back to
8
Leginon.
9
10
11
In order to use the Matlab Target Finder, you must:
12
13
<highlights>
14
<simplelist type="vert">
15
<member> have matlab installed on the machine where the node will run</member>
16
<member> have the pymat python module installed (pymat.sourceforge.net)</member>
17
<member> include the path of libeng.so in the environment variable LD_LIBRARY_PATH. This
18
library is dynamically linked by pymat in order to connect with matlab.</member>
19
</simplelist>
20
</highlights>
21
22
23
24
In addition to the usual target finder settings, this node needs to be configured with the
25
matlab function (.m file) that should be executed on the image. The function should take the
26
image as input in the form of a two dimensional array. The output should be two arrays, one
27
for focus targets and one for acquisition targets. Each is an array of x,y pairs. Here is a
28
simple example where the function generates a constant set of targets for any input image:
29
30
<pre>% example Matlab module for target finding
31
function [acquisition, focus] = example(image)
32
acquisition = [168, 234; 203, 54; 450, 390]
33
focus = [324, 42; 36, 248; 151, 94]</pre>
34
This generates three acquisition targets and three focus targets. Leginon will display
35
the targets on the image and optionally allow the user to edit the targets before submitting
36
them.
37
38
Required bindings for recieving images and publishing targets:
39
40
<highlights>
41
<simplelist type="vert">
42
<member> previous Acquisition - (AcquisitionImagePublishEvent) -> Hole Finder</member>
43
<member> Hole Finder - (ImageTargetListPublishEvent) -> next Acquisition</member>
44
<member> Hole Finder - (QueuePublishEvent) -> next Acquisition</member>
45
</simplelist>
46
</highlights>
47
Required bindings for proper waiting among nodes:
48
49
<highlights>
50
<simplelist type="vert">
51
<member> Hole Finder- (ImageProcessDoneEvent) -> previous Acquisition</member>
52
<member> next Acquisition - (TargetListDoneEvent) -> Hole Finder</member>
53
</simplelist>
54
</highlights>
55
56
57
58
59
h2.  Settings
60
61
62
63
64
65
*  Allow for user verification of picked holes = When enabled, this feature will
66
pause and wait for the user to verify whether the correct exposure and focus targets
67
have been selected after the Hole Finder finished processing the input image.
68
69
70
*  Queue up targets = When enabled, submitting targets do not publish them
71
immediately but to put them in a target list queue.
72
73
74
*  Declare drift when queue submitted= When enabled, the node forces target shift
75
correction when the queue is submitted. Useful when accurate targeting is
76
needed.
77
78
79
*  Matlab Module File = the entry defines the Matlab script file used in the target
80
finder.
81
82
83
84
85
86
87
88
89
90
h2.  Image Control Panel
91
92
93
NOTE: To see the effects of Testing the settings for a particular Hole Finder step in
94
the Image Control Panel, the corresponding Hole Finder step Display must be enabled before
95
using the Test feature in that step's Display Settings.
96
97
98
99
h2.  Image
100
101
102
103
104
h2.  Display
105
106
107
To view the original input image, enable this button.
108
109
110
111
112
113
h2.  Display Settings
114
115
116
117
118
119
*  Test Image: File Entry = Enter the path and name of a MRC image that the
120
Matlab Target Finder can be tested on.
121
122
123
124
125
126
127
128
129
130
131
132
h2.  acquisition
133
134
135
In Matlab target finder, the purpose of the acquisition setting is only for display
136
and user selection.
137
138
139
140
h2.  Display
141
142
143
To view acquisition, the Image Display must be enabled. The acquisition targets
144
that the finder chooses will be shown with a green crosshair.
145
146
147
148
149
150
151
152
h2.  focus
153
154
155
In Matlab target finder, the purpose of the focus setting is only for display and
156
user selection.
157
158
159
160
h2.  Display
161
162
163
To view focus, , the Image Display must be enabled. The focus targets that the
164
finder chooses will be shown with a blue crosshair.