Skip to content

Commit

Permalink
Innate 0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
vital committed Jun 26, 2024
1 parent cae91d8 commit 7b46db0
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 6 deletions.
35 changes: 33 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,29 @@
release = '06/25/2024'

# The full version, including alpha/beta/rc tags
release = '0.1.3'
release = '0.1.4'

# -- Moving documentation building data functions ----------------------------

# import sys
# import os
# import shutil
# from pathlib import Path
#
# def all_but_ipynb(dir, contents):
# result = []
# for c in contents:
# if os.path.isfile(os.path.join(dir, c)) and (not c.endswith(".py")):
# result += [c]
# return result
#
#
# _lib_path = Path(__file__).parents[2]/'src'
# _doc_folder = Path(__file__).parents[2]/'docs/source'
# _examples_path = Path(__file__).parents[2]/'examples'
# sys.path.append(_lib_path.as_posix())
# sys.path.append(_examples_path.as_posix())


# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down Expand Up @@ -41,4 +63,13 @@
html_theme = 'sphinx_rtd_theme'

imgmath_latex_preamble = r'\usepackage[active]{preview}' # + other custom stuff for inline math, such as non-default math fonts etc.
imgmath_use_preview = True
imgmath_use_preview = True

# -- Move the files ------------------------------------------------------------

# shutil.rmtree(_doc_folder/'images', ignore_errors=True)
# shutil.rmtree(_doc_folder/'inputs', ignore_errors=True)
# shutil.rmtree(_doc_folder/'outputs', ignore_errors=True)
# shutil.rmtree(_doc_folder/'sample_data', ignore_errors=True)
# shutil.rmtree(_doc_folder/'tutorials', ignore_errors=True)
# shutil.copytree(_examples_path, _doc_folder, dirs_exist_ok=True)
6 changes: 4 additions & 2 deletions examples/tutorials/3_eqn_regression.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import innate
import numpy as np
import pyneb as pn

data_file = '../data/emissivity_grids.nc'
emissivities = innate.DataSet.from_file(data_file)

temp, den = 12250, 122
print('Interpolation', emissivities['O3_5007A'].approx.interp.rgi((temp, den)).eval())
variables = (temp, den)
print('Regression Equation', emissivities['O3_5007A'].approx.reg.eqn(variables))

# Compare with the original data
O3, H1 = pn.Atom('O', 3), pn.RecAtom('H', 1)
emiss_ratio = O3.getEmissivity(temp, den, wave=5007)/H1.getEmissivity(temp, den, wave=4861)
print('True value', emiss_ratio)
print('True value', np.log10(emiss_ratio))
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "innate-stable"
version = "0.1.3"
version = "0.1.4"
readme = "README.rst"
requires-python = ">=3.10"
license = {file = "COPYING"}
Expand Down
2 changes: 1 addition & 1 deletion src/innate/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[metadata]
version = '0.1.3'
version = '0.1.4'

[parameter_labels]

Expand Down

0 comments on commit 7b46db0

Please sign in to comment.