https://github.com/migueldvb/cine
Calculate infrared pumping rates by solar radiation
https://github.com/migueldvb/cine
astronomy comets python science
Last synced: about 1 year ago
JSON representation
Calculate infrared pumping rates by solar radiation
- Host: GitHub
- URL: https://github.com/migueldvb/cine
- Owner: migueldvb
- License: mit
- Created: 2017-01-24T14:53:57.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-08-10T22:12:16.000Z (almost 8 years ago)
- Last Synced: 2025-05-03T06:03:28.552Z (about 1 year ago)
- Topics: astronomy, comets, python, science
- Language: Python
- Size: 34.2 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
===============================
CINE: Comet INfrared Excitation
===============================
``cine`` is a command-line tool for calculating infrared pumping efficiencies.
At large nucleocentric distances, one of the main mechanisms for molecular
excitation in comets is the fluorescence by the solar radiation followed by
radiative decay to the ground vibrational state. This code calculates the
effective pumping rates for rotational levels in the ground vibrational state
scaled by the heliocentric distance of the comet. These coefficients are
useful for modeling rotational emission lines observed in cometary spectra at
sub-millimeter wavelengths.
Code releases are available on `PyPI `_, and
development happens in the `github project page
`_.
Requirements
------------
The code requires the standard scientific Python packages (`numpy
`_, `scipy `_, and `pandas
`_) and astropy's affiliated package `astroquery
`_ to access the HITRAN and Lamda
databases. Running the tests requires `nose
`_.
Installation
------------
cine can be installed using `pip `_:
.. code-block:: bash
$ pip install cine
or by cloning the github repository:
.. code-block:: bash
$ # If you have a github account:
$ git clone git@github.com:migueldvb/cine.git
$ # If you do not:
$ git clone https://github.com/migueldvb/cine.git
$ cd cine
$ python setup.py install
$ # Or if you do not have root privileges:
$ python setup.py install --user
When the package is installed using either method, the ``cine`` script will be
copied to a directory in the PATH environment variable and will be available
for general use.
Example
-------
``cine`` is a command-line tool that is included in the package to generate
pumping rates for several molecules. For example, to obtain the effective
pumping rates between the seven lowest rotational levels in the ground
vibrational state of HDO you can run the following command once ``CINE`` has
been installed:
.. code-block:: bash
$ cine --mol HDO --nlevels 7
This should create a file named ``G_HDO.dat`` which contains the pumping rates
G :subscript:`ij` in units of s :superscript:`-1` between the rotational levels
i and j shown in the first two columns. Note that the levels use zero-based
indexing.
.. code-block:: bash
0 3 2.568872e-05
0 4 2.570305e-05
0 5 1.552757e-05
1 2 6.253229e-05
1 6 2.987896e-05
2 1 6.196215e-05
2 6 4.410062e-05
3 0 7.547422e-05
3 4 3.103947e-05
3 5 5.048423e-05
4 0 1.253741e-04
4 3 5.128064e-05
4 5 4.679292e-05
5 0 7.481781e-05
5 3 8.287649e-05
5 4 4.643613e-05
6 1 4.820172e-05
6 2 7.201329e-05
To include more levels in the calculation, change the ``-n/-nlevels`` command-line
option to a larger value. cine has a ``-h/--help`` argument that presents an
usage explanation describing each optional argument.
These coefficients are useful for deriving molecular production rates from cometary
lines observed at sub-millimeter wavelengths combined with a code that
solves the radiative transfer equations such as `LIME
`_.
Downloading HITRAN data
-----------------------
To download the molecular data cine uses the ``astroquery.hitran`` and
``astroquery.lamda`` tools. Set the ``LAMDA_DATA`` and ``HITRAN_DATA``
environment variables (otherwise, the default
``~/.astropy/cache/astroquery/Lamda`` and
``~/.astropy/cache/astroquery/hitran`` will be used),
Tests
-----
If ``nose`` is installed the tests can be run from the root of the repository as:
.. code-block:: bash
$ python setup.py test
Contributing
------------
Any questions or bug reports can be raised in github's `issue tracker
`_ or `pull requests
`_.
Project Status
--------------
.. image:: https://travis-ci.org/migueldvb/cine.svg?branch=master
:target: https://travis-ci.org/migueldvb/cine?branch=master
.. image:: https://coveralls.io/repos/github/migueldvb/cine/badge.svg?branch=master
:target: https://coveralls.io/github/migueldvb/cine?branch=master
Citation
--------
.. image:: http://joss.theoj.org/papers/10.21105/joss.00182/status.svg
:target: http://joss.theoj.org/papers/10.21105/joss.00182
If you wish to cite this work, please use this reference from `NASA's
Astrophysics Data System
`_:
.. code-block:: bibtex
@ARTICLE{2017JOSS....2..182D,
author = {{de Val-Borro}, Miguel and {Cordiner}, Martin A. and {Milam}, Stefanie
N. and {Charnley}, Steven B.},
title = "{Cine: Line excitation by infrared fluorescence in cometary atmospheres}",
journal = {The Journal of Open Source Software},
year = 2017,
month = Mar,
volume = {2},
pages = {182},
doi = {10.21105/joss.00182},
adsurl = {https://ui.adsabs.harvard.edu/#abs/2017JOSS....2..182D},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
License
-------
Copyright 2017-2018 Miguel de Val-Borro
``CINE`` is free software made available under the MIT License.
For details see the LICENSE file.