Tool to convert temperatures OH*(6-2) between two sets of Einstein A coefficients.
Project description
oh_einstein_temp_convert
oh_einstein_temp_convert is a Python package which translates temperatures originally calculated from OH*(6-2) transiton spectra using a certain set of Einstein coefficients to a new set of Einstein coefficients with no need of the original data.
Author
Rowan Dayton-Oxland University of Southampton Github
Installation
Use the package manager pip to install oh_einstein_temp_convert.
pip install oh_einstein_temp_convert
Requirements
- Python >= 3.10
- numpy, pandas
- OS independent
Einstein A coefficient sources
Ain (int) - Original Einstein coefficient source index (see table)
Aout (int) - Desired output Einstein coefficient source index (see table)
Einstein A Source | Index |
---|---|
Mies et al., 1974 | 0 |
Loo and Groenenboom, 2008 | 1 |
Langhoff et al., 1986 | 2 |
Goldman et al., 1998 | 3 |
Turnbull and Lowe, 1989 | 4 |
Usage
import oh_einstein_temp_convert as oh
Temperatures = [] # List of temperatures
# Temperatures originally calculated from e.g. Mies et al., 1974 coefficients
Ain_index = 0 # Choose index of input temperatures
# Output temperatures calculated from e.g. Loo and Groenenboom, 2008 coefficients.
Aout_index = 1 # Choose index of output temperatures
# returns list of converted temperatures
Result = oh.convert_temperatures(Temperatures, Ain_index, Aout_index)
Algorithm
- Get the original temperature and original Einstein coefficient set
- Calculate $ln(\frac{I}{Ain \cdot 2(2J' + 1)})$ and add a correction term for the new Einstein coefficient set $ln(\frac{Ain}{Aout})$ for each $F(J')$ value in the OH*(6-2) P-branch.
- Plot the corrected $ln(\frac{I}{Aout \cdot 2(2J' + 1)})$ term against $F(J')$
- Extract the output temperature from the gradient of the line by linear fit
This comes from the following equation; $$ ln(\frac{I}{A \cdot 2(2J' + 1)}) = \frac{-(h c)}{(k T)} * F(J') + ln(\frac{N}{QR}) $$
$I$ The spectral line intensity $A$ The Einstein A coefficient $J'$ The rotational quantum state $h$ The Planck constant $c$ The speed of light in the vacuum $k$ The Boltzmann constant $T$ The rotational temperature $F(J')$ The rotational energy term $ln(\frac{N}{QR})$ The partition function (constant for any single branch in the spectrum)
Contributing
Pull requests are welcome on Github. For major changes, please open an issue first to discuss what you would like to change.
References
Einstein and other quantum coefficients, and general inspiration from the Synthetic Hydroxyl Spectrum Generator Sigernes, F., Shumilov, N., Deehr, C.S., Nielsen, K.P., Svenøe, T., and Havnes, O., The Hydroxyl rotational temperature record from the Auroral Station in Adventdalen, Svalbard (78°N, 15°E) , Journal of Geophysical Research, Vol 108 (A9), 1342, doi 1029/2001JA009023, 2003.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file oh_einstein_temp_convert-1.0.0.tar.gz
.
File metadata
- Download URL: oh_einstein_temp_convert-1.0.0.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
fece72c665e69dbeb79e8c56ded4c38378e3785e4c09cc45286777354ec83159
|
|
MD5 |
c0f25c6f172c8776c653f28b6e5cbe8b
|
|
BLAKE2b-256 |
2247fc4f5bdf0bff3db89f1d772bf065385ac44804571e76b69362a1a9633bec
|
File details
Details for the file oh_einstein_temp_convert-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: oh_einstein_temp_convert-1.0.0-py3-none-any.whl
- Upload date:
- Size: 21.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
5ba33a41d4464bc69624e05e0258b038e126490202467876f63108a46e416e8a
|
|
MD5 |
a71bd9c3f1f792abfe3c56755cf8d30f
|
|
BLAKE2b-256 |
9c0cc146150f66d5594e8a419c82ece561a22ea03aec5e0715c0ddde946c5a21
|