Skip to content

Commit

Permalink
deploy github page
Browse files Browse the repository at this point in the history
  • Loading branch information
Jingxuan Yang committed Jun 26, 2024
1 parent c55dc88 commit 0eefc9a
Show file tree
Hide file tree
Showing 92 changed files with 26,067 additions and 0 deletions.
Binary file added docs/build/.DS_Store
Binary file not shown.
Binary file added docs/build/doctrees/api.doctree
Binary file not shown.
Binary file added docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file added docs/build/doctrees/index.doctree
Binary file not shown.
Binary file added docs/build/doctrees/publications.doctree
Binary file not shown.
Binary file added docs/build/doctrees/tutorial.doctree
Binary file not shown.
Binary file added docs/build/doctrees/usage.doctree
Binary file not shown.
4 changes: 4 additions & 0 deletions docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: e3a31627e343aa0fef40c32d2f1595b2
tags: 645f666f9bcd5a90fca523b33c5a78b7
Empty file added docs/build/html/.nojekyll
Empty file.
45 changes: 45 additions & 0 deletions docs/build/html/_sources/api.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
API
===

Here are the some of the functions that are available in the NEMESISPY package.

common
------

.. autofunction:: nemesispy.calc_hydrostat

.. autofunction:: nemesispy.disc_weights

.. autofunction:: nemesispy.gauss_lobatto_weights

.. autofunction:: nemesispy.get_gas_name

.. autofunction:: nemesispy.get_gas_id

.. autofunction:: nemesispy.interp_gcm_X

models
------

.. autofunction:: nemesispy.TP_Guillot

.. autofunction:: nemesispy.TP_Guillot14

.. autofunction:: nemesispy.Model4

radtran
-------

.. autofunction:: nemesispy.calc_layer

.. autofunction:: nemesispy.calc_mmw

.. autofunction:: nemesispy.calc_planck

.. autofunction:: nemesispy.calc_radiance

.. autofunction:: nemesispy.read_kta

.. autofunction:: nemesispy.read_kls

.. autofunction:: nemesispy.read_cia
94 changes: 94 additions & 0 deletions docs/build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
.. NEMESISPY documentation master file, created by
sphinx-quickstart on Sun Mar 10 22:23:59 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to NEMESISPY's documentation!
=====================================

.. toctree::
:maxdepth: 2
:caption: Table of Contents:

Table of Contents
-----------------

.. toctree::

usage
tutorial
api
publications

Introduction
------------

**NEMESISPY** is a Python package developed for atmospheric retrievals,
which is the inference of atmospheric properties such as chemical abundances
from observed spectra of planetary atmospheres. The workflow of atmospheric
retrievals can be devided into two steps: **forward modelling** and **model fitting**:

* The **forward modelling** step requires an atmospheric model for the observed
planet and a radiative transfer pipeline that can calculate model spectra given an atmospheric model.

* The **model fitting** step requires a parameter estimation code that can
constrain the free parameters of the forward model by fitting the observed spectra.

**NEMESISPY** can perform both parametric atmospheric modelling
and radiative transfer calculation for the retrievals of planetary spectra.
It is a recent development of the well-established Fortran `NEMESIS library <https://github.com/nemesiscode>`_,
which has been applied to the atmospheric retrievals of both solar system planets
and exoplanets.
**NEMESISPY** can be easily interfaced with Bayesian inference algorithms
such as nested sampling to retrieve atmospheric properties from spectroscopic observations.
The radiative transfer calculations in **NEMESISPY** are done with the
fast correlated-k method, and are accelerated with the
``Numba`` just-in-time compiler to match the speed of
compiled languages such as Fortran. The radiative transfer
routines are based on the well-tested `NEMESIS library <https://github.com/nemesiscode>`_
developed by Patrick Irwin (University of Oxford) and collaborators.

**NEMESISPY** comes ready with some spectral data and General Circulation
Model (GCM) data so you can start simulating spectra immediately.
There are a few demonstration routines in the ``nemesispy/examples`` folder;
in particular, ``demo_fit_eclipse.py`` contains an interactive plot routine
which allows you to fit a hot Jupiter eclipse spectrum by hand by varying
its chemical abundance and temperature profile.
The current release of **NEMESISPY** is focused on the calculation of
thermal emission spectra of exoplanets. It is capale of calculating emission spectra
at multiple orbital phases from an arbitray atmospheric model.
Future releases will include more features such
as multiple scattering and transmission geometry.

