diff --git a/python/lsst/afw/image/_photoCalib.cc b/python/lsst/afw/image/_photoCalib.cc index df010cfcb..1a4f4e0d4 100644 --- a/python/lsst/afw/image/_photoCalib.cc +++ b/python/lsst/afw/image/_photoCalib.cc @@ -80,11 +80,11 @@ void declarePhotoCalib(lsst::cpputils::python::WrapperCollection &wrappers) { /* Members - nanojansky */ cls.def("instFluxToNanojansky", - (double (PhotoCalib::*)(double, lsst::geom::Point const &) const) & + (double(PhotoCalib::*)(double, lsst::geom::Point const &) const) & PhotoCalib::instFluxToNanojansky, "instFlux"_a, "point"_a); cls.def("instFluxToNanojansky", - (double (PhotoCalib::*)(double) const) & PhotoCalib::instFluxToNanojansky, + (double(PhotoCalib::*)(double) const) & PhotoCalib::instFluxToNanojansky, "instFlux"_a); cls.def("instFluxToNanojansky", @@ -109,18 +109,18 @@ void declarePhotoCalib(lsst::cpputils::python::WrapperCollection &wrappers) { "sourceCatalog"_a, "instFluxField"_a); cls.def("instFluxToNanojansky", - (void (PhotoCalib::*)(afw::table::SourceCatalog &, std::string const &, - std::string const &) const) & + (void(PhotoCalib::*)(afw::table::SourceCatalog &, std::string const &, + std::string const &) const) & PhotoCalib::instFluxToNanojansky, "sourceCatalog"_a, "instFluxField"_a, "outField"_a); /* Members - magnitudes */ cls.def("instFluxToMagnitude", - (double (PhotoCalib::*)(double, lsst::geom::Point const &) const) & + (double(PhotoCalib::*)(double, lsst::geom::Point const &) const) & PhotoCalib::instFluxToMagnitude, "instFlux"_a, "point"_a); cls.def("instFluxToMagnitude", - (double (PhotoCalib::*)(double) const) & PhotoCalib::instFluxToMagnitude, + (double(PhotoCalib::*)(double) const) & PhotoCalib::instFluxToMagnitude, "instFlux"_a); cls.def("instFluxToMagnitude", @@ -145,8 +145,8 @@ void declarePhotoCalib(lsst::cpputils::python::WrapperCollection &wrappers) { "sourceCatalog"_a, "instFluxField"_a); cls.def("instFluxToMagnitude", - (void (PhotoCalib::*)(afw::table::SourceCatalog &, std::string const &, - std::string const &) const) & + (void(PhotoCalib::*)(afw::table::SourceCatalog &, std::string const &, + std::string const &) const) & PhotoCalib::instFluxToMagnitude, "sourceCatalog"_a, "instFluxField"_a, "outField"_a); diff --git a/src/image/PhotoCalib.cc b/src/image/PhotoCalib.cc index 421e763cc..fec13e596 100644 --- a/src/image/PhotoCalib.cc +++ b/src/image/PhotoCalib.cc @@ -58,7 +58,9 @@ int const SERIALIZATION_VERSION = 1; double toNanojansky(double instFlux, double scale) { return instFlux * scale; } -double toMagnitude(double instFlux, double scale) { return cpputils::nanojanskyToABMagnitude(instFlux * scale); } +double toMagnitude(double instFlux, double scale) { + return cpputils::nanojanskyToABMagnitude(instFlux * scale); +} double toInstFluxFromMagnitude(double magnitude, double scale) { // Note: flux[nJy] / scale = instFlux[counts] @@ -446,8 +448,8 @@ class PhotoCalibSchema { class PhotoCalibFactory : public table::io::PersistableFactory { public: - std::shared_ptr - read(InputArchive const &archive, CatalogVector const &catalogs) const override { + std::shared_ptr read(InputArchive const &archive, + CatalogVector const &catalogs) const override { table::BaseRecord const &record = catalogs.front().front(); PhotoCalibSchema const &keys = PhotoCalibSchema::get(); int version = getVersion(record); @@ -529,7 +531,7 @@ class CalibFactory : public table::io::PersistableFactory { int tableVersion = 1; try { catalogs.front().getSchema().find(EXPTIME_FIELD_NAME); - } catch (pex::exceptions::NotFoundError const&) { + } catch (pex::exceptions::NotFoundError const &) { tableVersion = CALIB_TABLE_CURRENT_VERSION; } @@ -540,8 +542,8 @@ class CalibFactory : public table::io::PersistableFactory { table::BaseRecord const &record = catalogs.front().front(); double calibration = cpputils::referenceFlux / record.get(keys.fluxMag0); - double calibrationErr = - cpputils::referenceFlux * record.get(keys.fluxMag0Err) / std::pow(record.get(keys.fluxMag0), 2); + double calibrationErr = cpputils::referenceFlux * record.get(keys.fluxMag0Err) / + std::pow(record.get(keys.fluxMag0), 2); return std::make_shared(calibration, calibrationErr); }