Skip to content

junkoda/mockgallib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mockgallib

A Library for generating mock galaxy catalogues using C++/Python (cosmology)

https://github.com/junkoda/mockgallib

http://junkoda.github.io/codes/mockgallib/

Compile and install

Library libs

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.)

Python module python

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

About

A Library for generating mock galaxy catalogues using C++/Python (cosmology)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published