{ "info": { "author": "Eduardo Rodrigues", "author_email": "eduardo.rodrigues@cern.ch", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering" ], "description": "hepunits: units and constants in the HEP system of units\n========================================================\n\n.. image:: https://dev.azure.com/scikit-hep/HepUnits/_apis/build/status/scikit-hep.hepunits?branchName=master\n :alt: Build Status\n :target: https://dev.azure.com/scikit-hep/hepunits/_build/latest?definitionId=5?branchName=master\n\n.. image:: https://img.shields.io/azure-devops/coverage/scikit-hep/HepUnits/5.svg\n :alt: Coverage\n :target: https://dev.azure.com/scikit-hep/HepUnits/_build/latest?definitionId=5?branchName=master\n\n.. image:: https://img.shields.io/azure-devops/tests/scikit-hep/HepUnits/5.svg\n :alt: Tests\n :target: https://dev.azure.com/scikit-hep/HepUnits/_build/latest?definitionId=5?branchName=master\n\n\n``hepunits`` collects the most commonly used units and constants in the\nHEP System of Units, as derived from the basic units originally defined by the `CLHEP`_ project,\nwhich are *not* the same as the SI system of units:\n\n =================== ================== ====\n Quantity Name Unit\n =================== ================== ====\n Length millimeter mm\n Time nanosecond ns\n Energy Mega electron Volt MeV\n Positron charge eplus\n Temperature kelvin K\n Amount of substance mole mol\n Luminous intensity candela cd\n Plane angle radian rad\n Solid angle steradian sr\n =================== ================== ====\n\n\nIt is largely based on the international system of units (`SI`_)\n\n =================== ======== ====\n Quantity Name Unit\n =================== ======== ====\n Length meter m\n Time second s\n Mass kilogram kg\n Electric current ampere A\n Temperature kelvin K\n Amount of substance mole mol\n Luminous intensity candela cd\n =================== ======== ====\n\nbut augments it with handy definitions, changing the basic length and time units.\n\n.. _CLHEP: http://proj-clhep.web.cern.ch/proj-clhep/\n.. _SI: http://www.physics.nist.gov/cuu/Units/index.html\n\n\nInstallation\n------------\n\nInstall ``hepunits`` like any other Python package:\n\n.. code-block:: bash\n\n pip install hepunits\n\nor similar (use ``--user``, ``virtualenv``, etc. if you wish).\n\n\nGetting started\n---------------\n\nThe module ``hepunits.constants`` contains 2 sorts of constants:\nphysical constants and commonly used constants.\n\nThe typical usage is the following:\n\n.. code-block:: python\n\n >>> from hepunits.constants import c_light\n >>> from hepunits.units import picosecond, micrometer\n >>> tau_Bs = 1.5 * picosecond # a particle lifetime, say the Bs meson's\n >>> ctau_Bs = c_light * tau_Bs # ctau of the particle, ~450 microns\n >>> print ctau_Bs # result in HEP units, so mm\n 0.449688687\n >>> print ctau_Bs / micrometer # result in micrometers\n 449.688687\n\nTypical usage of the ``hepunits.units`` module:\n\n.. code-block:: python\n\n >>> # add two quantities with length units and get the result in meters\n >>> from hepunits import units as u\n >>> (1 * u.meter + 5 * u.cm) / u.meter\n 1.05\n >>> # the default result is, of course, in HEP units, so mm\n >>> 1 * u.meter + 5 * u.cm\n 1050.0\n\n.. code-block:: python\n\n >>> from hepunits.units import MeV, GeV\n >>> massWindow = 100 * MeV # define a 100 MeV mass window\n >>> def energy_resolution():\n ... # returns the energy resolution of 100 MeV\n ... return 100 * MeV\n ...\n >>> energy_resolution() / GeV # get the energy resolution in GeV\n 0.1\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/scikit-hep/hepunits", "keywords": "HEP,units,constants", "license": "new BSD", "maintainer": "Eduardo Rodrigues", "maintainer_email": "eduardo.rodrigues@cern.ch", "name": "hepunits", "package_url": "https://pypi.org/project/hepunits/", "platform": "Any", "project_url": "https://pypi.org/project/hepunits/", "project_urls": { "Homepage": "https://github.com/scikit-hep/hepunits" }, "release_url": "https://pypi.org/project/hepunits/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Units and constants in the HEP system of units", "version": "1.0.0" }, "last_serial": 5261517, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "4d09c7c27b4eb18aead803a5fe98c0f4", "sha256": "a42021629a5142f51292116442cc17068f6fcb6c3ae6ba0915a6e79c51f4e45c" }, "downloads": -1, "filename": "hepunits-0.1.1.tar.gz", "has_sig": false, "md5_digest": "4d09c7c27b4eb18aead803a5fe98c0f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6869, "upload_time": "2019-01-31T16:37:33", "url": "https://files.pythonhosted.org/packages/1e/f0/7560a770c05d82d8ca36234f80c2c8c14c773a7d1bfa2ce178bd3e369c8e/hepunits-0.1.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "46d543406aec388282cfeb4005eca27c", "sha256": "aa03ec26ba03e9fb15e3b3661241760376441e4436fe4e66c52f4a4acfb97571" }, "downloads": -1, "filename": "hepunits-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "46d543406aec388282cfeb4005eca27c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8733, "upload_time": "2019-05-13T10:11:00", "url": "https://files.pythonhosted.org/packages/21/05/4d944466005ac441642b2a5b7bfeb0ec5322df3171a5f3e1410d936b9212/hepunits-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "db6fc3db6338d65447611c3f55736763", "sha256": "464bf1f09720d4dadcc1875a3998e01ac3b7285c7d6dd55bf0f58282842817c3" }, "downloads": -1, "filename": "hepunits-1.0.0.tar.gz", "has_sig": false, "md5_digest": "db6fc3db6338d65447611c3f55736763", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5854, "upload_time": "2019-05-13T10:11:01", "url": "https://files.pythonhosted.org/packages/3f/fe/b08ab771887bd1dbd1e6c5565d26c5d6e215ea66b5575b520aadcc37c86e/hepunits-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "46d543406aec388282cfeb4005eca27c", "sha256": "aa03ec26ba03e9fb15e3b3661241760376441e4436fe4e66c52f4a4acfb97571" }, "downloads": -1, "filename": "hepunits-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "46d543406aec388282cfeb4005eca27c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8733, "upload_time": "2019-05-13T10:11:00", "url": "https://files.pythonhosted.org/packages/21/05/4d944466005ac441642b2a5b7bfeb0ec5322df3171a5f3e1410d936b9212/hepunits-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "db6fc3db6338d65447611c3f55736763", "sha256": "464bf1f09720d4dadcc1875a3998e01ac3b7285c7d6dd55bf0f58282842817c3" }, "downloads": -1, "filename": "hepunits-1.0.0.tar.gz", "has_sig": false, "md5_digest": "db6fc3db6338d65447611c3f55736763", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5854, "upload_time": "2019-05-13T10:11:01", "url": "https://files.pythonhosted.org/packages/3f/fe/b08ab771887bd1dbd1e6c5565d26c5d6e215ea66b5575b520aadcc37c86e/hepunits-1.0.0.tar.gz" } ] }