diff --git a/doc/source/conf.py b/doc/source/conf.py index c74692d..7d06655 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -166,7 +166,10 @@ html_domain_indices = False #html_split_index = False # If true, links to the reST sources are added to the pages. -html_show_sourcelink = False +html_show_sourcelink = True + +# The following line makes it possible to download the source as ipynb +html_sourcelink_suffix = '' # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. html_show_sphinx = False diff --git a/doc/source/jupyter-logo.svg b/doc/source/jupyter-logo.svg new file mode 100644 index 0000000..fb2921a --- /dev/null +++ b/doc/source/jupyter-logo.svg @@ -0,0 +1,88 @@ + +logo.svg +Created using Figma 0.90 + + + + + + + + + + + + + + + + + + diff --git a/doc/source/users/index.rst b/doc/source/users/index.rst index d008613..c6ea2c5 100644 --- a/doc/source/users/index.rst +++ b/doc/source/users/index.rst @@ -3,6 +3,16 @@ User Documentation ================== +This documentation will guide you in the process of using ctools. Some of the +manual pages and tutorials are Jupyter Notebooks that you can recognize by the +Jupyter logo at the beginning of the page. + +.. image:: ../jupyter-logo.svg + +To download the notebooks and execute them on +your machine go to the page and right click on "Show Source" at the bottom of +the right navigation bar. + .. toctree:: :maxdepth: 1 @@ -10,4 +20,5 @@ User Documentation tutorials/index user_manual/index reference_manual/index + user_contributed/index glossary diff --git a/doc/source/users/user_contributed/index.rst b/doc/source/users/user_contributed/index.rst new file mode 100644 index 0000000..1a5b96a --- /dev/null +++ b/doc/source/users/user_contributed/index.rst @@ -0,0 +1,8 @@ +.. _user_contributed: + +User Contributed Material +========================= + +This section of the manual provides examples and Jupyter Notebooks contributed +by ctools users. + diff --git a/doc/source/users/user_manual/ctools-from-python.ipynb b/doc/source/users/user_manual/ctools-from-python.ipynb index 5de2bb0..05a2058 100644 --- a/doc/source/users/user_manual/ctools-from-python.ipynb +++ b/doc/source/users/user_manual/ctools-from-python.ipynb @@ -4,8 +4,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Using ctools from Python\n", - "\n", + "# Using ctools from Python" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![](../../jupyter-logo.svg)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "In this notebook you will learn how to use the ctools and cscripts from Python instead of typing the commands in the console.\n", "\n", "ctools provides two Python modules that allow using all tools and scripts as Python classes. To use ctools from Python you have to import the ctools and cscripts modules into Python. You should also import the gammalib module, as ctools without GammaLib is generally not very useful.\n", @@ -616,7 +628,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The test statistic TS is expected to be distributed as a chi square with a number of degrees of freedom equal to the additional number of degrees of freedom of the second, more complex, model with respect to the original, more parsimonious, one, so for us two degrees of freedom. The chance probability that the likelihood improved that much because of pure statistical fluctuations is the integral from TS to infinity of the chi square with two degrees of freedom. In this case the improvement is negligible (i.e., the chance probability is very high), as expected since in the model the source is already at the true position." + "The test statistic TS is expected to be distributed as a chi square with a number of degrees of freedom equal to the additional number of degrees of freedom of the (second) more complex model with respect to the (first) more parsimonious one, for our case two degrees of freedom. The chance probability that the likelihood improved that much because of pure statistical fluctuations is the integral from TS to infinity of the chi square with two degrees of freedom. In this case the improvement is negligible (i.e., the chance probability is very high), as expected since in the model the source is already at the true position." ] } ], diff --git a/doc/source/users/user_manual/index.rst b/doc/source/users/user_manual/index.rst index a30c5bc..233caa0 100644 --- a/doc/source/users/user_manual/index.rst +++ b/doc/source/users/user_manual/index.rst @@ -11,3 +11,5 @@ User Manual models plotting ctools-from-python + +