Before installing PLATON, it is highly recommended to have a fast linear algebra library (BLAS) and verify that numpy is linked to it. This is because the heart of the radiative transfer code is a matrix multiplication operation conducted through numpy.dot, which in turn calls a BLAS library if it can find one. If it can’t find one, your code will be many times slower.
On Linux, a good choice is OpenBLAS. You can install it on Ubuntu with:
sudo apt install libopenblas-dev
On OS X, a good choice is Accelerate/vecLib, which should already be installed by default.
To check if your numpy is linked to BLAS, do:
If blas_opt_info mentions OpenBLAS or vecLib, that’s a good sign. If it says “NOT AVAILABLE”, that’s a bad sign.
Once you have a BLAS installed and linked to numpy, download PLATON, install the requirements, and install PLATON itself. Although it is possible to install PLATON using pip (pip install platon), the recommended method is to clone the GitHub repository and install from there. This is because the repository includes examples, which you don’t get when pip installing.
To install from GitHub:
git clone https://github.com/ideasrule/platon.git cd platon/ python setup.py install
You can run unit tests to make sure everything works:
The unit tests should also give you a good idea of how fast the code will be. On a decent Ubuntu machine with OpenBLAS, it takes 3 minutes.
The default data files (in platon/data) have a wavelength resolution of R=1000, but if you want higher resolution, you can download R=2000 and R=10,000 data from this webpage
If you have a CUDA-capable GPU and plan to use the eclipse depth calculator, you can take advantage of GPU acceleration. Install CUDA, cudamat, and gnumpy, in that order, and the eclipse depth calculator should automatically use find and use gnumpy.