From 6f4288980f3a63a9c129f56d577299dfa2db792a Mon Sep 17 00:00:00 2001 From: Jeremy Kubica <104161096+jeremykubica@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:15:49 -0400 Subject: [PATCH 1/2] Fix a few warnings that come up in doc generation --- src/kbmod/reprojection.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/kbmod/reprojection.py b/src/kbmod/reprojection.py index 9657df41c..11cd1d7ae 100644 --- a/src/kbmod/reprojection.py +++ b/src/kbmod/reprojection.py @@ -34,7 +34,7 @@ def reproject_image(image, original_wcs, common_wcs): The WCS to reproject all the images into. Returns - ---------- + ------- new_image : `numpy.ndarray` The image data reprojected with a common `astropy.wcs.WCS`. footprint : `numpy.ndarray` @@ -115,7 +115,7 @@ def reproject_work_unit( displayed or hidden. Returns - ---------- + ------- A `kbmod.WorkUnit` reprojected with a common `astropy.wcs.WCS`, or `None` in the case where `write_output` is set to True. """ @@ -186,8 +186,9 @@ def _reproject_work_unit( The base filename where output will be written if `write_output` is set to True. disable_show_progress : `bool` Whether or not to disable the `tqdm` show_progress bar. + Returns - ---------- + ------- A `kbmod.WorkUnit` reprojected with a common `astropy.wcs.WCS`, or `None` in the case where `write_output` is set to True. """ @@ -344,7 +345,7 @@ def _reproject_work_unit_in_parallel( Whether or not to enable the `tqdm` show_progress bar. Returns - ---------- + ------- A `kbmod.WorkUnit` reprojected with a common `astropy.wcs.WCS`, or `None` in the case where `write_output` is set to True. """ From e0c30eddc5b37c994a1bb21e88f87aa3964adb68 Mon Sep 17 00:00:00 2001 From: Jeremy Kubica <104161096+jeremykubica@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:21:48 -0400 Subject: [PATCH 2/2] Fix more sphinx warnings --- src/kbmod/search/pydocs/stack_search_docs.h | 8 ++++---- src/kbmod/wcs_utils.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/kbmod/search/pydocs/stack_search_docs.h b/src/kbmod/search/pydocs/stack_search_docs.h index adb9946a3..2289f3c13 100644 --- a/src/kbmod/search/pydocs/stack_search_docs.h +++ b/src/kbmod/search/pydocs/stack_search_docs.h @@ -249,8 +249,8 @@ static const auto DOC_StackSearch_evaluate_single_trajectory = R"doc( Performs the evaluation of a single Trajectory object. Modifies the object in-place. - Note - ---- + Notes + ----- Runs on the CPU, but requires CUDA compiler. Parameters @@ -262,8 +262,8 @@ static const auto DOC_StackSearch_evaluate_single_trajectory = R"doc( static const auto DOC_StackSearch_search_linear_trajectory = R"doc( Performs the evaluation of a linear trajectory in pixel space. - Note - ---- + Notes + ----- Runs on the CPU, but requires CUDA compiler. Parameters diff --git a/src/kbmod/wcs_utils.py b/src/kbmod/wcs_utils.py index 2df5b4491..60656e16f 100644 --- a/src/kbmod/wcs_utils.py +++ b/src/kbmod/wcs_utils.py @@ -301,8 +301,8 @@ def calc_ecliptic_angle(wcs, center_pixel=(1000, 2000), step=12): with the image axes. Used to transform the specified search angles, with respect to the ecliptic, to search angles within the image. - Note - ---- + Notes + ----- It is not neccessary to calculate this angle for each image in an image set if they have all been warped to a common WCS. """ @@ -336,7 +336,7 @@ def extract_wcs_from_hdu_header(header): The header from which to read the data. Returns - -------- + ------- curr_wcs : `astropy.wcs.WCS` The WCS or None if it does not exist. """