diff --git a/docs/source/conf.py b/docs/source/conf.py index 34bf651..6d2e448 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -12,7 +12,7 @@ release = '06/25/2024' # The full version, including alpha/beta/rc tags -release = '0.1.11' +release = '0.1.12' # -- Moving documentation building data functions ---------------------------- diff --git a/examples/tutorials/3_eqn_regression.py b/examples/tutorials/3_eqn_regression.py index 7d8df19..16c6260 100644 --- a/examples/tutorials/3_eqn_regression.py +++ b/examples/tutorials/3_eqn_regression.py @@ -5,11 +5,27 @@ data_file = '../data/emissivity_grids.nc' emissivities = innate.DataSet.from_file(data_file) +# Additional approximation techniques can be accessed from the interpolation (interpl) and regression +# (reg) objects as provided by the input dataset file. For example, the current dataset includes a parametrization for the +# 2D grids: + +emissivities['O3_5007A'].approx.reg.eqn(12250, 122) + +# Which produces the same results as above. +# In 2D datasets it is possible to perform these validations with a visual approach using the plottting function: + +emissivities['O3_5007A'].plot.matrix_diagnostic(ax_cfg={'title': '$O^{2+} 500.7nm$'}) + +# We can compare this plot with another transitions + +emissivities['He1_7065A'].plot.matrix_diagnostic(ax_cfg={'title': '$He^{+} 706.5nm$'}) + +# We can see the second set of emissivities have high discrepancy at high density low temperature. This means we should +# review the approximation technique if these conditions are found. + + +# menu. from the programing manner. temp, den = 12250, 122 -variables = (temp, den) -print('Regression Equation', emissivities['O3_5007A'].approx.reg.eqn(variables)) +print('Regression Equation', emissivities['O3_5007A'].approx.reg.eqn(12250, 122)) + -# 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', np.log10(emiss_ratio)) diff --git a/pyproject.toml b/pyproject.toml index 1238f7b..3a980e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "innate-stable" -version = "0.1.11" +version = "0.1.12" readme = "README.rst" requires-python = ">=3.10" license = {file = "COPYING"} diff --git a/src/innate/config.toml b/src/innate/config.toml index 84d7516..4cc492f 100644 --- a/src/innate/config.toml +++ b/src/innate/config.toml @@ -1,5 +1,5 @@ [metadata] -version = '0.1.11' +version = '0.1.12' [parameter_labels] diff --git a/src/innate/plotting.py b/src/innate/plotting.py index eaa067b..744d3fa 100644 --- a/src/innate/plotting.py +++ b/src/innate/plotting.py @@ -268,7 +268,7 @@ def matrix_diagnostic(self, output_address=None, num_points=15, technique='rgi', in_ax.imshow(grid, aspect=0.05, extent=(x_range.min(), x_range.max(), y_range.min(), y_range.max())) # Plot discrepancy below - idx_interest = percentage_difference < 0.05 + idx_interest = percentage_difference < 5 in_ax.scatter(X[idx_interest], Y[idx_interest], c="None", edgecolors='black', linewidths=0.35, label='Error below 1%') if np.sum(idx_interest == False) > 0: