Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Cancelled ) Fix for #16, DB stored incorrectly, when data includes iso_id's >=10 #17

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f41d991
Added custom extension support for datafiles and fixed I=(2,0) in TIP…
May 9, 2018
74bdede
Added saveHeader function
RomanKochanov May 15, 2018
f75a784
Removed version string from setup.py
RomanKochanov May 31, 2018
2ebd06c
Added metadata for SF6
RomanKochanov May 31, 2018
1024771
Added metadata for SF6 nad D2O
RomanKochanov Jun 12, 2018
21f8e89
Added metadata for D2O
RomanKochanov Jun 12, 2018
25c15dd
Merge branch 'master' of https://github.com/hitranonline/hapi
RomanKochanov Jun 13, 2018
1e1fc08
Fixed setup script for Python 3
RomanKochanov Jul 11, 2018
96165a5
Fixed line endings in storage2cache and queryHITRAN (riwoodward)
RomanKochanov Jul 13, 2018
48c1706
Added support for non-integer local iso ID values
RomanKochanov Jul 16, 2018
384c2fc
Code cleanup
RomanKochanov Jul 23, 2018
9d26b35
Update README.md
hitranonline Aug 2, 2018
a3629d2
Included dynamic version history into README.md
RomanKochanov Aug 6, 2018
fe3e325
Fixed parameter name case bug and made some minor improvements (RJH)
RomanKochanov Aug 6, 2018
cebe06d
Fixed parameter name case bug and made some minor improvements (RJH)
RomanKochanov Aug 6, 2018
599397d
Merging with remote master branch
RomanKochanov Aug 6, 2018
3307a53
Cast local_iso_id=0 to 10 for carbon dioxide
RomanKochanov Nov 9, 2018
adb542a
Removed additional lines in ISO and ISO_ID
RomanKochanov Nov 9, 2018
dd67347
Using numpy.arrays for numeric columns of LOCAL_TABLE_CACHE
RomanKochanov Nov 9, 2018
cbd95fd
Added descriptions for broadening by H2O
Nov 18, 2018
8622f11
Added descriptions for broadening by H2O
Nov 18, 2018
13cf22f
Merge branch 'master' of https://github.com/hitranonline/hapi
RomanKochanov Nov 18, 2018
5e3b5e7
Patch for water broadenings
RomanKochanov Nov 21, 2018
20def5c
Added proxy support in fetch and fetch_by_ids
RomanKochanov Nov 21, 2018
be9948f
Fixed absolute path bug in table names
RomanKochanov Nov 26, 2018
7d5d3ee
Corrected abundance of the HD isotopologue
RomanKochanov Dec 5, 2018
8e53f64
Version number hotfix
RomanKochanov Dec 5, 2018
f699c62
Added unified interfaces for abscoef and xsc calculations
RomanKochanov Dec 7, 2018
cfa0c13
Added parlists for line mixing
RomanKochanov Nov 14, 2019
ea89c37
fix: DB stored incorrectly, when data includes iso_id's >=10, but onl…
okz Feb 14, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*.pyc
*.bak
build/
dist/
hitran_api.egg-info/
*.pyc
*.bak
build/
dist/
hitran_api.egg-info/
*~
20 changes: 10 additions & 10 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
HITRAN Application Programming Interface (HAPI)

MIT License

Copyright 2018 HITRAN team (http://hitran.org/).

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

HITRAN Application Programming Interface (HAPI)
MIT License
Copyright 2018 HITRAN team (http://hitran.org/).
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 changes: 4 additions & 4 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# file GENERATED by distutils, do NOT edit
setup.py
hapi\__init__.py
hapi\hapi.py
# file GENERATED by distutils, do NOT edit
setup.py
hapi\__init__.py
hapi\hapi.py
46 changes: 43 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,43 @@
# HITRAN Application Programming Interface (HAPI)
===============================================

Current version: 1.1.0.9.7

## Version history

1) FIXED GRID BUG (ver. 1.1.0.1)
2) FIXED OUTPUT FORMAT FOR CROSS-SECTIONS (ver. 1.1.0.1)
3) ADDED CPF BY SCHREIER (JQSRT_112_2011) (ver. 1.1.0.2)
4) OPTIMIZED EXPRESSION EVALUATIONS FOR SELECT (ver. 1.1.0.3)
5) ADDED SUPPORT FOR MIXTURES (ver. 1.1.0.4)
6) ADDED SUPPORT FOR USER-DEFINED ENV DEPENDENCES (ver. 1.1.0.5)
7) ADDED PROFILE SELECTION (ALPHA) (ver. 1.1.0.6)
8) ADDED METADATA FOR HTP, FIXED NORMALIZATION IN CONVOLVESPECTRUMSAME (ver. 1.1.0.7)
9) FIXED A "LONELY HEADER" BUG IN CACHE2STORAGE (ver. 1.1.0.7.1)
10) ADDED SUPPORT FOR PHOSGENE AND CYANOGEN (ver. 1.1.0.7.2)
11) OPTIMIZED STORAGE2CACHE (by Nils-Holger Loeber) (ver. 1.1.0.7.3)
12) ADDED SKIPABLE PARAMETERS IN HEADERS (ver. 1.1.0.7.4)
13) ADDED SUPPORT FOR FORTRAN D-NOTATION (ver. 1.1.0.7.5)
14) ADDED SUPPORT FOR WEIRD-FORMATTED INTENSITY VALUES E.G. "2.700-164" (ver. 1.1.0.7.6)
15) ADDED TIPS-2017 (ver. 1.1.0.8)
16) ADDED SUPPORT FOR CUSTOM EXTENSIONS OF THE DATA FILES (ver. 1.1.0.8.1)
17) FIXED LINK TO (2,0) ISOTOPOLOGUE IN TIPS-2017 (ver. 1.1.0.8.2)
18) ADDED SAVEHEADER FUNCTION (ver. 1.1.0.8.3)
19) ADDED METADATA FOR SF6 (ver. 1.1.0.8.4)
20) ADDED D2O ISOTOPOLOGUE OF WATER TO DESCRIPTION (ver. 1.1.0.8.5)
21) FIXED LINE ENDINGS IN STORAGE2CACHE AND QUERYHITRAN (ver. 1.1.0.8.6)
22) ADDED SUPPORT FOR NON-INTEGER LOCAL ISO IDS (ver. 1.1.0.8.7)
23) FIXED PARAMETER NAME CASE BUG (by Robert J. Hargreaves) (ver. 1.1.0.8.8)
24) CAST LOCAL_ISO_ID=0 TO 10 FOR CARBON DIOXIDE (ver. 1.1.0.8.9)
25) USING NUMPY.ARRAYS FOR NUMERIC COLUMNS OF LOCAL_TABLE_CACHE (ver. 1.1.0.9.0)
26) ADDED DESCRIPTIONS FOR BROADENING BY H2O (ver. 1.1.0.9.1)
27) ADDED PROXY SUPPORT IN FETCH AND FETCH_BY_IDS (ver. 1.1.0.9.2)
28) ADDED LIMIT FOR NUMBER OF LINES DURING TABLE READ (ver. 1.1.0.9.3)
29) FIXED ABSOLUTE PATH BUG IN TABLE NAMES (ver. 1.1.0.9.4)
30) CORRECTED ABUNDANCE OF THE HD ISOTOPOLOGUE (ver. 1.1.0.9.5)
31) ADDED UNIFIED INTERFACES FOR ABSCOEF AND XSC CALCULATIONS (ver. 1.1.0.9.6)
32) ADDED PARLISTS FOR LINE MIXING (VOIGT AND SDVOIGT) (ver. 1.1.0.9.7)

## Introduction

The HITRAN Application Programming Interface (HAPI) [1] is a set of routines in Python which aims to provide remote access to functionality and data given by the HITRANonline. At the present time, the API can download, filter and process line-by-line transition data.
Expand All @@ -20,7 +57,7 @@ Some of the prominent current features of HAPI are:
3) Conventional Python structures (lists, tuples, and dictionaries) for representing spectroscopic data;
4) Compatibility with a large set of third-party Python libraries to work with the data;
5) Python implementation of the HT profile [2,3,4,5] which can be used in spectral simulations. This line shape can also be reduced to a number of conventional line profiles such as Gaussian (Doppler), Lorentzian, Voigt, Rautian, Speed-dependent Voigt and speed-dependent Rautian;
6) Python implementation of the total internal partition sums algorithm, TIPS-2011 [6] which is used in the calculation of the temperature dependence of HITRAN [7] transition intensities;
6) Python implementation of the total internal partition sums algorithm, TIPS-2017[6] which is used in the calculation of the temperature dependence of HITRAN[7] transition intensities. The older software TIPS-2011[8] is also available;
7) High-resolution spectral simulation accounting for pressure, temperature and optical path length. The following spectral functions can be calculated:
a) absorption coefficient
b) absorption spectrum
Expand Down Expand Up @@ -49,6 +86,9 @@ To make a reference to particular version of HAPI, use corresponding DOI from th

[5] J. Tennyson, P. F. Bernath, A. Campargue et al., Recommended isolated-line profile for representing high-resolution spectroscopic transitions (IUPAC Technical Report), Pure Appl. Chem. 86, 1931-1943 (2014) [Link to article](http://www.degruyter.com/view/j/pac.2014.86.issue-12/pac-2014-0208/pac-2014-0208.xml)

[6] A. L. Laraia, R. R. Gamache, J. Lamouroux, I. E. Gordon, L. S. Rothman, Total internal partition sums to support planetary remote sensing, Icarus 215, 391-400 (2011). [Link to article](http://www.sciencedirect.com/science/article/pii/S0019103511002132)
[6] R. R. Gamache, C. Roller, E. Lopes, I. E. Gordon, L. S. Rothman, et al., Total internal partition sums for 166 isotopologues of 51 molecules important in planetary atmospheres: Application to HITRAN2016 and beyond, J. Quant. Spectrosc. Radiat. Transfer 203, 70-87 (2017). [Link to article](https://www.sciencedirect.com/science/article/pii/S0022407317301516)

[7] I. E. Gordon, L. S. Rothman, C. Hill, R. V. Kochanov, Y. Tan, et al., The HITRAN2016 molecular spectroscopic database, J. Quant. Spectrosc. Radiat. Transfer 203, 3-69 (2017). [link to article](https://www.sciencedirect.com/science/article/pii/S0022407317301073)

[8] A. L. Laraia, R. R. Gamache, J. Lamouroux, I. E. Gordon, L. S. Rothman, Total internal partition sums to support planetary remote sensing, Icarus 215, 391-400 (2011). [Link to article](http://www.sciencedirect.com/science/article/pii/S0019103511002132)

[7] I. E Gordon, et al. The HITRAN2016 molecular spectroscopic database. J. Quant. Spectrosc. Radiat. Transf. 130, 4�50 (2017). [link to article](https://linkinghub.elsevier.com/retrieve/pii/S0022407317301073)
2 changes: 1 addition & 1 deletion create_dist.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
python setup.py sdist
python setup.py sdist
python setup.py bdist_wheel --universal
8 changes: 7 additions & 1 deletion hapi/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
from hapi import *
#from hapi import *

#https://docs.python.org/3/tutorial/modules.html
#__all__ = ['hapi',]

#https://stackoverflow.com/questions/34341420/import-functions-directly-from-python-3-modules
from .hapi import *
Loading