diff --git a/src/kbmod/search/psi_phi_array.cpp b/src/kbmod/search/psi_phi_array.cpp index 8b07d06c..68498873 100644 --- a/src/kbmod/search/psi_phi_array.cpp +++ b/src/kbmod/search/psi_phi_array.cpp @@ -214,7 +214,7 @@ std::array compute_scale_params_from_image_vect(const std::vectordebug("Image " + std::to_string(i) + " has no data.\n"); + ->debug("Image " + std::to_string(i) + " has no data.\n"); } if (bnds[0] < min_val) min_val = bnds[0]; diff --git a/src/kbmod/search/raw_image.h b/src/kbmod/search/raw_image.h index e4b5c5c4..143b4dd6 100644 --- a/src/kbmod/search/raw_image.h +++ b/src/kbmod/search/raw_image.h @@ -84,7 +84,7 @@ class RawImage { RawImage create_stamp(const Point& p, const int radius, const bool keep_no_data) const; // Compute the min and max bounds of values in the image. - std::array compute_bounds(bool strict_checks=true) const; + std::array compute_bounds(bool strict_checks = true) const; // Convolve the image with a point spread function. void convolve(PSF& psf); diff --git a/src/kbmod/search/stack_search.cpp b/src/kbmod/search/stack_search.cpp index 52efdf68..9837381e 100644 --- a/src/kbmod/search/stack_search.cpp +++ b/src/kbmod/search/stack_search.cpp @@ -43,8 +43,7 @@ StackSearch::StackSearch(ImageStack& imstack) : stack(imstack), results(0), gpu_ // -------------------------------------------- void StackSearch::set_min_obs(int new_value) { - if (new_value < 0) - throw std::runtime_error("min_obs must be >= 0."); + if (new_value < 0) throw std::runtime_error("min_obs must be >= 0."); if (new_value > stack.img_count()) throw std::runtime_error("min_obs cannot be greater than the number of images."); diff --git a/src/kbmod/search/stamp_creator.cpp b/src/kbmod/search/stamp_creator.cpp index ceb34877..ce62722a 100644 --- a/src/kbmod/search/stamp_creator.cpp +++ b/src/kbmod/search/stamp_creator.cpp @@ -8,8 +8,8 @@ void deviceGetCoadds(const uint64_t num_images, const uint64_t width, const uint GPUArray& use_index_vect, GPUArray& results); #endif -std::vector create_stamps(ImageStack& stack, const Trajectory& trj, int radius, - bool keep_no_data, const std::vector& use_index) { +std::vector create_stamps(ImageStack& stack, const Trajectory& trj, int radius, bool keep_no_data, + const std::vector& use_index) { if (use_index.size() > 0) assert_sizes_equal(use_index.size(), stack.img_count(), "create_stamps() use_index"); bool use_all_stamps = (use_index.size() == 0); @@ -76,8 +76,7 @@ std::vector get_coadded_stamps(ImageStack& stack, std::vector get_coadded_stamps_cpu(ImageStack& stack, - std::vector& t_array, +std::vector get_coadded_stamps_cpu(ImageStack& stack, std::vector& t_array, std::vector>& use_index_vect, const StampParameters& params) { const uint64_t num_trajectories = t_array.size(); @@ -155,8 +154,7 @@ bool filter_stamp(const RawImage& img, const StampParameters& params) { return false; } -std::vector get_coadded_stamps_gpu(ImageStack& stack, - std::vector& t_array, +std::vector get_coadded_stamps_gpu(ImageStack& stack, std::vector& t_array, std::vector>& use_index_vect, const StampParameters& params) { logging::Logger* rs_logger = logging::getLogger("kbmod.search.stamp_creator"); @@ -269,8 +267,8 @@ std::vector get_coadded_stamps_gpu(ImageStack& stack, return results; } -std::vector create_variance_stamps(ImageStack& stack, const Trajectory& trj, - int radius, const std::vector& use_index) { +std::vector create_variance_stamps(ImageStack& stack, const Trajectory& trj, int radius, + const std::vector& use_index) { if (use_index.size() > 0) assert_sizes_equal(use_index.size(), stack.img_count(), "create_stamps() use_index"); bool use_all_stamps = (use_index.size() == 0); @@ -337,13 +335,12 @@ static void stamp_creator_bindings(py::module& m) { m.def("get_median_stamp", &search::get_median_stamp, pydocs::DOC_StampCreator_get_median_stamp); m.def("get_mean_stamp", &search::get_mean_stamp, pydocs::DOC_StampCreator_get_mean_stamp); m.def("get_summed_stamp", &search::get_summed_stamp, pydocs::DOC_StampCreator_get_summed_stamp); - m.def("get_coadded_stamps", &search::get_coadded_stamps, - pydocs::DOC_StampCreator_get_coadded_stamps); + m.def("get_coadded_stamps", &search::get_coadded_stamps, pydocs::DOC_StampCreator_get_coadded_stamps); m.def("get_variance_weighted_stamp", &search::get_variance_weighted_stamp, - pydocs::DOC_StampCreator_get_variance_weighted_stamp); + pydocs::DOC_StampCreator_get_variance_weighted_stamp); m.def("create_stamps", &search::create_stamps, pydocs::DOC_StampCreator_create_stamps); m.def("create_variance_stamps", &search::create_variance_stamps, - pydocs::DOC_StampCreator_create_variance_stamps); + pydocs::DOC_StampCreator_create_variance_stamps); m.def("filter_stamp", &search::filter_stamp, pydocs::DOC_StampCreator_filter_stamp); } #endif /* Py_PYTHON_H */ diff --git a/src/kbmod/search/stamp_creator.h b/src/kbmod/search/stamp_creator.h index 5174d404..cd67ce61 100644 --- a/src/kbmod/search/stamp_creator.h +++ b/src/kbmod/search/stamp_creator.h @@ -17,18 +17,18 @@ namespace search { // The indices to use are indicated by use_index: a vector indicating whether to use // each time step. An empty (size=0) vector will use all time steps. static std::vector create_stamps(ImageStack& stack, const Trajectory& trj, int radius, - bool keep_no_data, const std::vector& use_index); + bool keep_no_data, const std::vector& use_index); static std::vector get_stamps(ImageStack& stack, const Trajectory& t, int radius); static RawImage get_median_stamp(ImageStack& stack, const Trajectory& trj, int radius, - const std::vector& use_index); + const std::vector& use_index); static RawImage get_mean_stamp(ImageStack& stack, const Trajectory& trj, int radius, - const std::vector& use_index); + const std::vector& use_index); static RawImage get_summed_stamp(ImageStack& stack, const Trajectory& trj, int radius, - const std::vector& use_index); + const std::vector& use_index); // Compute a mean or summed stamp for each trajectory on the GPU or CPU. // The GPU implementation is slower for small numbers of trajectories (< 500), but performs