{ "info": { "author": "Olivier Wertz", "author_email": "owertz@alumni.ulg.ac.be", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.7" ], "description": "pySPT - Source Position Transformation\n======================================\n\n\n.. image:: https://img.shields.io/badge/license-MIT-blue.svg?style=flat\n :target: https://github.com/owertz/pySPT/blob/master/LICENSE\n\n.. image:: https://readthedocs.org/projects/pyspt/badge/?version=latest\n :target: http://pyspt.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n \n.. image:: https://travis-ci.org/owertz/pySPT.svg?branch=master\n :target: https://travis-ci.org/owertz/pySPT \n \n.. image:: https://badge.fury.io/py/pySPT.svg\n :target: https://badge.fury.io/py/pySPT\n \n.. image:: https://img.shields.io/badge/arXiv-1801.04151%20-yellowgreen.svg\n :target: https://arxiv.org/abs/1801.04151 \n \n.. image:: https://img.shields.io/badge/Python-2.7-brightgreen.svg\n :target: https://pypi.python.org/pypi/pySPT \n\n\n``pySPT`` is a package dedicated to the Source Position \nTransformation (SPT). The main goal of ``pySPT`` is to provide \na tool to quantify the systematic errors that are introduced by \nthe SPT in lens modeling. ``pySPT`` is free, open source software \ncompatible with Python 2.7 and distributed under the terms of \nthe `MIT `_ license.\n\n\nIntroduction\n------------\nThe modern time-delay cosmography aims to infer the cosmological \nparameters with a competitive precision from observing a multiply \nimaged quasar. The success of this technique relies upon a robust \nmodeling of the lens mass distribution. Unfortunately strong\ndegeneracies between density profiles that lead to almost the same \nlensing observables may bias precise estimate for the Hubble\nconstant. The SPT, which covers the well-known mass sheet \ntransformation (MST) as a special case, defines a new framework \nto investigate these degeneracies.\n\nRecently, a detailed analysis of how the SPT may affect the \ntime-delay cosmography has been presented in `Wertz, Orthen & Schneider (2017) `_. \nTo address this question, we started by developing \na flexible numerical framework that encompasses well-tested and \nefficient implementations of most of the analytical results published \nin `Schneider & Sluse (2014) `_ \nand `Unruh, Schneider & Sluse (2017) `_. \nNumerous additional features were then added, giving rise to ``pySPT`` .\n\nThe main repository of ``pySPT`` resides on `Github `_,\nkeeping an effective collaboration with Git as a version control system.\nThe code is under continuous development and feedback/suggestions/improvements \nwould be greatly appreciated. To do so, feel free to create an `issue `_ \nto report a bug or send a `pull request `_ \nto submit your contribution.\n\nDocumentation\n-------------\nThe full documentation for ``pySPT`` can be found here: http://pyspt.readthedocs.io.\n\nJupyter notebooks\n-----------------\nSeveral tutorials in the form of Jupyter notebooks can be found here: https://github.com/owertz/pySPT_tutorials\n\nInstallation and dependencies\n-----------------------------\n``pySPT`` relies on packages included in the python standard library \nand the proven open-source libraries ``numpy``, ``scipy``, ``matplotlib``\nand ``numdifftools``.\n\nUsing the setup.py file\n^^^^^^^^^^^^^^^^^^^^^^^\nFirst, you have to download ``pySPT`` from its Github repository as a \nzip file and unzip it on your computer. Enter the ``pySPT`` root folder \nwhere the setup.py file is located and use the command:\n\n.. code-block:: bash\n\n $ python setup.py install\n\nCheck the installation\n^^^^^^^^^^^^^^^^^^^^^^\nTo check that the installation run smoothly, open Python and use the command:\n\n.. code-block:: python\n\n import pySPT\n \nIf everything went as planned, you will see a friendly welcome message.\n\nC-shared libraries\n------------------\nFor the sake of efficiency, a few methods of the class ``pySPT.spt.SPT`` (mainly ``tilde_alpha_fast`` and ``tilde_psi_fast``) make use of C shared libraries to compute the closest curl-free approximation of the SPT-modified deflection angle as well as the corresponding deflection potential. These libraries are provided with ``pySPT`` and are automatically installed in the sub-repository '.../pySPT/sources_C/' when you install ``pySPT``.\n\nHowever, you will need a C-compiler pre-installed on your machine to run these methods. \nI personally recommend `gcc `_. If your machine runs on MacOsX, the gcc compiler is \nincluded with 'Xcode', which can be installed for free (see `here `_ for info about Xcode). \nA step-by-step installation guide is given `here `_.\n\nHow to deal with ``pySPT`` and C-shared libraries are discussed `here `_\n\nRecompile the C files\n^^^^^^^^^^^^^^^^^^^^^\nIn the case you want to recompile the C shared libraries on your computer, you need a C-compiler pre-installed on\nyour machine. \n\nHow to manually compile a *.c file:\n\n(1) Open a terminal and go in the folder '~/pySPT/sources_C' where ~ is the absolute path where pySPT is installed. \n(2) Run the following command in a terminal\n\n.. code-block:: bash\n\n $ gcc -shared -o osx/test.so -fPIC -lm -lgsl sources/test.c\n\nwhere `test` is the filename of a C source file, e.g. IntegrandAlphaTilde_NISG_IS1.\nNote that osx has to be changed depending on your platform: ``osx`` for Max OS X and \n``linux`` for a Linux distribution. Windows is not yet supported. Note that ``-lgsl`` is only required \nfor a code (*.c file) which requires the gsl library (see below), and can thus be ignored when gsl is not required.\n\nHow to compile all the *.c files:\n\n(1) Open a terminal and go in the folder '~/pySPT/sources_C/' where ~ is the absolute path where pySPT is installed. \n(2) Run the bash script 'compile_shared_libraries.sh':\n\n.. code-block:: bash\n\n $ bash compile_shared_libraries.sh\n\nGSL library\n^^^^^^^^^^^\nA few C shared libraries require the GNU Scientific Library (gsl) to work properly. \nIf you do not have this library pre-installed on your machine, ``pySPT`` will raise an exception telling you there\nis a missing gsl*.so file. An easy way to obtain gsl is to run (in a terminal):\n\n.. code-block:: bash\n\n $ brew install gsl\n\nGeneral informations about ``gsl`` is given `here `_.\nAdditional informations to install and configure ``gsl`` are given `here `_.\n\n\nAttribution\n-----------\nMost of ``pySPT`` capabilities and key features are reported in \n`Wertz & Orthen 2017 `_. Please cite that paper whenever you publish \nresults that made use of ``pySPT``.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/owertz/pySPT/archive/0.1.1.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/owertz/pySPT", "keywords": "SPT", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pySPT", "package_url": "https://pypi.org/project/pySPT/", "platform": "", "project_url": "https://pypi.org/project/pySPT/", "project_urls": { "Download": "https://github.com/owertz/pySPT/archive/0.1.1.tar.gz", "Homepage": "https://github.com/owertz/pySPT" }, "release_url": "https://pypi.org/project/pySPT/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "Package dedicated to the source position transformation in lens modeling.", "version": "0.1.1" }, "last_serial": 3511778, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "2fe2c22973d8ffc65ac7b32447b61a67", "sha256": "dcc2759092d4c7732cdf26e184c1c0adc245835e19d9d342b78d5313582efaa1" }, "downloads": -1, "filename": "pySPT-0.1.tar.gz", "has_sig": false, "md5_digest": "2fe2c22973d8ffc65ac7b32447b61a67", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 172155, "upload_time": "2018-01-22T13:01:23", "url": "https://files.pythonhosted.org/packages/9f/be/c0934597732d9b5dcd5a2a38e322c22070c8c3fb43b2d22ebfa54a804887/pySPT-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d96957c871bab2e6542b841aa7a2865b", "sha256": "2863a3695a32c732022d07e064d777c9c18de35cafb8a3146a6b4c04d985895a" }, "downloads": -1, "filename": "pySPT-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d96957c871bab2e6542b841aa7a2865b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 173337, "upload_time": "2018-01-22T16:44:53", "url": "https://files.pythonhosted.org/packages/27/d6/0b9ac4990495d0b7526840aa6136e94ff3e895aaf7a3bb02318dd0110509/pySPT-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d96957c871bab2e6542b841aa7a2865b", "sha256": "2863a3695a32c732022d07e064d777c9c18de35cafb8a3146a6b4c04d985895a" }, "downloads": -1, "filename": "pySPT-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d96957c871bab2e6542b841aa7a2865b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 173337, "upload_time": "2018-01-22T16:44:53", "url": "https://files.pythonhosted.org/packages/27/d6/0b9ac4990495d0b7526840aa6136e94ff3e895aaf7a3bb02318dd0110509/pySPT-0.1.1.tar.gz" } ] }