diff --git a/docs/howtocalibration.rst b/docs/howtocalibration.rst index 67ac4bfd..f929bf04 100644 --- a/docs/howtocalibration.rst +++ b/docs/howtocalibration.rst @@ -5,15 +5,16 @@ In this tutorial, we describe how to include a new calibrator to the surmise's framework. We illustrate this with ``directbayeswoodbury``--a calibrator method located in the directory ``\calibrationmethods``. -In surmise, all calibrator methods inherit from the base class -:py:class:`surmise.calibration.calibrator`. A calibrator class calls the user -input method, and fits the corresponding calibrator. +In surmise, all calibrator methods are automatically discovered from `.py` code files under ``\calibrationmethods``. +A calibrator class calls the user input method via the filename without extension, e.g., `directbayeswoodbury`, and fits the corresponding calibrator. :py:meth:`surmise.calibration.calibrator.fit` is the main :py:class:`surmise.calibration.calibrator` class methods. It also provides the functionality of updating and manipulating the fitted calibrator by :py:meth:`surmise.calibration.calibrator.predict` class methods. -In order to use the functionality of the base class :py:class:`surmise.calibration.calibrator`, we categorize the functions to be included in a new emulation method (for example, ``directbayeswoodbury``) into two categories. +In order to use the functionality of the base class :py:class:`surmise.calibration.calibrator`, +we categorize the functions to be included in a new emulation method (for example, ``directbayeswoodbury``) +into two categories. Mandatory functions ++++++++++++++++++++ diff --git a/docs/howtoemulation.rst b/docs/howtoemulation.rst index 2e00b02f..5651bc12 100644 --- a/docs/howtoemulation.rst +++ b/docs/howtoemulation.rst @@ -1,13 +1,16 @@ How to include a new emulator ============================================== - -In this tutorial, we describe how to include a new emulator to the surmise's -framework. We illustrate this with ``PCGP``--an emulator method located in the -directory ``\emulationmethods``. - -In surmise, all emulator methods inherit from the base class :py:class:`surmise.emulation.emulator`. -An emulator class calls the user input method, and fits the corresponding -emulator. :py:func:`surmise.emulation.emulator.fit` and :py:func:`surmise.emulation.emulator.predict` +When loaded, the surmise package automatically identifies all available +emulators by locating all ``.py`` codes in the ``emulationmethods`` folder +within its installation [#f1]_. For example, it assumes that the +``emulationmethods/PCGP.py`` file provides the ``PCGP`` emulator, which is the +emulator name that users should provide when choosing a particular emulator to +use for a fit. Therefore, users can integrate their own emulator in surmise by +placing their emulator's Python source code in that same folder. This tutorial +describes how to structure a custom emulator code so that this integration is +successful. + +:py:func:`surmise.emulation.emulator.fit` and :py:func:`surmise.emulation.emulator.predict` are the main :py:class:`surmise.emulation.emulator` class methods. It also provides the functionality of updating and manipulating the fitted emulator by :py:func:`surmise.emulation.emulator.supplement`, @@ -67,3 +70,7 @@ Optional functions ++++++++++++++++++++ ``supplementtheta()`` is an optional function for an emulation method. + +.. rubric:: Footnotes + +.. [#f1] The location of a surmise installation that was installed into a virtual environment, for example, might be ``~/local/venv/my_surmise/lib/python3.14/site-packages/surmise`` or, in Windows, ``~/local/surmise_venv/Lib/site-packages/surmise/emulationmethods``