{ "info": { "author": "Adam Birdsall", "author_email": "abirdsall@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Topic :: Scientific/Engineering :: Atmospheric Science", "Topic :: Scientific/Engineering :: Chemistry", "Topic :: Scientific/Engineering :: Physics" ], "description": "# popmodel\r\n\r\n[![Build Status](https://travis-ci.org/awbirdsall/popmodel.svg?branch=master)](https://travis-ci.org/awbirdsall/popmodel)\r\n\r\nPython package to calculate the population of molecules in particular quantum states using a master equation approach. Designed for (and currently only usable) for excitation of the hydroxyl radical (OH) to one excited vibrational state and one excited electronic state, with two different lasers, and up to four vibronic states being tracked.\r\n\r\nThis represents a slow accumulation of calculations I've needed to do for a research project, and would need some work to become more generalized.\r\n\r\n## Capabilities\r\n\r\n- Extract absorption feature information (upper/lower states, energy gap, degeneracies, Einstein coefficients, ...) from a HITRAN-type file using `loadhitran`. (Vibrational lines of OH only, with limited parsing of H2O.)\r\n- Calculate shape of absorption feature from Doppler and pressure broadening (`absprofile.AbsProfile` object).\r\n- Automatically define fast modulation of narrow laser linewidth over broadened absorption feature (`sweep.Sweep` object).\r\n- Solve system of ODEs to calculate population in each state over time. Processes included in the ODEs are stimulated absorption/emission, spontaneous emission, and lambda doublet/rotational/vibrational/electronic relaxation (`main.KineticsRun` object).\r\n- Create `matplotlib` figures of populations or laser frequency over time; create figure of infrared absorption feature (`main.KineticsRun.[...]figure()` functions).\r\n- convenience unit conversion functions related to atmospheric science (`atmcalcs`)\r\n- constants and functions related to OH spectroscopy (`ohcalcs`)\r\n\r\nThe core of `popmodel` is the `KineticsRun` object. Each `KineticsRun` instance requires dictionaries of parameters describing rates of spectroscopic transitions, lasers, detection cell, transition lines, and ODE integration. The expected dictionary format is designed for extraction from a YAML file and compatible with command line use.\r\n\r\n## Required input files\r\n\r\n### Hitran file\r\n\r\nInfrared line parameters are extracted from the 140-character-format HITRAN 2012 file for OH (default filename `13_hit12.par`), which can be accessed at https://www.cfa.harvard.edu/HITRAN/. Some low-level functions within `loadhitran` module can also read other molecules' HITRAN files, but trying to go through the full workflow called by `loadhitran.processhitran()` used in setting up a `KineticsRun` will not work due to the need to parse strings describing molecule-specific term descriptions. See the HITRAN website for more documentation related to the record format.\r\n\r\nAn 200-line excerpt from the OH HITRAN file is included at `src/popmodel/data/hitran_sample.par` for use by the test module. To extract the path to `hitran_sample.par`:\r\n\r\n~~~\r\nfrom pkg_resources import resource_filename\r\nhpath = resource_filename('popmodel','data/hitran_sample.par')\r\n~~~\r\n\r\n### YAML parameter file\r\n\r\nParameters for setting up a `KineticsRun` instance are organized in dictionaries corresponding to a YAML parameter file. A template for the format that the YAML file must follow can be found at `src/popmodel/data/parameters_template.yaml`.\r\n\r\nTo extract the path to `parameters_template.yaml` within `popmodel`:\r\n\r\n~~~\r\nfrom pkg_resources import resource_filename\r\nyamlpath = resource_filename('popmodel','data/parameters_template.yaml')\r\n~~~\r\n\r\n## Example usage\r\n\r\n### Command line\r\n\r\nInstallation using `pip` creates command-line command `popmodel`. Format of command line arguments: `HITFILE PARAMETERS [-l] LOGFILE [-c] CSVOUTPUT [-i] IMAGE [-v]`\r\n\r\nFor example:\r\n\r\n~~~\r\npopmodel 13_hit12.par parameters.yaml -l output.log -c output.csv -i output.png\r\n~~~\r\n\r\n### Python session\r\n\r\nBasic usage:\r\n\r\n~~~\r\nimport popmodel as pm\r\npm.add_streamhandler() # optional, print logging.INFO to screen\r\npm.add_filehandler(\"path/to.log\") # optional, write logging.INFO to file\r\npar = pm.importyaml(\"path_to/yaml/parameters.yaml\")\r\nhpar = pm.loadhitran.processhitran(\"path_to/13_hit12.par\")\r\nk = pm.KineticsRun(hpar,**par)\r\nk.solveode()\r\nk.popsfigure()\r\n~~~\r\n\r\n## Installation\r\n\r\n`pip install popmodel` install from PyPI\r\n\r\n`pip install git+https://github.com/awbirdsall/popmodel` installs most recent commit on github\r\n\r\n## Dependencies\r\n\r\nTested for Python 2.7 and 3.5.\r\n\r\nRequires `numpy`, `scipy`, `pandas`, `pyyaml` and `matplotlib>=1.5` (automatically handled if using `pip` to install).\r\n\r\nTests written using `pytest` using the [`pytest-mpl` plugin](https://github.com/astrofrog/pytest-mpl).\r\n\r\nDeveloped in a Windows environment.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/awbirdsall/popmodel", "keywords": "spectroscopy,fluorescence,model,chemistry,atmosphere", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "popmodel", "package_url": "https://pypi.org/project/popmodel/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/popmodel/", "project_urls": { "Homepage": "https://github.com/awbirdsall/popmodel" }, "release_url": "https://pypi.org/project/popmodel/0.4.0/", "requires_dist": [ "matplotlib (>=1.5)", "numpy", "pandas", "pyyaml", "scipy" ], "requires_python": "", "summary": "Model molecular excited state populations over time", "version": "0.4.0" }, "last_serial": 2060208, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "ab77b0b5d2235a74ef3568b65a4ecabe", "sha256": "1eb4041206f0cdcb15d7e9946bce2617b40daa0746990606d2ab6d27071d071d" }, "downloads": -1, "filename": "popmodel-0.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "ab77b0b5d2235a74ef3568b65a4ecabe", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 34122, "upload_time": "2015-06-24T21:53:03", "url": "https://files.pythonhosted.org/packages/e7/9e/283cebcec4d0603c6345d7f9868267c37d431d869d1838ca375431f0d44e/popmodel-0.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c264de4cb48b0b5d3b6b389e11428373", "sha256": "ea23a724cb764a03eff6d286773c2c58a9eedd15bf806054d9873ada1ea0ee8d" }, "downloads": -1, "filename": "popmodel-0.0.1.zip", "has_sig": false, "md5_digest": "c264de4cb48b0b5d3b6b389e11428373", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36899, "upload_time": "2015-06-24T21:52:59", "url": "https://files.pythonhosted.org/packages/a1/ee/27db12ce0c68702b5c83c0bfed9c7d045f1a7162060c7c1e70eee9e629f3/popmodel-0.0.1.zip" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "6f8219bb3e99d648e51de50681244a29", "sha256": "00fe7acd892f946b424bba70024c54056d36c1999f7237dc11658697bf54be51" }, "downloads": -1, "filename": "popmodel-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "6f8219bb3e99d648e51de50681244a29", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 48618, "upload_time": "2015-08-18T13:34:42", "url": "https://files.pythonhosted.org/packages/2e/b4/571505c161581d8066c9800356217e7531902f6ee918d5cae5b0e869cb86/popmodel-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ae5d318faa97f6a2a61c7b13aa2069cc", "sha256": "bea774ccb34f6351178a50800b7393d667dd4f8d729c78b70dd7be14e472f4d4" }, "downloads": -1, "filename": "popmodel-0.1.0.zip", "has_sig": false, "md5_digest": "ae5d318faa97f6a2a61c7b13aa2069cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51672, "upload_time": "2015-08-18T13:34:38", "url": "https://files.pythonhosted.org/packages/20/c0/25245059abb982b825ce6d80d9e834e6b71cd87d045b63d38663005e0269/popmodel-0.1.0.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "21bd650651f5996332e0eab2bcf799b7", "sha256": "c37774ccefd9cdeb844484ab781808f88f91a9ebfdaca4de8fab0c82c26c2509" }, "downloads": -1, "filename": "popmodel-0.1.1-py2-none-any.whl", "has_sig": false, "md5_digest": "21bd650651f5996332e0eab2bcf799b7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 49010, "upload_time": "2015-08-19T17:54:55", "url": "https://files.pythonhosted.org/packages/97/fc/fdc7660dc54ebc5f6caf172f01794c47f7ed09847a0c3c6d3f97ea4061e8/popmodel-0.1.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "05df98cc1be6eb9d85d8d3f93834ce02", "sha256": "45d9ce70eda5cd4fb21777cc92eeef57b7c5a24c38bb8c0d44df652e625785bb" }, "downloads": -1, "filename": "popmodel-0.1.1.zip", "has_sig": false, "md5_digest": "05df98cc1be6eb9d85d8d3f93834ce02", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 52090, "upload_time": "2015-08-19T17:54:51", "url": "https://files.pythonhosted.org/packages/70/c5/51564d93964348d2d4d87c264a3f0cfde62cd4d466ed3ec91dd54ed128bd/popmodel-0.1.1.zip" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "fc1062ec8006a0a41f61b165e2452670", "sha256": "e7ca1a42c7b313b1d97ad49c6e418580024f731276bd3ca1eb14ea634537ac06" }, "downloads": -1, "filename": "popmodel-0.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "fc1062ec8006a0a41f61b165e2452670", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 49667, "upload_time": "2015-10-19T17:24:26", "url": "https://files.pythonhosted.org/packages/2b/af/eb69268ab4b4354f436743990a866d12d7210f14990cc96b4faa905264dd/popmodel-0.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "649178909a2e1cee589e0db2ab502190", "sha256": "38e7ebe1c4c1c72167a41afe21109d3daa9760fa92dea779a6bfbc35a1390880" }, "downloads": -1, "filename": "popmodel-0.2.0.zip", "has_sig": false, "md5_digest": "649178909a2e1cee589e0db2ab502190", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 52759, "upload_time": "2015-10-19T17:24:21", "url": "https://files.pythonhosted.org/packages/06/c9/7d268a6291b28020dbaadc3e82e3273136b693862aef966570281221534d/popmodel-0.2.0.zip" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "84bcd38bdf321d4d870b0413018e5e4c", "sha256": "d6588fd8499aec4f779ae0d22ffd786df5c503328a8482562f35bebc58f3898b" }, "downloads": -1, "filename": "popmodel-0.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "84bcd38bdf321d4d870b0413018e5e4c", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 49732, "upload_time": "2015-11-05T17:36:36", "url": "https://files.pythonhosted.org/packages/b6/2a/5fe3f3e80bcba38c1c2b69aed300d798caf13379bc3677cde7deffef884a/popmodel-0.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "21ee804827717a05e97af583411c6719", "sha256": "008f8d27bd0e3b6d670ba7812e5bc74d54348f184b35c78b7b4c3f709cd8a448" }, "downloads": -1, "filename": "popmodel-0.3.0.zip", "has_sig": false, "md5_digest": "21ee804827717a05e97af583411c6719", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 52831, "upload_time": "2015-11-05T17:36:29", "url": "https://files.pythonhosted.org/packages/96/c2/10f5c9debc878f4dceb7f1260188ec577160ebaeac5972395553b223854a/popmodel-0.3.0.zip" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "0aed77fbf4de5b6381637a6aef02bfc6", "sha256": "7308dc5fb74221cfb59e9bb047cb40dc3a7565064d8c99686604c967a8ece629" }, "downloads": -1, "filename": "popmodel-0.3.1-py2-none-any.whl", "has_sig": false, "md5_digest": "0aed77fbf4de5b6381637a6aef02bfc6", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 49772, "upload_time": "2016-01-07T18:50:05", "url": "https://files.pythonhosted.org/packages/c2/41/f4aadb3ee37e2b0167fe55e3c98049e16d2de84667eafc5ccb7fd50f2616/popmodel-0.3.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3cae9d9e3618a2a6f8f302b3d7a662a5", "sha256": "079d7b057605bc2590cfbe06b187e77fdf41a166d84d90126958af19d168782c" }, "downloads": -1, "filename": "popmodel-0.3.1.zip", "has_sig": false, "md5_digest": "3cae9d9e3618a2a6f8f302b3d7a662a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 52861, "upload_time": "2016-01-07T18:50:18", "url": "https://files.pythonhosted.org/packages/c0/b5/102bcb466517ba3a741191d2f1ce5f28243b8596979b6b5becbb4d02fcb0/popmodel-0.3.1.zip" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "5a9a1d54abff387e8de985d156f9ba96", "sha256": "9544bd3ee92abe732d00c145bf348cddbee669a5d0e9b598b72a14e53d6bc90c" }, "downloads": -1, "filename": "popmodel-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5a9a1d54abff387e8de985d156f9ba96", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 50011, "upload_time": "2016-04-12T15:35:40", "url": "https://files.pythonhosted.org/packages/6b/30/c573281976e0d9978440e5c049429ab6746ce13e9dbc8a0dca879b2d8e45/popmodel-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "24e959e02484a63964ee2dc718c8acf8", "sha256": "95a1056ac1b21bf83fd61e047984f1fe8851ee95c9db2cd7ba51fa9e309865b1" }, "downloads": -1, "filename": "popmodel-0.4.0.zip", "has_sig": false, "md5_digest": "24e959e02484a63964ee2dc718c8acf8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 53144, "upload_time": "2016-04-12T15:35:47", "url": "https://files.pythonhosted.org/packages/88/48/cabb1f25d802850e543853953177d594cb3dfbe07f1607028f7bc35c6482/popmodel-0.4.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5a9a1d54abff387e8de985d156f9ba96", "sha256": "9544bd3ee92abe732d00c145bf348cddbee669a5d0e9b598b72a14e53d6bc90c" }, "downloads": -1, "filename": "popmodel-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5a9a1d54abff387e8de985d156f9ba96", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 50011, "upload_time": "2016-04-12T15:35:40", "url": "https://files.pythonhosted.org/packages/6b/30/c573281976e0d9978440e5c049429ab6746ce13e9dbc8a0dca879b2d8e45/popmodel-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "24e959e02484a63964ee2dc718c8acf8", "sha256": "95a1056ac1b21bf83fd61e047984f1fe8851ee95c9db2cd7ba51fa9e309865b1" }, "downloads": -1, "filename": "popmodel-0.4.0.zip", "has_sig": false, "md5_digest": "24e959e02484a63964ee2dc718c8acf8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 53144, "upload_time": "2016-04-12T15:35:47", "url": "https://files.pythonhosted.org/packages/88/48/cabb1f25d802850e543853953177d594cb3dfbe07f1607028f7bc35c6482/popmodel-0.4.0.zip" } ] }