@@ -6,7 +6,7 Signal Chain (SCh) is a radar data processing library developed using [Python](w | |||||
6 |
|
6 | |||
7 | ## Installation |
|
7 | ## Installation | |
8 |
|
8 | |||
9 |
Install system dependencies, clone the latest version from [ |
|
9 | Install system dependencies, clone the latest version from [here](http://jro-dev.igp.gob.pe/rhodecode/schain/) and install it as a normal python package. | |
10 |
|
10 | |||
11 | ### Linux based system |
|
11 | ### Linux based system | |
12 | ``` |
|
12 | ``` | |
@@ -16,37 +16,25 $ cd schain | |||||
16 | $ sudo pip install ./ |
|
16 | $ sudo pip install ./ | |
17 |
|
17 | |||
18 | ``` |
|
18 | ``` | |
19 | **It is recommended to install schain in a virtual environment** |
|
|||
20 | ``` |
|
|||
21 | $ sudo pip install virtualenv |
|
|||
22 | $ virtualenv /path/to/virtual --system-site-packages |
|
|||
23 | $ source /path/to/virtual/bin/activate |
|
|||
24 | (virtual) $ cd schain |
|
|||
25 | (virtual) $ pip install ./ |
|
|||
26 |
|
||||
27 | ``` |
|
|||
28 |
|
19 | |||
29 | ### MAC Os |
|
20 | ### MAC Os | |
30 | ``` |
|
21 | ``` | |
|
22 | $ brew install python | |||
31 |
|
|
23 | $ brew install cartr/qt4/pyqt | |
32 | $ git clone http://jro-dev.igp.gob.pe/rhodecode/schain/ |
|
24 | $ git clone http://jro-dev.igp.gob.pe/rhodecode/schain/ | |
33 | $ cd schain |
|
25 | $ cd schain | |
34 | $ pip install ./ |
|
26 | $ pip install ./ | |
35 | ``` |
|
27 | ``` | |
36 |
|
28 | |||
37 | if ```pip install ./``` does not work, install a proper python enviroment, and repeat the steps. |
|
29 | **It is recommended to install schain in a virtual environment** | |
38 | ``` |
|
|||
39 | $ brew install python |
|
|||
40 | ``` |
|
|||
41 |
|
||||
42 | ### GUI Installation |
|
|||
43 |
|
||||
44 | ``` |
|
30 | ``` | |
45 | $ sudo apt-get install python-pip python-dev gfortran libpng-dev freetype* libblas-dev liblapack-dev libatlas-base-dev python-qt4 python-tk libssl-dev libhdf5-dev |
|
31 | $ virtualenv /path/to/virtual | |
46 | $ (virtual) bash link_PyQt4.sh |
|
32 | $ source /path/to/virtual/bin/activate | |
|
33 | (virtual) $ cd schain | |||
|
34 | (virtual) $ pip install ./ | |||
|
35 | (virtual) $ bash link_PyQt4.sh | |||
47 | ``` |
|
36 | ``` | |
48 |
|
37 | |||
49 |
|
||||
50 | ## First Script |
|
38 | ## First Script | |
51 |
|
39 | |||
52 | Read Spectra data (.pdata) - remove dc - plot spectra & RTI |
|
40 | Read Spectra data (.pdata) - remove dc - plot spectra & RTI |
@@ -1,8 +1,5 | |||||
1 | #!/bin/bash |
|
1 | #!/bin/bash | |
2 | # This hook is run after a new virtualenv is activated. |
|
2 | # This hook is run after a new virtualenv is activated. | |
3 | # ~/.virtualenvs/postmkvirtualenv |
|
|||
4 |
|
||||
5 | libs=( PyQt4 sip.so ) |
|
|||
6 |
|
3 | |||
7 | python_version=python$(python -c "import sys; print (str(sys.version_info[0])+'.'+str(sys.version_info[1]))") |
|
4 | python_version=python$(python -c "import sys; print (str(sys.version_info[0])+'.'+str(sys.version_info[1]))") | |
8 | var=( $(which -a $python_version) ) |
|
5 | var=( $(which -a $python_version) ) | |
@@ -10,8 +7,9 var=( $(which -a $python_version) ) | |||||
10 | get_python_lib_cmd="from distutils.sysconfig import get_python_lib; print (get_python_lib())" |
|
7 | get_python_lib_cmd="from distutils.sysconfig import get_python_lib; print (get_python_lib())" | |
11 | lib_virtualenv_path=$(python -c "$get_python_lib_cmd") |
|
8 | lib_virtualenv_path=$(python -c "$get_python_lib_cmd") | |
12 | lib_system_path=$(${var[-1]} -c "$get_python_lib_cmd") |
|
9 | lib_system_path=$(${var[-1]} -c "$get_python_lib_cmd") | |
|
10 | sip_path=$(ls $lib_system_path/sip*.so) | |||
13 |
|
11 | |||
14 | for lib in ${libs[@]} |
|
12 | echo "Linking Qt4..." | |
15 | do |
|
13 | ln -s $lib_system_path/PyQt4 $lib_virtualenv_path/PyQt4 | |
16 | ln -s $lib_system_path/$lib $lib_virtualenv_path/$lib |
|
14 | echo "Linking SIP..." | |
17 | done |
|
15 | ln -s $sip_path $lib_virtualenv_path/sip.so |
@@ -8,7 +8,7 try: | |||||
8 | from PyQt4.QtGui import QApplication |
|
8 | from PyQt4.QtGui import QApplication | |
9 | except: |
|
9 | except: | |
10 | log.error( |
|
10 | log.error( | |
11 |
'You should install P |
|
11 | 'You should install PyQt4 module in order to run the GUI. See the README.') | |
12 | sys.exit() |
|
12 | sys.exit() | |
13 |
|
13 | |||
14 |
|
14 |
@@ -8,8 +8,6 import os | |||||
8 | from setuptools import setup, Extension |
|
8 | from setuptools import setup, Extension | |
9 | from setuptools.command.build_ext import build_ext as _build_ext |
|
9 | from setuptools.command.build_ext import build_ext as _build_ext | |
10 | from schainpy import __version__ |
|
10 | from schainpy import __version__ | |
11 | from schainpy.utils import log |
|
|||
12 |
|
||||
13 |
|
11 | |||
14 | class build_ext(_build_ext): |
|
12 | class build_ext(_build_ext): | |
15 | def finalize_options(self): |
|
13 | def finalize_options(self): | |
@@ -19,15 +17,6 class build_ext(_build_ext): | |||||
19 | import numpy |
|
17 | import numpy | |
20 | self.include_dirs.append(numpy.get_include()) |
|
18 | self.include_dirs.append(numpy.get_include()) | |
21 |
|
19 | |||
22 |
|
||||
23 | try: |
|
|||
24 | from PyQt4 import QtCore, QtGui |
|
|||
25 | from PyQt4.QtGui import QApplication |
|
|||
26 | except: |
|
|||
27 | log.warning( |
|
|||
28 | 'You should install PyQt4 module in order to run the GUI. See the README.') |
|
|||
29 |
|
||||
30 |
|
||||
31 | setup(name="schainpy", |
|
20 | setup(name="schainpy", | |
32 | version=__version__, |
|
21 | version=__version__, | |
33 | description="Python tools to read, write and process Jicamarca data", |
|
22 | description="Python tools to read, write and process Jicamarca data", |
General Comments 0
You need to be logged in to leave comments.
Login now