-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3242c00
commit c54369f
Showing
7 changed files
with
209 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* This file is part of afw. | ||
* | ||
* Developed for the LSST Data Management System. | ||
* This product includes software developed by the LSST Project | ||
* (https://www.lsst.org). | ||
* See the COPYRIGHT file at the top-level directory of this distribution | ||
* for details of code ownership. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
// Testing helper module that let's us conveniently invoke c++ methods that should | ||
// get overridden in python-derived subclasses of Psf. | ||
|
||
#include <pybind11/pybind11.h> | ||
|
||
#include "lsst/afw/detection/Psf.h" | ||
|
||
namespace lsst { | ||
namespace afw { | ||
namespace detection { | ||
|
||
namespace { | ||
|
||
std::shared_ptr<Psf> resizedPsf(const Psf& psf, int nx, int ny) { | ||
return psf.resized(nx, ny); | ||
} | ||
|
||
std::shared_ptr<Psf> clonedPsf(const Psf& psf) { | ||
return psf.clone(); | ||
} | ||
|
||
std::shared_ptr<typehandling::Storable> clonedStorablePsf(const Psf& psf) { | ||
return psf.cloneStorable(); | ||
} | ||
|
||
} | ||
|
||
PYBIND11_MODULE(testPsfTrampolineLib, mod) { | ||
mod.def("resizedPsf", &resizedPsf); | ||
mod.def("clonedPsf", &clonedPsf); | ||
mod.def("clonedStorablePsf", &clonedStorablePsf); | ||
} | ||
|
||
} // namespace detection | ||
} // namespace afw | ||
} // namespace lsst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters