From 5703f9d309f4d26113b5ea8fe0520177e7ede35d Mon Sep 17 00:00:00 2001 From: DinoBektesevic Date: Sun, 24 Sep 2023 23:12:23 -0700 Subject: [PATCH] Rename all squarePSF references to square_psf. Rebasing after #345 left some old references, to renamed methods, that I must have missed to correct in the rebase. Added documentation entry for the new methods. Removed the documentation entries for methods removed in #345. --- src/kbmod/search/layered_image.cpp | 13 ++++++------- src/kbmod/search/pydocs/layered_image_docs.h | 6 +----- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/kbmod/search/layered_image.cpp b/src/kbmod/search/layered_image.cpp index 24adcf7a1..23b982007 100644 --- a/src/kbmod/search/layered_image.cpp +++ b/src/kbmod/search/layered_image.cpp @@ -78,17 +78,17 @@ namespace search { variance.grow_mask(steps); } - void LayeredImage::convolveGivenPSF(const PSF& given_psf) { + void LayeredImage::convolve_given_psf(const PSF& given_psf) { science.convolve(given_psf); // Square the PSF use that on the variance image. PSF psfsq = PSF(given_psf); // Copy - psfsq.squarePSF(); + psfsq.square_psf(); variance.convolve(psfsq); } - void LayeredImage::convolvePSF() { - convolveGivenPSF(psf); + void LayeredImage::convolve_psf() { + convolve_given_psf(psf); } void LayeredImage::apply_mask_flags(int flags, const std::vector& exceptions) { @@ -217,7 +217,7 @@ namespace search { // Convolve with the PSF squared. PSF psfsq = PSF(psf); // Copy - psfsq.squarePSF(); + psfsq.square_psf(); result.convolve(psfsq); return result; @@ -236,7 +236,6 @@ namespace search { .def(py::init()) .def("set_psf", &li::set_psf, pydocs::DOC_LayeredImage_set_psf) .def("get_psf", &li::get_psf, pydocs::DOC_LayeredImage_get_psf) - .def("get_psfsq", &li::get_psfsq, pydocs::DOC_LayeredImage_get_psfsq) .def("apply_mask_flags", &li::apply_mask_flags, pydocs::DOC_LayeredImage_apply_mask_flags) .def("apply_mask_threshold", &li::apply_mask_threshold, pydocs::DOC_LayeredImage_apply_mask_threshold) .def("sub_template", &li::subtract_template, pydocs::DOC_LayeredImage_sub_template) @@ -248,7 +247,7 @@ namespace search { .def("set_mask", &li::set_mask, pydocs::DOC_LayeredImage_set_mask) .def("set_variance", &li::set_variance, pydocs::DOC_LayeredImage_set_variance) .def("convolve_psf", &li::convolve_psf, pydocs::DOC_LayeredImage_convolve_psf) - .def("add_object", &li::add_object, pydocs::DOC_LayeredImage_add_object) + .def("convolve_given_psf", &li::convolve_psf, pydocs::DOC_LayeredImage_convolve_given_psf) .def("grow_mask", &li::grow_mask, pydocs::DOC_LayeredImage_grow_mask) .def("get_name", &li::get_name, pydocs::DOC_LayeredImage_get_name) .def("get_width", &li::get_width, pydocs::DOC_LayeredImage_get_width) diff --git a/src/kbmod/search/pydocs/layered_image_docs.h b/src/kbmod/search/pydocs/layered_image_docs.h index f24417088..3d9a55f66 100644 --- a/src/kbmod/search/pydocs/layered_image_docs.h +++ b/src/kbmod/search/pydocs/layered_image_docs.h @@ -55,10 +55,6 @@ namespace pydocs { Returns the PSF object. )doc"; - static const auto DOC_LayeredImage_get_psfsq = R"doc( - Returns the PSF object raised to the power of two. - )doc"; - static const auto DOC_LayeredImage_apply_mask_flags = R"doc( No idea )doc"; @@ -103,7 +99,7 @@ namespace pydocs { todo )doc"; - static const auto DOC_LayeredImage_add_object = R"doc( + static const auto DOC_LayeredImage_convolve_given_psf = R"doc( todo )doc";