Quick install¶
Install Anaconda python¶
irfpy
is optimally designed under Anaconda Python package
running on MacOSX or Linux.
Note
Definitivaly irfpy
works with any python packages, but
irfpy
development team cannot support installation
and setup to such packages (as long as Anaconda Python is working).
Note
So far irfpy
development team does not have resources
to support Windows. For Windows user, it is worthwhile to
consider using VirtualBox
or equivalent to install Linux system.
Download the Anaconda Python from https://www.continuum.io/downloads.
Install Anaconda Python following the instruction (e.g. http://conda.pydata.org/docs/install/quick.html).
It is recommended to exercise “30 minute test drive” for conda (http://conda.pydata.org/docs/test-drive.html).
Install irfpy.pep
¶
Installation is simple enough, using pip, the python package manager.
% pip install "git+https://github.com/AndrewAnnex/SpiceyPy.git"
% pip install --no-index --find-links=https://irfpy.irf.se/sdist irfpy.util
% pip install --no-index --find-links=https://irfpy.irf.se/sdist irfpy.sara
% pip install --no-index --find-links=https://irfpy.irf.se/sdist irfpy.pep
Update irfpy.pep
¶
Since irfpy
is updating as frequently as possible, you may sometimes
want to update the package.
But don’t worry, it is enough simple. Add “-U” in the end of the pip
.
% pip install --no-index --find-links=https://irfpy.irf.se/sdist irfpy.util -U
% pip install --no-index --find-links=https://irfpy.irf.se/sdist irfpy.sara -U
% pip install --no-index --find-links=https://irfpy.irf.se/sdist irfpy.pep -U
Troubleshoot¶
Let’s see if the installation works correctly.
Open a terminal
Then start ipython.
ipython
If it is successful, a prompt In [1]:
is seen.
Try importing several important packages, as seen examples below.
import numpy as np # Numpy
import matplotlib.pyplot as plt # Matplotlib
import spiceypy as spice # SpiceyPy
import irfpy.util # irfpy.util
import irfpy.pep # irfpy.pep module
If fails, the corresponding package is not installed correctly.
For developer¶
Below description is for the developer of irfpy.pep
library.
Developer here is the ones who create, modify, and debug programs under the directory src/irfpy/
.
Create PEP-dev environment (optional, but recommended)¶
It is recommended to make a new environment dedicated for developement. With this, you can switch the environments between development and data analysis.
conda create -n pep-dev anaconda
source activate pep-dev
Clone the project¶
git clone git@gitlab.irf.se:irfpy/pep
cd pep
git checkout develop
If you do not have the access to gitlab.irf.se, contact to Futaana.
Clone the subprojects¶
git clone git@gitlab.irf.se:irfpy/util irfpy-deps/irfpy.util
git clone git@gitlab.irf.se:irfpy/spice irfpy-deps/irfpy.spice
git clone git@gitlab.irf.se:irfpy/sara irfpy-deps/irfpy.sara
If you do not have the access to gitlab.irf.se, contact to Futaana.
Install the packages¶
source activate pep-dev
python setup.py develop
cd irfpy-deps/irfpy.util
git checkout develop
python setup.py develop
cd ../..
cd irfpy-deps/irfpy.spice
git checkout develop
python setup.py develop
cd ../..
cd irfpy-deps/irfpy.sara
git checkout develop
python setup.py develop
cd ../..