Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-14828: Update pybind11 wrappers for 2.2 #56

Merged
merged 3 commits into from
Jul 21, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 2 additions & 7 deletions python/lsst/meas/deblender/baselineUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ void declareBaselineUtils(py::module& mod, const std::string& suffix) {
using ImagePtrT = std::shared_ptr<lsst::afw::image::Image<ImagePixelT>>;
using FootprintPtrT = std::shared_ptr<lsst::afw::detection::Footprint>;
using Class = BaselineUtils<ImagePixelT, MaskPixelT, VariancePixelT>;
using PyClass = py::class_<Class, std::shared_ptr<Class>>;

py::class_<Class> cls(mod, ("BaselineUtils" + suffix).c_str());
py::class_<Class, std::shared_ptr<Class>> cls(mod, ("BaselineUtils" + suffix).c_str());
cls.def_static("symmetrizeFootprint", &Class::symmetrizeFootprint, "foot"_a, "cx"_a, "cy"_a);
// The C++ function returns a std::pair return value but also takes a referenced boolean
// (patchedEdges) that is modified by the function and used by the python API,
Expand Down Expand Up @@ -105,15 +104,11 @@ void declareBaselineUtils(py::module& mod, const std::string& suffix) {

} // <anonymous>

PYBIND11_PLUGIN(baselineUtils) {
PYBIND11_MODULE(baselineUtils, mod) {
py::module::import("lsst.afw.image");
py::module::import("lsst.afw.detection");

py::module mod("baselineUtils");

declareBaselineUtils<float>(mod, "F");

return mod.ptr();
}

} // deblender
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/meas/deblender/deblend.py
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,7 @@ def skipParent(self, source, masks):
----------
source: `lsst.afw.table.source.source.SourceRecord`
The source to flag as skipped
masks: list of `lsst.afw.image.mask.mask.MaskX`
masks: list of `lsst.afw.image.MaskX`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This maybe could be updated to just say Mask, as the Mask constructor will resolve to MaskX. It was designed so people would not need to know the details of the mask extension. However, as the concrete type is MaskX it would be appropriate to leave it as you have it as well.

The mask in each band to update with the non-detection
"""
fp = source.getFootprint()
Expand Down