Project

General

Profile

TiltPicker Installation » History » Version 3

Amber Herold, 02/01/2011 04:00 PM

1 1 Amber Herold
h1. TiltPicker Installation
2
3
Installation steps:
4
5
 * Install python packages
6
 * Compile python modules
7
 * Run it
8
9 2 Amber Herold
___
10 1 Amber Herold
11 2 Amber Herold
h2. Install required python packages
12 1 Amber Herold
13 3 Amber Herold
h3. The following python pacakges must be installed and working 
14 1 Amber Herold
15
 * numpy, http://numpy.scipy.org
16
 * scipy, http://scipy.org
17
 * wxPython, http://www.wxpython.org
18
 * python imaging library (PIL), http://www.pythonware.com/products/pil
19
20 3 Amber Herold
h3. Installing on popular distros 
21 2 Amber Herold
22 3 Amber Herold
h4. Fedora
23
24 1 Amber Herold
all 4 modules are available through yum
25
26
Optional: you will also need to install 'python-setuptools-devel' to compile the radermacher and numextension modules (detailed below)
27
28 3 Amber Herold
h4. Ubuntu 
29
30 1 Amber Herold
all 4 modules are available through apt-get or synaptic
31
32 3 Amber Herold
h4. SUSE 
33
34 1 Amber Herold
modules can be downloaded from, http://download.opensuse.org/repositories/science
35
36 3 Amber Herold
h4. MacOS X 10.4 (Tiger) 
37
38 1 Amber Herold
For a full unix experience, install either fink (http://fink.sf.net) or macports (http://www.macports.org). 
39 2 Amber Herold
Alternatively, you could install MacPython.
40 1 Amber Herold
41 3 Amber Herold
h4. MacOS X 10.5 (Leopard) 
42
43 1 Amber Herold
wxPython and numpy are installed by default you just need to install PIL and scipy, see PIL & scipy websites (above) or fink/macports (above)
44
45 3 Amber Herold
h4. RHEL5 / CentOS 5
46
47 2 Amber Herold
Compatible packages are available in Extra Packages for Enterprise Linux (EPEL)
48 1 Amber Herold
* http://fedoraproject.org/wiki/EPEL
49 2 Amber Herold
* contains a wealth of packages required for appion
50 1 Amber Herold
51
Download repository rpm and install
52 2 Amber Herold
<pre>
53 1 Amber Herold
$ sudo rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/`uname -i`/epel-release-5-3.noarch.rpm
54
$ sudo yum install -y wxPython numpy scipy python-imaging python-tools python-devel
55 2 Amber Herold
</pre>
56
57 3 Amber Herold
h4. Microsoft Windows 
58 2 Amber Herold
59
# Install the FULL edition of python(x,y): http://www.pythonxy.com/download.php
60
# Expand tiltpicker.tgz (e.g. with 7zip) http://www.7-zip.org/download.html
61 1 Amber Herold
# Start "IPython(wxPython)" interactive console by clicking on the GREEN "C:>" icon
62 2 Amber Herold
# Change directory to the tiltpicker source
63
# <pre> cd modules\radermacher </pre>
64
# <pre> python setup.py build -c mingw32 </pre>
65
# <pre> copy build\lib.win32-2.5 ..\.. </pre>
66
# <pre> cd ..\.. </pre>
67
# <pre> ApTiltPicker.py -l rawu049b.jpg -r rawu048b.jpg -t 50.0 </pre>
68 1 Amber Herold
69
Thanks to Matthias Wolf for this.
70
71 3 Amber Herold
h3. Test to see if these modules work open a python shell 
72 1 Amber Herold
73 2 Amber Herold
<pre>
74 1 Amber Herold
# python
75 2 Amber Herold
</pre>
76 1 Amber Herold
77
and import the modules:
78
79 2 Amber Herold
<pre>
80 1 Amber Herold
>>> import wx     #wxPython
81
>>> import Image  #python imaging
82
>>> import scipy
83
>>> import numpy
84 2 Amber Herold
</pre>
85 1 Amber Herold
86 2 Amber Herold
___
87 1 Amber Herold
88
89 2 Amber Herold
h2. Compile or copy python module 
90 1 Amber Herold
91
A custom modules is optional for using tiltpicker and there are two ways you can use them 
92
depending on whether or not you have root access. A slower python implementation of the algorithm 
93
is provided for those who cannot get past this step
94
95 2 Amber Herold
h3. Compile and install globally with root access 
96 1 Amber Herold
97 2 Amber Herold
<pre>
98 1 Amber Herold
cd tiltpicker/modules/radermacher
99
python setup.py build
100
sudo python setup.py install
101 2 Amber Herold
</pre>
102 1 Amber Herold
103 2 Amber Herold
h3. Compile and install locally without root access 
104 1 Amber Herold
105 2 Amber Herold
<pre>
106 1 Amber Herold
cd tiltpicker/modules/radermacher
107
python setup.py build
108
cp build/*/radermacher.so ../..
109 2 Amber Herold
</pre>
110 1 Amber Herold
111
after all is done, go to the tiltpicker directory and type:
112
113 2 Amber Herold
<pre>
114 1 Amber Herold
# python
115
116
>>> import radermacher
117 2 Amber Herold
</pre>
118 1 Amber Herold
119
and if nothing happens, it works
120
121 2 Amber Herold
___
122 1 Amber Herold
123
124 2 Amber Herold
h2.  Run it 
125 1 Amber Herold
126
To get the help message for the function run:
127
128 2 Amber Herold
<pre>
129 1 Amber Herold
./ApTiltPicker.py --help
130 2 Amber Herold
</pre>
131 1 Amber Herold
132
An example session it setup in the following shell files:
133
134 2 Amber Herold
<pre>
135 1 Amber Herold
./runPicker.sh
136
./runPicked.sh
137 2 Amber Herold
</pre>
138 1 Amber Herold
139 2 Amber Herold
___
140 1 Amber Herold
141
Still having problems or just want to chat, email me at: vossman77 (at) yahoo.com
142
143
neil