**NEMESISPY** has the following nice features:

* Written fully in Python (not a wrapper!): highly portable and customisable
compared to packages written in compiled languages and
can be easily installed on computer clusters.
* Fast calculation speed: the most time consuming routines are accelerated with
just-in-time (JIT) compilation, which compiles Python code to machine
code at run time.
* Radiative transfer routines are benchmarked against
the extensively used `NEMESIS library <https://github.com/nemesiscode>`_.
* Contains routines to simulate spectra from General
Circulation Models (GCMs).
* Contains unit tests to check if
the code is working correctly after modifications.

To install the package and keep it editable, clone the repository and type
the following in the terminal:

.. code-block:: console
$ pip install --editable .
To run all unit tests, change directory to the software folder and type the
following in the terminal:

.. code-block:: console
$ python -m unittest discover test/
.. note::

This project is under active development.
7 changes: 7 additions & 0 deletions docs/build/html/_sources/publications.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Publications
============

We list the publications that were enabled by the NEMESISPY software in the following.

* Jingxuan Yang, Mark Hammond, Anjali A A Piette, Jasmina Blecic, Taylor J Bell, Patrick G J Irwin, Vivien Parmentier, Shang-Min Tsai, Joanna K Barstow, Nicolas Crouzet, Laura Kreidberg, João M Mendonça, Jake Taylor, Robin Baeyens, Kazumasa Ohno, Lucas Teinturier, Matthew C Nixon, Simultaneous retrieval of orbital phase resolved JWST/MIRI emission spectra of the hot Jupiter WASP-43b: Evidence of water, ammonia and carbon monoxide, Monthly Notices of the Royal Astronomical Society, 2024;, stae1427, https://doi.org/10.1093/mnras/stae1427
* Jingxuan Yang, Patrick G J Irwin, Joanna K Barstow, Testing 2D temperature models in Bayesian retrievals of atmospheric properties from hot Jupiter phase curves, Monthly Notices of the Royal Astronomical Society, Volume 525, Issue 4, November 2023, Pages 5146–5167, https://doi.org/10.1093/mnras/stad2555
8 changes: 8 additions & 0 deletions docs/build/html/_sources/tutorial.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Tutorial
========




Hot Jupiter emission spectrum
------------------------------
46 changes: 46 additions & 0 deletions docs/build/html/_sources/usage.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Usage
=====

Installation
------------

To use NEMESISPY, first clone the `GitHub repository <https://github.com/Jingxuan97/nemesispy>`_
to your computer. Then, navigate to the directory where you have saved the
repository and run the command

.. code-block:: console
$ pip install .
This will install the package and make it available to use in your Python environment.
In order to install the package but still make it editable, run instead the command

.. code-block:: console
$ pip install . --editable
NEMESISPY can also by direcly installed from `PyPI <https://pypi.org/project/nemesispy/>`_
by running

.. code-block:: console
$ pip install nemesispy
We recommend installing the package from the GitHub repository
to make sure that you have the latest version of the package.

Opacity data
------------

NEMESISPY requires opacity data to be provided in the NEMESIS .kta format,
which can be obtained from the `ExoMol database <https://www.exomol.com/data/data-types/opacity/>`_.
In addition, the `Exo_k <https://perso.astrophy.u-bordeaux.fr/~jleconte/exo_k-doc/index.html>`_
package provides many helpful routines for working with opacity data.

Issues and contributions
------------------------
To report issues or problems with NEMESISPY, please use the GitHub issue tracker
`here <https://github.com/Jingxuan97/nemesispy>`_.
If you would like to contribute to the development of NEMESISPY, or seek scientific
collaboration, please contact us directly.
Our contact details can be found `here <https://www.physics.ox.ac.uk/our-people/yangj>`_.
134 changes: 134 additions & 0 deletions docs/build/html/_static/_sphinx_javascript_frameworks_compat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
/*
* _sphinx_javascript_frameworks_compat.js
* ~~~~~~~~~~
*
* Compatability shim for jQuery and underscores.js.
*
* WILL BE REMOVED IN Sphinx 6.0
* xref RemovedInSphinx60Warning
*
*/

/**
* select a different prefix for underscore
*/
$u = _.noConflict();


/**
* small helper function to urldecode strings
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
if (!x) {
return x
}
return decodeURIComponent(x.replace(/\+/g, ' '));
};

/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;

/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};

/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};

/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();

var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];

return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}
Loading

0 comments on commit 0eefc9a

Please sign in to comment.