Skip to content

Commit

Permalink
switch back to original name
Browse files Browse the repository at this point in the history
  • Loading branch information
PFLeget committed Sep 17, 2024
1 parent e55200a commit c3c8494
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion include/lsst/meas/algorithms/Interp.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class Defect : public afw::image::DefectBase {
};

template <typename MaskedImageT>
void interpolateOverDefectsOld(MaskedImageT &image, afw::detection::Psf const &psf,
void interpolateOverDefects(MaskedImageT &image, afw::detection::Psf const &psf,
std::vector<Defect::Ptr> &badList, double fallbackValue = 0.0,
bool useFallbackValueAtEdge = false);

Expand Down
8 changes: 4 additions & 4 deletions python/lsst/meas/algorithms/interp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ namespace algorithms {
namespace {

template <typename PixelT>
void declareInterpolateOverDefectsOld(py::module& mod) {
mod.def("interpolateOverDefectsOld",
interpolateOverDefectsOld<
void declareInterpolateOverDefects(py::module& mod) {
mod.def("legacyInterpolateOverDefects",
interpolateOverDefects<
afw::image::MaskedImage<PixelT, afw::image::MaskPixel, afw::image::VariancePixel>>,
"image"_a, "psf"_a, "badList"_a, "fallBackValue"_a = 0.0, "useFallbackValueAtEdge"_a = false);
}
Expand All @@ -65,7 +65,7 @@ void declareInterp(lsst::cpputils::python::WrapperCollection &wrappers) {
enm.value("RIGHT", Defect::DefectPosition::RIGHT);
enm.export_values();
});
declareInterpolateOverDefectsOld<float>(wrappers.module);
declareInterpolateOverDefects<float>(wrappers.module);
}

} // namespace
Expand Down
4 changes: 2 additions & 2 deletions python/lsst/meas/algorithms/interp.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from . import interpolateOverDefectsOld
from . import legacyInterpolateOverDefects
from . import interpolateOverDefectsGP

__all__ = ["interpolateOverDefects"]
Expand All @@ -16,7 +16,7 @@ def interpolateOverDefects(
**kwargs
):
if useLegacyInterp:
return interpolateOverDefectsOld(
return legacyInterpolateOverDefects(
image, psf, badList, fallbackValue, useFallbackValueAtEdge
)
else:
Expand Down
22 changes: 11 additions & 11 deletions src/Interp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2044,11 +2044,11 @@ struct Sort_ByX0 {
* @brief Process a set of known bad pixels in an image
*/
template <typename MaskedImageT>
void interpolateOverDefectsOld(MaskedImageT &mimage, ///< Image to patch
afw::detection::Psf const &, ///< the Image's PSF (not yet used by interpolator)
std::vector<Defect::Ptr> &_badList, ///< List of Defects to patch
double fallbackValue, ///< Value to fallback to if all else fails
bool useFallbackValueAtEdge ///< Use the fallback value at the image's edge?
void interpolateOverDefects(MaskedImageT &mimage, ///< Image to patch
afw::detection::Psf const &, ///< the Image's PSF (not yet used by interpolator)
std::vector<Defect::Ptr> &_badList, ///< List of Defects to patch
double fallbackValue, ///< Value to fallback to if all else fails
bool useFallbackValueAtEdge ///< Use the fallback value at the image's edge?
) {
/*
* Allow for image's origin
Expand Down Expand Up @@ -2231,19 +2231,19 @@ std::pair<bool, typename MaskedImageT::Image::Pixel> interp::singlePixel(

typedef float ImagePixel;

template void interpolateOverDefectsOld(afw::image::MaskedImage<ImagePixel, afw::image::MaskPixel> &image,
afw::detection::Psf const &, std::vector<Defect::Ptr> &badList, double,
bool);
template void interpolateOverDefects(afw::image::MaskedImage<ImagePixel, afw::image::MaskPixel> &image,
afw::detection::Psf const &, std::vector<Defect::Ptr> &badList, double,
bool);
template std::pair<bool, ImagePixel> interp::singlePixel(
int x, int y, afw::image::MaskedImage<ImagePixel, afw::image::MaskPixel> const &image,
bool horizontal, double minval);
//
// Why do we need double images?
//
#if 1
template void interpolateOverDefectsOld(afw::image::MaskedImage<double, afw::image::MaskPixel> &image,
afw::detection::Psf const &, std::vector<Defect::Ptr> &badList, double,
bool);
template void interpolateOverDefects(afw::image::MaskedImage<double, afw::image::MaskPixel> &image,
afw::detection::Psf const &, std::vector<Defect::Ptr> &badList, double,
bool);

template std::pair<bool, double> interp::singlePixel(
int x, int y, afw::image::MaskedImage<double, afw::image::MaskPixel> const &image, bool horizontal,
Expand Down

0 comments on commit c3c8494

Please sign in to comment.