{ "info": { "author": "Patricio Cubillos", "author_email": "patricio.cubillos@oeaw.ac.at", "bugtrack_url": null, "classifiers": [], "description": "# repack\nRepack and Compress Line-transition Data for Radiative-tranfer Calculations\n\n[![Build Status](https://travis-ci.com/pcubillos/repack.svg?branch=master)](https://travis-ci.com/pcubillos/repack)\n[![PyPI](https://img.shields.io/pypi/v/lbl-repack.svg)](https://pypi.org/project/lbl-repack)\n[![GitHub](https://img.shields.io/github/license/pcubillos/repack.svg?color=blue)](https://github.com/pcubillos/repack/blob/master/LICENSE)\n\nThis code identifies the strong lines that dominate the spectrum from\nthe large-majority of weaker lines. The code returns a binary\nline-by-line (LBL) file with the strong lines info (wavenumber, Elow,\ngf, and isotope ID), and an ascii file with the combined contribution\nof the weaker lines compressed into a continuum extinction coefficient\n(in cm-1 amagat-1) as function of wavenumber and temperature.\n\nCurrently available databases:\n* ExoMol (http://www.exomol.com/)\n* HITRAN (https://www.cfa.harvard.edu/hitran/)\n* Kurucz's TiO (http://kurucz.harvard.edu/molecules/tio)\n\n### Team Members\n* [Patricio Cubillos](https://github.com/pcubillos/) (IWF) \n\n### Install\n``repack`` has been [tested](https://travis-ci.com/pcubillos/repack) to work on Python 2.7, 3.6, and 3.7; and runs (at least) in both Linux and OSX. You can install ``repack`` from the terminal with pip:\n\n```shell\n# Note that on PyPI ``repack``is indexed as ``lbl-repack``:\npip install lbl-repack\n```\n\nAlternative (for conda users or for developers), you can directly\ndowload the source code and install to your local machine with the\nfollowing terminal commands:\n\n```shell\ngit clone https://github.com/pcubillos/repack/\ncd repack\npython setup.py install\n```\n\n### Getting Started\n\nThe following example compresses the Exomol HCN line-transition data. First, download the ExoMol HCN dataset (there is no need to unzip the files):\n\n```shell\n# Download ExoMol HCN data:\nwget http://exomol.com/db/HCN/1H-12C-14N/Harris/1H-12C-14N__Harris.states.bz2\nwget http://exomol.com/db/HCN/1H-12C-14N/Harris/1H-12C-14N__Harris.trans.bz2\nwget http://exomol.com/db/HCN/1H-12C-14N/Harris/1H-12C-14N__Harris.pf\nwget http://exomol.com/db/HCN/1H-13C-14N/Larner/1H-13C-14N__Larner.states.bz2\nwget http://exomol.com/db/HCN/1H-13C-14N/Larner/1H-13C-14N__Larner.trans.bz2\nwget http://exomol.com/db/HCN/1H-13C-14N/Larner/1H-13C-14N__Larner.pf\n```\n\nThen create a repack configuration file ('*repack_HCN.cfg*') like this below:\n\n```shell\n[REPACK]\n\n# Line-transition files:\nlblfiles = 1H-12C-14N__Harris.trans.bz2\n 1H-13C-14N__Larner.trans.bz2\n\n# Database type [exomol, hitran, or kurucz]:\ndbtype = exomol\n\n# Output file name (without file extension):\noutfile = HCN_exomol_0.3-33um_500-3000K\n\n# Wavenumber boundaries and sampling rate (in cm-1):\nwnmin = 303.0\nwnmax = 33334.0\ndwn = 1.0\n\n# Temperature sampling:\ntmin = 500.0\ntmax = 3000.0\ndtemp = 100.0\n\n# Line-intensity threshold for strong/weak lines:\nsthresh = 0.1\n\n# Maximum chunk size of lines to handle at a time:\nchunksize = 15000000\n```\n\nAnd run ``repack``, which will produce the following screen output:\n```shell\n# Call the repack command-line executable for the HCN demo config file:\nrepack repack_HCN.cfg\n\n::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n repack: line-transition data compression.\n Version 1.2.8.\n Copyright (c) 2017-2019 Patricio Cubillos.\n repack is open-source software under the MIT license.\n::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n\n\nStarting: Sun Jul 7 19:52:28 2019\nUnzipping: '1H-12C-14N__Harris.trans.bz2'.\nUnzipping: '1H-13C-14N__Larner.trans.bz2'.\nReading: '1H-12C-14N__Harris.trans.bz2'.\nReading: '1H-13C-14N__Larner.trans.bz2'.\n Flagging lines at 500 K (chunk 1/5):\n Compression rate: 98.13%, 247,715/13,241,389 lines.\n Flagging lines at 3000 K:\n Compression rate: 96.17%, 506,751/13,241,389 lines.\n Total compression rate: 95.11%, 648,132/13,241,389 lines.\n\n...\n\n Flagging lines at 500 K (chunk 5/5):\n Compression rate: 96.94%, 401,033/13,089,891 lines.\n Flagging lines at 3000 K:\n Compression rate: 93.09%, 904,262/13,089,891 lines.\n Total compression rate: 91.42%, 1,122,911/13,089,891 lines.\n\nWith a threshold strength factor of 0.1,\nkept a total of 3,009,610 line transitions out of 65,586,274 lines.\n\nSuccessfully rewriten exomol line-transition info into:\n 'HCN_exomol_0.3-33um_500-3000K_lbl.dat' and\n 'HCN_exomol_0.3-33um_500-3000K_continuum.dat'.\nEnd: Sun Jul 7 19:59:59 2019\n```\n\nThe output binary file '*HCN_exomol_0.3-33um_500-3000K_lbl.dat*'\ncontains the line-by-line opacity information for HCN, which represent\nmost of the opacity contribution into the spectrum. The information\nis encoded as a sequence of three doubles and an integer containing\nthe wavenumber (in cm-1), lower-state energy (in cm-1 units),\ngf value, and isotope index, respectively, for each transition. This\ninfo can be easily read with the following python script:\n\n```python\nimport repack.utils as u\nwn, elow, gf, iiso = u.read_lbl('HCN_exomol_0.3-33um_500-3000K_lbl.dat')\n```\n\nThe output ascii file '*HCN_exomol_0.3-33um_500-3000K_continuum.dat*'\ncontains the remaining opacity contribution of the weak lines (in cm-1\namagat-1 units) as function of wavenumber and temperature. This is a\nminor contribution compared to that of the LBL output file.\n\n\n### Be Kind\n\nPlease, be kind and acknowledge the effort of the authors by citing the article asociated to this project: \n\n [Cubillos (2017): An Algorithm to Compress Line-transition Data for Radiative-transfer Calculations](http://adsabs.harvard.edu/abs/2017ApJ...850...32C), ApJ 850, 32. \n\n\n### License\n\nCopyright (c) 2017-2019 Patricio Cubillos and contributors.\n``repack`` is open-source software under the MIT license (see [LICENSE](https://github.com/pcubillos/repack/blob/master/LICENSE)).", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pcubillos/repack", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "lbl-repack", "package_url": "https://pypi.org/project/lbl-repack/", "platform": "", "project_url": "https://pypi.org/project/lbl-repack/", "project_urls": { "Homepage": "https://github.com/pcubillos/repack" }, "release_url": "https://pypi.org/project/lbl-repack/1.3.0/", "requires_dist": null, "requires_python": "", "summary": "A line-transition data compression package.", "version": "1.3.0" }, "last_serial": 5511283, "releases": { "1.3.0": [ { "comment_text": "", "digests": { "md5": "7cf6fdd9fa63b7225bece1e9c7c794e3", "sha256": "b0c4ca4cd93e1d8732f22b2e3684648c1f59cc890d52edb591a55497d90b77de" }, "downloads": -1, "filename": "lbl-repack-1.3.0.tar.gz", "has_sig": false, "md5_digest": "7cf6fdd9fa63b7225bece1e9c7c794e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 58374, "upload_time": "2019-07-10T10:30:14", "url": "https://files.pythonhosted.org/packages/aa/92/ce1a91987971ac76bfa7bae4f1cce4e27bab9a9c5aba5fe1f97ac57b9252/lbl-repack-1.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7cf6fdd9fa63b7225bece1e9c7c794e3", "sha256": "b0c4ca4cd93e1d8732f22b2e3684648c1f59cc890d52edb591a55497d90b77de" }, "downloads": -1, "filename": "lbl-repack-1.3.0.tar.gz", "has_sig": false, "md5_digest": "7cf6fdd9fa63b7225bece1e9c7c794e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 58374, "upload_time": "2019-07-10T10:30:14", "url": "https://files.pythonhosted.org/packages/aa/92/ce1a91987971ac76bfa7bae4f1cce4e27bab9a9c5aba5fe1f97ac57b9252/lbl-repack-1.3.0.tar.gz" } ] }