-
Notifications
You must be signed in to change notification settings - Fork 51
Installation
The easiest way to install OOrb on Linux and OSX 64-bit systems is using the conda installer, which requires some form of this package manager to be installed on your system (e.g., conda, anaconda, miniconda):
conda install -c defaults -c conda-forge openorbFor more details on the OOrb conda package please refer to this website.
If you are interested in the pyoorb library only, it may be alternatively be installed from PyPI through
pip install pyoorb
Please note that the PyPI package currently does not include the necessary datafiles for running pyoorb and they must be installed separately as described below.
OpenOrb comes with JPL's DE430 by default. Additional ephemerides can be installed using:
conda install -c defaults -c conda-forge openorb-data-de405for JPL's DE405 or
conda install -c defaults -c conda-forge openorb-data-bc430for Baer & Chesley (2017).
To build OOrb:
- GNU
make - a Fortran 90/95 compiler (
gfortranis best tested) -
curl(usually comes with macOS and Linux by default) - The
lapacklibrary (comes with macOS by default)
To run unit tests:
pytest
To build the documentation:
latexdvips
Optionally, you may also wish to install gnuplot which OOrb uses for plotting and latex for compiling some additional documentation.
An easy way to bootstrap a complete build environment is with
conda, which comes preinstalled with
the Anaconda Python Distribution,
or Miniconda. For example,
this will install everything that's needed (including the compilers) on a
macOS machine:
conda create -n oorb-dev python numpy pytest gfortran_osx-64
conda activate oorb-devOn Linux it's probably better to use your distribution's gfortran; simply
omit it from the line above. Of course, distribution packages may also be used for the other dependencies.
In the root directory of your OOrb installation (=OORBROOT) run
./configure COMPILER TYPE --prefix INSTALL_PATHwhere COMPILER is gfortran, flang, conda, g95, intel, absoft, compaq, ibm,
lahey, or sun, and TYPE is either opt for optimized code or deb
for code including debugging information. The --prefix line is optional;
if given it tells make install where to install the binaries and data
files after they have been built. conda is a special option intended for use with libraries installed through conda only.
A commonly used configuration is:
./configure gfortran opt --prefix=/opt/oorbIf left unspecified, the install prefix defaults to /usr/local.
Once you have configured the source code, run make to build it:
make -j4The -j4 command line arguments tells make to compile up to four targets in
parallel (making a better use of today's multi-core machines). You may wish to replace 4 with the number of threads available on your system.
Now you have a working executable called oorb in the OORBROOT/bin/
directory. In addition, you need to provide the software
additional data files which will be prepared in the next section.
To build the Python bindings, you must configure OOrb with:
./configure COMPILER TYPE --with-pyoorbThey're not built by default, otherwise. Once configured, running make as
discussed in the previous section will both build oorb and pyoorb.
A few other options are available with configure, mostly allowing you to
override default paths and/or executable names:
--with-python=<python interpreter name/path>--with-f2py=<f2py compuler name/path>--with-pytest=<pytest executable name/path>
Other compiler options not included in the default builds may be included with the --with-compiler-options argument, for example ./configure gfortran --with-compiler-options=-march=native.
Running configure with:
./configure --coveragewill link OpenOrb with gcov
coverage libraries. These
allow the developers to monitor the extent to which the code is covered by
the test suite.
See additional information in the comments next to the coverage target in
the Makefile.
The DE430 planetary ephemerides provided by the Solar System Dynamics Group at the Jet Propulsion Laboratory need to be converted to binary format (e.g., de430.dat) only once by doing
make ephemUsage of the BC430 asteroid ephemerides (Baer & Chesley, 2017)
requires the files asteroid_ephemeris.txt, asteroid_masses.txt,
and asteroid_indices.txt. These can be obtained as follows:
cd
OORBROOT/data/
./getBC430
or alternatively directly through Baer's Google drive at https://docs.google.com/document/d/1bZIpK99YNwYnxNLsaMsxfrY6fJ-wGRNWNcDzWmGvP9s/edit
The Minor Planet Center updates the observatory codes on a daily basis, but an update is not necessarily required until you stumble upon observations from an observatory which isn't listed in your version of the file.
cd OORBROOT/data/
./updateOBSCODE
updates a file called OBSCODE.dat.
You may find the MPCORB orbit database useful for e.g. initial orbits to use with OOrb's least-squares solver. This may be obtained in the following manner:
wget https://www.minorplanetcenter.net/iau/MPCORB/MPCORB.DAT
./oorb --task=mpcorb --mpcorb=MPCORB.DAT > MPCORB.orb
Updated via the OOrb git repository.
Updated via the OOrb git repository.
To install the binaries and data files to their destination directory, run:
make installThis will copy all that's needed into the directory given by --prefix to
./configure (or /usr/local, if none was given). As most Unix
distributions have /usr/local/bin on the default path, you should now be able
to run oorb by typing oorb.
If configured to build pyoorb, pyoorb will be installed into the default
site-path path of the Python used to build it. This means you'll be able
to import pyoorb from Python without any special setup. If you wish to
install pyoorb elsewhere, you can customize its install path with:
env PYTHON_SITE_PATH=/where/pyoorb/should/be/installed make install Note that you will have to add that path to PYTHONPATH, to make pyoorb
discoverable to Python.
If you wish to run oorb from the source directory, you need to tell it
where to find the different files. This is easiest to do through
environment variables which you declare in the configuration file for the
shell (e.g., .profile on Mac OS X and .bash_profile on Linux). For the
Bash shell you need to add something like the following lines to the configuration file of
your shell:
export OORBROOT=$HOME/oorb
export OORB_DATA=$OORBROOT/data
export OORB_CONF=$OORBROOT/main/oorb.conf
export OORB_GNUPLOT_SCRIPTS_DIR=$OORBROOT/gnuplot/Of course, if you have stored the files elsewhere, adapt the above to your setup.
If the above variables are not defined, oorb will look for the data files in PREFIX/share/oorb
and PREFIX/share/oorb/gnuplot for the gnuplot scripts, where PREFIX is an argument given during compilation.
A packaged version of oorb may install the relevant files into the correct locations automatically.