CRXS
1.0
Comic Ray Cross Section Tools
|
This software package is developed to easily calculate cross sections (XS) for the production of antiprotons and antideuteron as required in cosmic-ray (CR) physics. The package is based on c++ and builds all functions into a library. Furthermore, it provides an interface to python.
This software package provides:
If you install the python package make sure your python version contains the following packages:
The software is available as git repository on gitHub. To download it into the folder <MySoftwareDirectory> type:
The c++ library is build with cmake and the python interface is created by swig. All commands to build the software are summarised in the Makefile. If you want to build everything, simply use
The c++ library is build shared. You should add "<MySoftwareDirectory>/cpp/lib" to your LD_LIBRARY_PATH (Mac: DYLD_LIBRARY_PATH) library path.
To permanently add the library to the LD_LIBRARY path add this line in your ~/.bashrc (Mac: ~/.profile).
Further options:
If you want to build only the python 2 or 3 use:
or
To uninstall everything use
If you want to link the python package to your site path use the script
and follow the instruction. You have to specify your site path manuelly. To find out your path you may need the command (python -m site).
If you do not want to link the package to your python version you have to create a symbolic link of the py2 or py3 directory in the directory where you want to use the package.
To include the package use
On a Mac with Xcode you may build a project by
Now you are ready to start!
This package has been developed during the preparation of three papers. Please cite those papers if you use the results of this package.
More details are given in the LICENSE file.
The are stored in the folder examples
There are some examples which show how the software and access to individual fuctions works. Note that some functions are available in XS_tools.py as well as in XS_wrapper. The difference is that the functions in XS_wrapper are completly based on c++ and interfaced at the very end. This results in the best performance. The functions of XS_tools are partly written in python, which allows easy modification but has a worse performance.