Skip to main content

Rosseland And Planck Opacity Converter

Project description

PyPI Documentation Status GitHub

RAPOC: Rosseland And Planck Opacity Converter

The RAPOC code is written by Lorenzo V. Mugnai and Darius Modirrousta-Galian and is the product of a collaboration between Sapienza Università di Roma, Università degli Studi di Palermo and INAF - Osservatorio Astronomico di Palermo. It uses molecular absorption measurements (i.e. wavelength-dependent opacities) to calculate Rosseland and Planck mean opacities that are commonly used in atmospheric modelling.

RAPOC is designed to be simple, straightforward, and easily incorporated into other codes. It is completely written in Python and documented with docstrings. In addition, a Sphinx version of the documentation with a full user guide that includes examples is available in html format.

Reports

RAPOC is under development, please report any issues or inaccuracies to the developers to support the implementation.

Cite

If you use this code or its results, please cite RAPOC: the Rosseland and Planck opacity converter by Mugnai L. V. and Modirrousta-Galian D. (submitted).

Installation

Installing from Pypi

RAPOC can be installed from the Pypi repository with the following script::

pip install rapoc

Installing from git

RAPOC may also be cloned from the main git repository::

git clone https://github.com/ExObsSim/Rapoc-public.git

The next step is to move into the RAPOC folder::

cd /your_path/Rapoc

Then::

pip install .

To check if one has the correct setup::

python -c "import rapoc"

Use

RAPOC is designed to be used on its own or in conjunction with other Python codes. Given an ExoMol file in the TauREx.h5 format, Rosseland and Planck mean opacities can be calculated. For example, in order to estimate the mean opacities at a temperature (T) of 1000 K with a pressure (P) of 10,000 Pa in the wavelength range of 0.3-50 micron the following script is used,

from rapoc import Rosseland, Planck

r_model = Rosseland(input_data='exomol_file.TauREx.h5')
opacity = r_model.estimate(P_input=10000 * u.Pa, T_input=1000 * u.K, band=(0.3 *u.um, 50*u.um))

p_model = Planck(input_data='exomol_file.TauREx.h5')
opacity = p_model.estimate(P_input=10000 * u.Pa, T_input=1000 * u.K, band=(0.3 *u.um, 50*u.um))

Inputs

To run the code you need measured data. The supported file formats are:

  • ExoMol opacities (downloadable here) with the TauREx.h5 format.

Documentation

The full documentation is available here

Alternatively, RAPOC accepts user-defined documentation by using sphinx. To install it run

pip install sphinx sphinx_rtd_theme

From the Rapoc/docs folder running

cd docs
make html

This will create a html version of the documentation in Rapoc/doc/build/html/index.html.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rapoc-1.0.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

rapoc-1.0.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file rapoc-1.0.0.tar.gz.

File metadata

  • Download URL: rapoc-1.0.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for rapoc-1.0.0.tar.gz
Algorithm Hash digest
SHA256 859bc0faa3ade919dac145124ec0261a5089c1653cab55c20f2b89635086edff
MD5 20a15c744d86351078b15f0144a1af98
BLAKE2b-256 aab63ba47433c8c65f0f6303b34bd0fdf7c8a4e2dc2ddf333933097e8211bb7d

See more details on using hashes here.

File details

Details for the file rapoc-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: rapoc-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for rapoc-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 910769c24b5a22bd7d1b76e5a2a31f39ac1493db43a1be6d14173f990c13d5eb
MD5 b9007b8f68cc61ccfb24f83d6e57d6dc
BLAKE2b-256 b80629c3aeedce50b6e18fbc750e027aeade554d1b1e5171f75ce0d4c58ac5a7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page