-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from lsst/tickets/DM-12370
DM-12370: Add piecewise TransmissionCurve for coadds.
- Loading branch information
Showing
7 changed files
with
640 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// -*- lsst-c++ -*- | ||
/* | ||
* LSST Data Management System | ||
* Copyright 2018 LSST/AURA. | ||
* | ||
* This product includes software developed by the | ||
* LSST Project (http://www.lsst.org/). | ||
* | ||
* 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 LSST License Statement and | ||
* the GNU General Public License along with this program. If not, | ||
* see <http://www.lsstcorp.org/LegalNotices/>. | ||
*/ | ||
|
||
#ifndef LSST_MEAS_ALGORITHMS_CoaddTransmissionCurve_h_INCLUDED | ||
#define LSST_MEAS_ALGORITHMS_CoaddTransmissionCurve_h_INCLUDED | ||
|
||
#include "lsst/afw/image/TransmissionCurve.h" | ||
#include "lsst/afw/table/Exposure.h" | ||
|
||
namespace lsst { namespace meas { namespace algorithms { | ||
|
||
/** | ||
* Create a TransmissionCurve that represents the effective throughput on a coadd. | ||
* | ||
* @param[in] coaddWcs WCS that relates the coadd coordinate system to the sky. | ||
* @param[in] inputSensors A catalog containing the WCSs, bounding boxes and polygons, | ||
* coaddition weights (in a field called 'weight'), and | ||
* TransmissionCurves of the sensor-level images that went | ||
* into the coadd. | ||
* | ||
* @throws NotFoundError Thrown if the 'weight' field does not exist in the schema. | ||
* | ||
* @throws InvalidParameterError Thrown if one or more inputs do not have a TransmissionCurve or | ||
* a Wcs (ValidPolygons may be null to | ||
* indicate no spatial restrictions other | ||
* than the bounding box). | ||
* | ||
* @returns a new TransmissionCurve object. | ||
*/ | ||
std::shared_ptr<afw::image::TransmissionCurve const> makeCoaddTransmissionCurve( | ||
std::shared_ptr<afw::image::Wcs const> coaddWcs, | ||
afw::table::ExposureCatalog const & inputSensors | ||
); | ||
|
||
}}} // namespace lsst::meas::algorithms | ||
|
||
#endif // !LSST_MEAS_ALGORITHMS_CoaddTransmissionCurve_h_INCLUDED |
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,41 @@ | ||
/* | ||
* LSST Data Management System | ||
* Copyright 2018 LSST/AURA. | ||
* | ||
* This product includes software developed by the | ||
* LSST Project (http://www.lsst.org/). | ||
* See the COPYRIGHT file | ||
* | ||
* 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 LSST License Statement and | ||
* the GNU General Public License along with this program. If not, | ||
* see <https://www.lsstcorp.org/LegalNotices/>. | ||
*/ | ||
#include "pybind11/pybind11.h" | ||
|
||
#include "lsst/meas/algorithms/CoaddTransmissionCurve.h" | ||
#include "lsst/afw/image/Wcs.h" | ||
|
||
namespace py = pybind11; | ||
using namespace pybind11::literals; | ||
|
||
namespace lsst { namespace meas { namespace algorithms { | ||
|
||
PYBIND11_PLUGIN(coaddTransmissionCurve) { | ||
py::module mod("coaddTransmissionCurve"); | ||
py::module::import("lsst.afw.image"); | ||
py::module::import("lsst.afw.table"); | ||
mod.def("makeCoaddTransmissionCurve", &makeCoaddTransmissionCurve, "coaddWcs"_a, "inputSensors"_a); | ||
return mod.ptr(); | ||
} | ||
|
||
}}} // lsst::meas::algorithms |
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
Oops, something went wrong.