Skip to content

Commit

Permalink
Use fuctions from cmath where applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
Pim Schellart authored and Pim Schellart committed May 11, 2016
1 parent 92a194c commit 94ec89c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/lsst/ip/isr.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
#include <memory>
#include <string>
#include <vector>
#include <cmath>

#include <lsst/afw/math.h>
#include <lsst/afw/math/Statistics.h>
#include <lsst/afw/image.h>
#include <lsst/utils/ieee.h>
#include <lsst/pex/exceptions/Exception.h>

/** \brief Remove all non-astronomical counts from the Chunk Exposure's pixels.
Expand Down
5 changes: 3 additions & 2 deletions src/Isr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* see <http://www.lsstcorp.org/LegalNotices/>.
*/

#include <cmath>

#include "lsst/pex/logging/Trace.h"
#include "lsst/afw/math.h"
Expand Down Expand Up @@ -65,8 +66,8 @@ size_t maskNans(afw::image::MaskedImage<PixelT> const& mi, afw::image::MaskPixel
size_t nPix = 0;
for (int y = 0; y != mi.getHeight(); ++y) {
for (x_iterator ptr = mi.row_begin(y), end = mi.row_end(y); ptr != end; ++ptr) {
if (!(ptr.mask() & allow) && (!utils::lsst_isfinite(ptr.image()) ||
!utils::lsst_isfinite(ptr.variance()))) {
if (!(ptr.mask() & allow) && (!std::isfinite(ptr.image()) ||
!std::isfinite(ptr.variance()))) {
nPix += 1;
ptr.mask() |= maskVal;
}
Expand Down

0 comments on commit 94ec89c

Please sign in to comment.