1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
Dependencies for building THELI
===============================
You need the 'devel' versions of the following packages (either these version numbers, or more recent ones).
Older versions might work but have not been tested:
Qt5.9.6 https://www.qt.io/
cfitsio https://heasarc.gsfc.nasa.gov/fitsio/ (MUST BE configured with --enable-reentrant, otherwise you can use only one CPU !)
fftw3 http://fftw.org/
GSL v2.5 https://www.gnu.org/software/gsl/
wcslib v7.2 https://www.atnf.csiro.au/people/mcalabre/WCS/
libraw v0.19.5 https://www.libraw.org/
libtiff https://gitlab.com/libtiff/libtiff
Starting from Ubuntu 20.10, you can install THELI and all its dependencies from the repository:
sudo apt install theli
On a fresh Ubuntu 18.04 LTS installation, the following command resolves all dependencies (apart from libraw) and enable the compilation of 'scamp':
sudo apt install g++ build-essential autotools-dev python3-requests python3-astropy libfftw3-dev libtiff-dev curl libcurl4 libcurl4-gnutls-dev qt5-default qt5-qmake libgsl-dev libatlas-base-dev libblas-dev libplplot-dev libcfitsio-dev wcslib-dev locales libcairo2-dev libnetpbm10-dev netpbm libpng-dev libjpeg-dev libpython3-dev python3-dev zlib1g-dev libbz2-dev swig
Dependencies for running THELI
==============================
THELI uses a few external packages. The respective binaries and scripts must be present in your $PATH variable.
THELI will check for their presence upon launch and report any misconfigurations.
Astrometry.net is also searched for in its default installation path, /usr/local/Astrometry/bin/ .
swarp v2.38 https://github.com/astromatic/swarp
scamp v2.7 https://github.com/astromatic/scamp
Source Extractor v2.19 https://github.com/astromatic/sextractor
python/astropy v4.0 https://www.astropy.org/
astrometry.net v0.79 https://github.com/dstndstn/astrometry.net/releases (OPTIONAL)
Anaconda / AstroConda users BEWARE
==================================
THELI will likely crash if compiled and linked against libraries provided by Anaconda / AstroConda, because the linker mixed native system libraries with those provided by Anaconda / AstroConda (which were probably built on a different system).
To avoid this, deactivate your Anaconda environment. Solve the THELI dependencies using your native system's repository and / or compile the libraries from their sources. Then follow the installation instructions below.
Whether the THELI executable will then run with Anaconda activated will depend on your local machine.
Compilation
===========
Parallelization in THELI is based on openMP. Your C++ compiler must support at least openMP 4.5.
For GNU gcc/g++, this is the case for version 6 and later.
Create the 'Makefile' and build it:
> cd $HOME/software/THELI-master/src
> qmake -o Makefile THELI.pro
> make
> make install (copies the binary to /usr/bin/theli and the config files to /usr/share/theli/)
> make clean
To speed up, replace 'make' by 'make -j x", where 'x' is the number of your CPUs
The 'qmake' executable is part of the Qt5 dependence you have installed in the beginning.
THELIDIR Environment variable (optional)
========================================
There are two cases in which you must set a THELIDIR environment variable:
(1) You did not use 'make install' for a system-wide installation, e.g. if you don't have write permission in /usr
(2) You want to install a newer version locally, next to a system-wide installation.
Let's assume that the master branch of the THELI source package was unpacked in a 'software' folder
in your home directory:
$HOME/software/THELI-master/
Then you must set the THELIDIR environment variable to this path. For 'bash' you would do
> export THELIDIR=$HOME/software/THELI-master/
Include the line above in your ~/.bashrc to make it permament.
When launching THELI, Make sure you invoke $HOME/software/THELI-master/src/theli instead of /usr/bin/theli
MacOS C++ compiler and openMP
=============================
THELI has been successfully installed and run on MacOS Mojave. If you use the native Mac clang
compiler, you must at least install 'libomp'. THELI has not been tested with the native compiler.
Alternatively, try the LLVM clang version from http://releases.llvm.org/download.html.
This was used to compile THELI on Mojave. However, it turned out that openMP parallelized tasks
cause THELI to crash when more than one CPU was used. No trouble-shooting attempt was made.
What should work without problems is if you use the GNU g++ compiler, which must be installed separately.
You might have to edit the compiler flags near the end of src/THELI.pro accordingly.
Or, after running the 'qmake -o Makefile THELI.pro' call, edit the Makefile, replace all references to clang++
to the GNU version (or the LLVM clang++ version).
|