A Library for generating mock galaxy catalogues using C++/Python (cosmology)
https://github.com/junkoda/mockgallib
http://junkoda.github.io/codes/mockgallib/
Run make
in libs
directory. GNU Scientific Library (GSL) and HDF5
are required. If you have these libraries in non-standard directories,
add DIR_PATH
in libs/Makefile
.
% make
This creates a static library libs/libmockgal.a
and a shared library
libs/libmockgal.so
. You can copy the shared library to the standard
location (e.g., /usr/local/lib ), or set an environment variable
LD_LIBRARY_PATH
(linux) or DYLD_LIBRARY_PATH
(mac):
export LD_LIBRARY_PATH=/path/to/mockgallib/libs:$LD_LIBRARY_PATH
(In Mac OS El Captian, the usage of DYLD_LIBRAY_PATH
is limitted; I
recomend coping the so file to one of the standard locations.)
Run setup.py in the python
directory:
Python3 and NumPy are required. If you do not have python3 and do not have privileges to install Python3, I recommend using the anaconda/miniconda package.
% python3 setup.py build_ext --inplace
You can now load mockgallib
package in the python/
directory
% python3
>>> import mockgallib
You can also install the module so that you can import from any location:
% python3 setup.py install