{ "info": { "author": "Gabriel Altay", "author_email": "gabriel.altay@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: POSIX :: Linux", "Programming Language :: Fortran", "Programming Language :: Python", "Topic :: Education", "Topic :: Scientific/Engineering :: Astronomy", "Topic :: Scientific/Engineering :: Physics" ], "description": "Description\r\n======================\r\nRabacus is a `Python `_ package for performing \r\nanalytic radiative transfer calculations in simple geometries relevant to \r\ncosmology and astrophysics. It also contains tools to calculate cosmological\r\nquantities such as the power spectrum and mass function. \r\n\r\n\r\nPrerequisites\r\n======================\r\n\r\nThe Rabacus package requires three other Python packages and a fortran \r\ncompiler, \r\n\r\n- `Scipy `_\r\n- `Numpy `_ (version 1.7 or later)\r\n- `Quantities `_\r\n- Fortran compiler in your path. \r\n\r\n\r\nInstalling prerequisites with pip\r\n------------------------------------\r\n\r\nA simple way to install Python packages is using the package manager \r\n`pip `_. To check if you have\r\npip installed on your system, type ``pip`` at the command line, :: \r\n\r\n pip\r\n\r\nIf this produces usage instructions then congratulations, you have pip\r\ninstalled. If not, instructions for installing pip can be found \r\n`here `_.\r\nTo check if the python packages are installed on your system, attempt \r\nto import them from the python command prompt, ::\r\n\r\n >>> import scipy\r\n >>> import numpy as np\r\n >>> import quantities as pq\r\n\r\nIf any of these import commands produce an error message you will need \r\nto install the proper software before installing Rabacus. \r\nOnce you have access to pip, you can install any missing prerequisites \r\nusing the following commands, ::\r\n\r\n sudo pip install scipy\r\n sudo pip install numpy \r\n sudo pip install quantities\r\n\r\nIf you do not have root access on your system you can pass the ``--user`` flag \r\nwhich will install the packages into a hidden folder called ``.local`` in \r\nyour home directory, ::\r\n\r\n pip install --user scipy\r\n pip install --user numpy \r\n pip install --user quantities\r\n\r\n\r\nInstalling prerequisites on Debian (Ubuntu)\r\n---------------------------------------------\r\n\r\nOn Debian based systems (such as Ubuntu) you may prefer to install these \r\nprerequisites using the APT tool, ::\r\n \r\n sudo apt-get install python-scipy python-numpy python-quantities\r\n\r\nTo increase the speed of execution, much of Rabacus is written in \r\nFortran 90 and then wrapped using the f2py tool that is part of numpy. For \r\nthe installation to be successful, a fortran compiler must be in your \r\nexecutable path. If you don't already have one, I recommend the \r\ngnu fortran compiler `gfortran `_. \r\nOn Debian based systems (such as Ubuntu) you can install this \r\ncompiler using the APT tool, ::\r\n\r\n sudo apt-get install gfortran\r\n\r\nInstallation\r\n======================\r\n\r\nWith the prequisites installed on your system, you are ready to\r\ninstall the Rabacus package itself. \r\n\r\nSetting ``F90`` environment variable\r\n-------------------------------------\r\n\r\nRabacus makes use of OpenMP directives in the Fortran code base and so\r\nwe have to make sure the code is compiled correctly. In order to do\r\nthis, you have to let the build system know what Fortran 90 compiler\r\nyou are going to be using. The simplest way to do this is to set the\r\nenvironment variable ``F90`` before following the installation\r\ninstructions below. Rabacus has been tested with the intel compiler and\r\nthe gnu gfortran compiler. For other compilers you will have to\r\nfollow the `Manual Install` instructions below.\r\n\r\nTo use the gfortran compiler, type the following at the command line\r\n(in Bash) ::\r\n\r\n export F90=gfortran\r\n\r\nTo use the intel compiler set :: \r\n\r\n export F90=ifort\r\n\r\n\r\nSingle command install\r\n-------------------------\r\n\r\nIf you have made the appropriate sacrifices to the computer gods, you\r\nshould be able to install an OpenMP enabled version of Rabacus with a\r\nsingle comand line call to pip, ::\r\n\r\n sudo pip install rabacus\r\n\r\nAs was the case for the prerequisites, if you do not have root access\r\non your system you can pass the ``--user`` flag which will install\r\nRabacus into a hidden folder called ``.local`` in your home directory,\r\n::\r\n\r\n pip install --user rabacus\r\n\r\n\r\nIf the last two lines printed to the screen are, :: \r\n\r\n Successfully installed rabacus \r\n Cleaning up...\r\n\r\nthen congratulations you have a working copy of Rabacus. To double\r\ncheck, begin an ipython session and attempt an import, ::\r\n\r\n import rabacus as ra\r\n\r\nPackages installed with pip can be uninstalled in the same way, ::\r\n\r\n pip uninstall rabacus\r\n\r\n\r\nManual install\r\n------------------------\r\n\r\nIf the above process fails for any reason we can always download\r\nRabacus and manually invoke the setup script. The first step is to\r\ndownload and untar the Rabacus tar.gz file from the PyPI site\r\n(https://pypi.python.org/pypi/rabacus) and change into the main\r\nRabacus directory, ::\r\n\r\n gunzip rabacus-x.x.x.tar.gz\r\n tar xvf rabacus-x.x.x.tar \r\n cd rabacus-x.x.x\r\n\r\nNow we have direct access to the ``setup.py`` file which gives us a\r\nlot more freedom but it comes at the cost of slightly more complexity.\r\nFirst it's a good idea to see which fortran compilers are detected on\r\nyour machine. The following command will list all of the fortan\r\ncompilers found on your system and all the compilers available for\r\nyour system but not found. ::\r\n\r\n f2py -c --help-fcompiler\r\n\r\nFor example on my machine I get the following, ::\r\n\r\n Fortran compilers found:\r\n --fcompiler=gnu95 GNU Fortran 95 compiler (4.8.1-10)\r\n --fcompiler=intelem Intel Fortran Compiler for 64-bit apps (14.0.2.144)\r\n Compilers available for this platform, but not found:\r\n --fcompiler=absoft Absoft Corp Fortran Compiler\r\n --fcompiler=compaq Compaq Fortran Compiler\r\n --fcompiler=g95 G95 Fortran Compiler\r\n --fcompiler=gnu GNU Fortran 77 compiler\r\n --fcompiler=intel Intel Fortran Compiler for 32-bit apps\r\n --fcompiler=intele Intel Fortran Compiler for Itanium apps\r\n --fcompiler=lahey Lahey/Fujitsu Fortran 95 Compiler\r\n --fcompiler=nag NAGWare Fortran 95 Compiler\r\n --fcompiler=pathf95 PathScale Fortran Compiler\r\n --fcompiler=pg Portland Group Fortran Compiler\r\n --fcompiler=vast Pacific-Sierra Research Fortran 90 Compiler\r\n\r\nNow we decide which of the fortran compilers to use and which flags to\r\npass the build command. Suppose you wanted to use the Intel compiler.\r\nEdit the ``setup.py`` file such that the variable ``f90_flags`` is a\r\nlist of compile flags and ``omp_lib`` is a list containing the linking\r\nflags. For example, ::\r\n\r\n f90_flags = [\"-openmp\", \"-fPIC\", \"-xHost\", \"-O3\", \"-ipo\", \r\n \"-funroll-loops\", \"-heap-arrays\", \"-mcmodel=medium\"] \r\n\r\n omp_lib = [\"-liomp5\"]\r\n\r\nThese variables are already defined near the top of the ``setup.py``\r\nfile and will need to be overwritten. Once this is done, we give the\r\nbuild command to the ``setup.py`` script, ::\r\n\r\n python setup.py build --fcompiler=intelem\r\n\r\nAfter the package is built, give the install command to actually\r\ninstall it, ::\r\n\r\n sudo python setup.py install --record rabacus_install_files.txt\r\n\r\nThe last part of the command is to allow for easy uninstall. This\r\nprocess just involves deleting all installed files which will be\r\nlisted in the file ``rabacus_install_files.txt``. This can be\r\naccomplished using the following command, ::\r\n\r\n cat rabacus_install_files.txt | xargs sudo rm -rf\r\n\r\nThe install can also be done locally for those without root permission\r\non their system by passing the ``--user`` flag to the install command,\r\n::\r\n\r\n python setup.py install --user --record rabacus_install_files.txt\r\n\r\nNote that if you previously did an install of Rabacus that required\r\nthe ``sudo`` command you will likely need to delete the\r\n``rabacus.egg-info`` directory and some directories inside the\r\n``build`` directory as they will need to be modified but will be owned\r\nby ``root``. If you are only doing a local install then this shoudn't\r\nbe necessary. This procedure should work for any fortran compiler\r\nsupported by f2py (i.e. any compiler in the list returned when using\r\nthe ``--help-fcompiler`` flag.\r\n\r\n\r\nTesting install\r\n------------------------\r\n\r\nDetailed examples of using rabacus are available by following the link\r\nto the users guide below. However, we present a short example with the \r\nexpected output below as a way to quickly test that a new installation \r\nhas basic functionality. We first import rabacus and then create an\r\nobject that gives access to the meta galactic radiation background\r\ndescribed in \r\n`Haardt & Madau 2012\r\n`_. Finally, we\r\nask for the photo-heating rate of He I at a redshift of 3.0. :: \r\n\r\n import rabacus as ra\r\n hm12 = ra.HM12_Photorates_Table()\r\n z = 3.0\r\n print hm12.He1h(z)\r\n\r\nThe expected output from a working rabacus installation is given\r\nbelow. Note that there may be differences in the last significant\r\nfigure due to different processor architectures. ::\r\n\r\n 3.39163517433e-12 eV/s\r\n\r\n\r\n\r\nAuthor\r\n=====================\r\nRabacus was written by Gabriel Altay and any questions can be directed \r\nto gabriel.altay@gmail.com\r\n\r\n\r\n\r\nProject URLs\r\n=====================\r\n\r\n* PyPI (https://pypi.python.org/pypi/rabacus) \r\n* documentation (http://pythonhosted.org//rabacus)\r\n* version control (https://github.com/galtay/rabacus)", "description_content_type": null, "docs_url": "https://pythonhosted.org/rabacus/", "download_url": "https://pypi.python.org/pypi/rabacus", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/galtay/rabacus", "keywords": "", "license": "Free BSD", "maintainer": "", "maintainer_email": "", "name": "rabacus", "package_url": "https://pypi.org/project/rabacus/", "platform": "linux", "project_url": "https://pypi.org/project/rabacus/", "project_urls": { "Download": "https://pypi.python.org/pypi/rabacus", "Homepage": "https://bitbucket.org/galtay/rabacus" }, "release_url": "https://pypi.org/project/rabacus/0.9.5/", "requires_dist": null, "requires_python": null, "summary": "Calculates analytic cosmological radiative transfer solutions in simplified geometries.", "version": "0.9.5" }, "last_serial": 2026136, "releases": { "0.9.0": [], "0.9.1": [], "0.9.2": [], "0.9.5": [ { "comment_text": "", "digests": { "md5": "d9a0e1e8b726ceafadd4f30142960a3b", "sha256": "5936f4770610730a5e97ac9de93afb7a664903fd42b0ad408f454b19c254846c" }, "downloads": -1, "filename": "rabacus-0.9.5.tar.gz", "has_sig": false, "md5_digest": "d9a0e1e8b726ceafadd4f30142960a3b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 403453, "upload_time": "2016-03-25T01:10:45", "url": "https://files.pythonhosted.org/packages/e4/e1/e03cd0211d702596b3b98046d6db8dae5b9f940cdac8b8758556a713558d/rabacus-0.9.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d9a0e1e8b726ceafadd4f30142960a3b", "sha256": "5936f4770610730a5e97ac9de93afb7a664903fd42b0ad408f454b19c254846c" }, "downloads": -1, "filename": "rabacus-0.9.5.tar.gz", "has_sig": false, "md5_digest": "d9a0e1e8b726ceafadd4f30142960a3b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 403453, "upload_time": "2016-03-25T01:10:45", "url": "https://files.pythonhosted.org/packages/e4/e1/e03cd0211d702596b3b98046d6db8dae5b9f940cdac8b8758556a713558d/rabacus-0.9.5.tar.gz" } ] }