{ "info": { "author": "Scott J. Maddox", "author_email": "smaddox@utexas.edu", "bugtrack_url": null, "classifiers": [], "description": "Fermi-Dirac Integrals (FDINT)\n=============================\n\nFDINT is a free, open-source python package that provides fast, double\nprecision (64-bit floating point) approximations to the Fermi-Dirac\nintegrals of integer and half integer order, based on the work by\nProf. Fukushima [1-3]. FDINT is written predominantly in Cython_, which\nis compiled to native code through an intermediate C source, resulting\nin C-like performance.\n\n.. [1] T. Fukushima, \"Precise and fast computation of Fermi-Dirac integral of\n integer and half integer order by piecewise minimax rational approximation,\"\n Applied Mathematics and Computation, vol. 259, pp. 708-729, May 2015.\n DOI: 10.1016/j.amc.2015.03.009\n\n.. [2] T. Fukushima, \"Precise and fast computation of inverse Fermi-Dirac\n integral of order 1/2 by minimax rational function approximation,\"\n Applied Mathematics and Computation, vol. 259, pp. 698-707, May 2015.\n DOI: 10.1016/j.amc.2015.03.015\n \n.. [3] T. Fukushima, \"Precise and fast computation of generalized Fermi-Dirac\n integral by parameter polynomial approximation,\" 2014.\n DOI: 10.13140/2.1.1094.6566\n\nThe `source code`_ and `documentation`_ (coming soon) are graciously hosted\nby GitHub.\n\nInstallation\n============\n\nIn order to use FDINT, you must have a working `Python`_ distribution\ninstalled. Python 3 support has not yet been tested, so Python 2.7 is\nsuggested. You will also need to install `Numpy`_ before proceeding. If\nyou're not familiar with Python, you might consider installing a\n`Python distribution`_ that comes prepackaged with Numpy.\n\nFrom PyPi\n---------\n\nThis is the recommended method for installing FDINT. `PyPi`_ is the python\npackage index, which contains many python packages that can be easily installed\nwith a single command. To install FDINT from `PyPi`_, open up a command\nprompt and run the following command::\n\n pip install fdint\n\n\nFrom Github\n-----------\n\nTo install the latest release of FDINT from Github, go to the\n`FDINT releases page`_, download the latest ``.zip`` or ``.tar.gz``\nsource package, extract its contents, and run ``python setup.py install``\nfrom within the extracted directory.\n\n\nTesting\n=======\n\nOnce installed, you can test the package by running the following command::\n\n python -m fdint.tests\n\nIf you have Matplotlib_ installed, you can also plot a sample of the\navailable functions by running the following command::\n\n python -m fdint.examples.plot\n\nTutorial\n========\n\nFirst, start up an interactive python shell from the command line::\n\n $ python\n\nNext, import everything from the ``fdint`` package::\n\n >>> from fdint import *\n\nNow you can access the Fermi-Dirac integral and derivative convenience\nfunctions, ``fdk`` and ``dfdk``::\n\n >>> fdk(k=0.5,phi=-10)\n 4.0233994366893939e-05\n >>> fdk(0.5,-10)\n 4.0233994366893939e-05\n >>> fdk(k=0.5,phi=5)\n 7.837976057293096\n >>> fdk(k=0.5,phi=50)\n 235.81861512588432\n >>> dfdk(k=0.5,phi=-10) # first derivative\n 4.0233348580568672e-05\n\nYou can also pass in numpy arrays as phi::\n\n >>> import numpy\n >>> fdk(k=0.5,phi=numpy.linspace(-100,10,3))\n array([ 3.29683149e-44, 2.53684104e-20, 2.13444715e+01])\n\nIf you request an order or derivative that is not implemented, a\nNotImplementedError is raised::\n\n >>> fdk(1,0)\n Traceback (most recent call last):\n File \"\", line 1, in \n File \"fdint/__init__.py\", line 50, in fdk\n raise NotImplementedError()\n NotImplementedError\n\nFor semiconductor calculations, ``parabolic``, ``dparabolic``, ``iparabolic``,\n``nonparabolic``, and ``dnonparabolic`` are provided::\n\n >>> parabolic(0)\n 0.7651470246254078\n >>> dparabolic(0)\n 0.6048986434216304\n >>> iparabolic(.7)\n -0.11156326391089397\n >>> nonparabolic(0,0)\n 0.7651470705342294\n >>> nonparabolic(0,0.07) # InAs\n 1.006986898726782\n >>> dnonparabolic(0,0.07) # InAs\n 0.8190058991462952\n\nBenchmarks\n==========\n\nBelow are a few benchmarking runs. First, ``numpy.exp``::\n\n $ python -m timeit -s \"import numpy; from numpy import exp; x=numpy.linspace(-100,10,10000)\" \"exp(x)\"\n 10000 loops, best of 3: 72.6 usec per loop\n\nThe same arguments to the Fermi-Dirac integral of order k=1/2, ``fdint.fd1h``,\ntakes only ~2.2x the runtime::\n\n $ python -m timeit -s \"from fdint import fd1h; import numpy; x=numpy.linspace(-100,10,10000)\" \"fd1h(x)\"\n 10000 loops, best of 3: 158 usec per loop\n\nSimilarly, the inverse Fermi-Dirac integral of order k=1/2, ``fdint.ifd1h``,\ntakes only ~2.4x the runtime of ``numpy.log``::\n\n $ python -m timeit -s \"import numpy; from numpy import exp,log; x=numpy.linspace(-100,10,10000);y=exp(x)\" \"log(y)\"\n 10000 loops, best of 3: 69.9 usec per loop\n $ python -m timeit -s \"from fdint import fd1h,ifd1h; import numpy; x=numpy.linspace(-100,10,10000);y=fd1h(x)\" \"ifd1h(y)\"\n 10000 loops, best of 3: 178 usec per loop\n \nThe generalized Fermi-Dirac integrals are also quite fast. For order\nk=1/2 with zero nonparabolicity, ``fdint.gfd1h`` takes only ~3.7x the runtime\nof ``numpy.exp`` for zero nonparabolicity::\n\n $ python -m timeit -s \"from fdint import gfd1h; import numpy; x=numpy.linspace(-100,10,10000);b=numpy.zeros(10000);b.fill(0.)\" \"gfd1h(x,b)\"\n 1000 loops, best of 3: 266 usec per loop\n\nHowever, if there is significant nonparabolicity, ``fdint.gfd1h`` can take a\nup to ~10x longer than ``numpy.exp``::\n\n $ python -m timeit -s \"from fdint import gfd1h; import numpy; x=numpy.linspace(-100,10,10000);b=numpy.zeros(10000);b.fill(0.1)\" \"gfd1h(x,b)\"\n 1000 loops, best of 3: 467 usec per loop\n\n $ python -m timeit -s \"from fdint import gfd1h; import numpy; x=numpy.linspace(-100,10,10000);b=numpy.zeros(10000);b.fill(0.3)\" \"gfd1h(x,b)\"\n /usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/timeit.py:6: RuntimeWarning: gfd1h: less than 24 bits of accuracy\n 1000 loops, best of 3: 696 usec per loop\n\nThe full calculation for a nonparabolic band takes ~5-17x longer than\n``numpy.exp``, depending on the level of nonparabolicity (Note: for\nsome reason the timing for this command is unreasonably high when timed\nfrom the command line. When timed inside of ipython, it works fine)::\n\n $ ipython\n In [1]: from fdint import *\n \n In [2]: import numpy\n \n In [3]: phi = numpy.linspace(-100,10,10000)\n \n In [4]: %timeit numpy.exp(phi)\n 10000 loops, best of 3: 72.9 \u00b5s per loop\n \n In [5]: %timeit parabolic(phi)\n 10000 loops, best of 3: 165 \u00b5s per loop\n \n In [6]: alpha = numpy.empty(10000); alpha.fill(0.0) # parabolic\n \n In [7]: %timeit nonparabolic(phi, alpha)\n 1000 loops, best of 3: 346 \u00b5s per loop\n \n In [8]: alpha = numpy.empty(10000); alpha.fill(0.07) # InAs\n \n In [9]: %timeit nonparabolic(phi, alpha)\n 1000 loops, best of 3: 695 \u00b5s per loop\n \n In [10]: alpha = numpy.empty(10000); alpha.fill(0.15) # InSb\n \n In [11]: %timeit nonparabolic(phi, alpha)\n /usr/local/bin/ipython:257: RuntimeWarning: nonparabolic: less than 24 bits of accuracy\n 1000 loops, best of 3: 1.26 ms per loop\n\nDocumentation\n=============\n\nThe `documentation`_ (coming soon) is graciously hosted by GitHub.\n\n.. _`source code`: http://github.com/scott-maddox/fdint\n.. _`documentation`: http://scott-maddox.github.io/fdint\n.. _`PyPi`: http://pypi.python.org/pypi\n.. _`Python`: https://www.python.org/download/\n.. _`Cython`: http://docs.cython.org/src/quickstart/install.html\n.. _`Numpy`: http://docs.scipy.org/doc/numpy/user/install.html\n.. _`matplotlib`: http://matplotlib.org/users/installing.html\n.. _`Python distribution`: https://www.scipy.org/install.html#scientific-python-distributions\n.. _`FDINT releases page`: http://github.com/scott-maddox/fdint/releases/latest", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://scott-maddox.github.io/fdint", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "fdint", "package_url": "https://pypi.org/project/fdint/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/fdint/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://scott-maddox.github.io/fdint" }, "release_url": "https://pypi.org/project/fdint/2.0.2/", "requires_dist": null, "requires_python": null, "summary": "A free, open-source python package for quickly and precisely approximating Fermi-Dirac integrals.", "version": "2.0.2" }, "last_serial": 2669710, "releases": { "1.0": [ { "comment_text": "built for Darwin-13.4.0", "digests": { "md5": "f8b9d32f2dd4a410b5e80fef04614cf0", "sha256": "a5f2daf23cc0116de13e26539875fd0a8707e4e8e53d69f9e3287f380320fdb5" }, "downloads": -1, "filename": "fdint-1.0.macosx-10.9-x86_64.tar.gz", "has_sig": false, "md5_digest": "f8b9d32f2dd4a410b5e80fef04614cf0", "packagetype": "bdist_dumb", "python_version": "2.7", "requires_python": null, "size": 122327, "upload_time": "2015-04-23T22:44:08", "url": "https://files.pythonhosted.org/packages/ef/8d/0cf869bd2ad1e3fbd839a9cac6827434574ae387342cdb9f30ddc90147ca/fdint-1.0.macosx-10.9-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "9109e661919dd5184ce5db2de07eba27", "sha256": "c10f8e28756eb17188053066c14aeb1a0c719ebb07ce107c83e466ee286c6b4b" }, "downloads": -1, "filename": "fdint-1.0.tar.gz", "has_sig": false, "md5_digest": "9109e661919dd5184ce5db2de07eba27", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 78769, "upload_time": "2015-04-23T22:44:02", "url": "https://files.pythonhosted.org/packages/16/a1/ae76d0e5af6ad03c787d3603a7b9a392ecc1e60bb24b346ca0207edd0b7d/fdint-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "ca869359d9a50522d6bfe6ca997b64e9", "sha256": "80c7896dedc6c80bcb0294954cffae9210502c8e6f6e25a753e03ad9e11db845" }, "downloads": -1, "filename": "fdint-1.0.1.tar.gz", "has_sig": false, "md5_digest": "ca869359d9a50522d6bfe6ca997b64e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 78773, "upload_time": "2015-04-24T02:55:12", "url": "https://files.pythonhosted.org/packages/ff/ec/f88a2649da4e147046880159fe43b1ffcd7b3df6e7240e7190a2f7615e66/fdint-1.0.1.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "969c0a2a9fa32b7e13fb19b6c782c558", "sha256": "98cd913fa9c2a24799092db13d8fdd365197518c79812d3a3bd01bf8b4be1606" }, "downloads": -1, "filename": "fdint-1.1.tar.gz", "has_sig": false, "md5_digest": "969c0a2a9fa32b7e13fb19b6c782c558", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51472, "upload_time": "2015-04-25T20:49:42", "url": "https://files.pythonhosted.org/packages/31/ff/593e0c17edf6a2afec0c77deb25cb26524c1f073e4feda46249aebd6ef66/fdint-1.1.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "9288fb3eab934bead3109758e6c97f31", "sha256": "28b7d44cca728fdfff2fd8b963e3530b0cfe7796c258735d40c7ea5a4b0ff503" }, "downloads": -1, "filename": "fdint-1.1.1.tar.gz", "has_sig": false, "md5_digest": "9288fb3eab934bead3109758e6c97f31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51458, "upload_time": "2015-04-25T21:14:15", "url": "https://files.pythonhosted.org/packages/f3/d4/4b2d77287c500c9c37cfef393db34afc91576c05ba357b70f0ddbd04fbb4/fdint-1.1.1.tar.gz" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "be758523f7ccf6fdad8e24052eee4186", "sha256": "a53a4c6788ab413654d5e427bb38dcd10282296cf9e844c62f1b8eb4aa28e2cd" }, "downloads": -1, "filename": "fdint-2.0.tar.gz", "has_sig": false, "md5_digest": "be758523f7ccf6fdad8e24052eee4186", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 717647, "upload_time": "2015-07-01T03:00:07", "url": "https://files.pythonhosted.org/packages/87/5c/d4ef87cdb2f8625f0aafe844e244c7ffdf8ba32bfa6443ab096bd4881d1d/fdint-2.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "eb827377dca38d792f5776f6fadbb824", "sha256": "535cf57c1afc8725a8d4425d056392d2d4599e3ee8a89841d46c00d4604bd9b7" }, "downloads": -1, "filename": "fdint-2.0.1.tar.gz", "has_sig": false, "md5_digest": "eb827377dca38d792f5776f6fadbb824", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 704065, "upload_time": "2015-11-14T23:49:17", "url": "https://files.pythonhosted.org/packages/af/13/30871d8f6d366fbab4b689dc6ce21020f680e214026a6fc790124e63e3b5/fdint-2.0.1.tar.gz" } ], "2.0.2": [ { "comment_text": "", "digests": { "md5": "f7a918d6ea4b94909151f048255cbc5e", "sha256": "30db139684d362652670e2cd3206b5dd7b3b93b86c3aff37f4b4fd4a3f98aead" }, "downloads": -1, "filename": "fdint-2.0.2.tar.gz", "has_sig": false, "md5_digest": "f7a918d6ea4b94909151f048255cbc5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 704116, "upload_time": "2017-02-26T22:48:11", "url": "https://files.pythonhosted.org/packages/e3/ef/95b0a2072880079ad0d9f6a67109644ad59716b692264554e67427a4fba9/fdint-2.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f7a918d6ea4b94909151f048255cbc5e", "sha256": "30db139684d362652670e2cd3206b5dd7b3b93b86c3aff37f4b4fd4a3f98aead" }, "downloads": -1, "filename": "fdint-2.0.2.tar.gz", "has_sig": false, "md5_digest": "f7a918d6ea4b94909151f048255cbc5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 704116, "upload_time": "2017-02-26T22:48:11", "url": "https://files.pythonhosted.org/packages/e3/ef/95b0a2072880079ad0d9f6a67109644ad59716b692264554e67427a4fba9/fdint-2.0.2.tar.gz" } ] }