Project

General

Profile

Matlab Target Finder » History » Version 5

Anchi Cheng, 01/03/2011 10:26 AM

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 5 Anchi Cheng
* have the mlabwrap python module installed see http://sourceforge.net/projects/mlabwrap/
9 1 Amber Herold
10 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:
11 1 Amber Herold
12 3 Eric Hou
_example Matlab module for target finding_
13 4 Amber Herold
<pre>
14 1 Amber Herold
function [acquisition, focus] = example(image)
15
acquisition = [168, 234; 203, 54; 450, 390]
16
focus = [324, 42; 36, 248; 151, 94]</pre>
17 4 Amber Herold
</pre>
18 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.
19
20 4 Amber Herold
*Required bindings for receiving images and publishing targets:*
21 1 Amber Herold
22 3 Eric Hou
previous Acquisition - (AcquisitionImagePublishEvent) -> Hole Finder
23
Hole Finder - (ImageTargetListPublishEvent) -> next Acquisition
24
Hole Finder - (QueuePublishEvent) -> next Acquisition
25
26 4 Amber Herold
*Required bindings for proper waiting among nodes:*
27 1 Amber Herold
28 3 Eric Hou
Hole Finder- (ImageProcessDoneEvent) -> previous Acquisition
29
next Acquisition - (TargetListDoneEvent) -> Hole Finder
30 1 Amber Herold
31
h2.  Settings
32
33 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.
34 1 Amber Herold
35 3 Eric Hou
*  Queue up targets = When enabled, submitting targets do not publish them immediately but to put them in a target list queue.
36 1 Amber Herold
37 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.
38 1 Amber Herold
39 3 Eric Hou
*  Matlab Module File = the entry defines the Matlab script file used in the target finder.
40 1 Amber Herold
41
h2.  Image Control Panel
42
43 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.
44 1 Amber Herold
45
h2.  Image
46
47 3 Eric Hou
h3.  Display
48 1 Amber Herold
49
To view the original input image, enable this button.
50
51 3 Eric Hou
h3.  Display Settings
52 1 Amber Herold
53 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.
54 1 Amber Herold
55
h2.  acquisition
56
57 3 Eric Hou
In Matlab target finder, the purpose of the acquisition setting is only for display and user selection.
58 1 Amber Herold
59 3 Eric Hou
h3.  Display
60 1 Amber Herold
61 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.
62 1 Amber Herold
63
h2.  focus
64
65 3 Eric Hou
In Matlab target finder, the purpose of the focus setting is only for display and user selection.
66 1 Amber Herold
67 3 Eric Hou
h3.  Display
68 2 Amber Herold
69 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.
70 2 Amber Herold
71
______
72
73
[[Manual Acquisition|< Manual Acquisition]] | [[Matrix Calibrator|Matrix Calibrator >]]
74
75
______