Project

General

Profile

TiltPicker Installation » History » Version 2

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