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