diff --git a/ctapipe/tools/train_disp_reconstructor.py b/ctapipe/tools/train_disp_reconstructor.py index 5953bda8038..784d68a6a18 100644 --- a/ctapipe/tools/train_disp_reconstructor.py +++ b/ctapipe/tools/train_disp_reconstructor.py @@ -1,3 +1,6 @@ +""" +Tool for training the DispReconstructor +""" import astropy.units as u import numpy as np @@ -8,6 +11,10 @@ from ctapipe.reco import CrossValidator, DispReconstructor from ctapipe.reco.preprocessing import check_valid_rows, horizontal_to_telescope +__all__ = [ + "TrainDispReconstructor", +] + class TrainDispReconstructor(Tool): """ @@ -15,7 +22,8 @@ class TrainDispReconstructor(Tool): The tool first performs a cross validation to give an initial estimate on the quality of the estimation and then finally trains two models - (|disp| and sign(disp)) per telescope type on the full dataset. + (estimating ``norm(disp)`` and ``sign(disp)`` respectively) per + telescope type on the full dataset. """ name = "ctapipe-train-disp-reconstructor" @@ -54,9 +62,9 @@ class TrainDispReconstructor(Tool): project_disp = Bool( default_value=False, help=( - "If true, true |disp| is the distance between shower cog and" + "If true, ``true_disp`` is the distance between shower cog and" " the true source position along the reconstructed main shower axis." - "If false, true |disp| is the distance between shower cog" + "If false, ``true_disp`` is the distance between shower cog" " and the true source position." ), ).tag(config=True) diff --git a/docs/api-reference/tools/index.rst b/docs/api-reference/tools/index.rst index 0d1c2dc8e6d..e9e9823e253 100644 --- a/docs/api-reference/tools/index.rst +++ b/docs/api-reference/tools/index.rst @@ -93,5 +93,8 @@ Reference/API .. automodapi:: ctapipe.tools.train_particle_classifier :no-inheritance-diagram: +.. automodapi:: ctapipe.tools.train_disp_reconstructor + :no-inheritance-diagram: + .. automodapi:: ctapipe.tools.apply_models :no-inheritance-diagram: diff --git a/docs/changes/2420.bugfix.rst b/docs/changes/2420.bugfix.rst new file mode 100644 index 00000000000..aa21eafa4fb --- /dev/null +++ b/docs/changes/2420.bugfix.rst @@ -0,0 +1 @@ +Add docstring for ``ctapipe-train-disp-reconstructor``.