LSSTApplications  18.0.0+106,18.0.0+50,19.0.0,19.0.0+1,19.0.0+10,19.0.0+11,19.0.0+13,19.0.0+17,19.0.0+2,19.0.0-1-g20d9b18+6,19.0.0-1-g425ff20,19.0.0-1-g5549ca4,19.0.0-1-g580fafe+6,19.0.0-1-g6fe20d0+1,19.0.0-1-g7011481+9,19.0.0-1-g8c57eb9+6,19.0.0-1-gb5175dc+11,19.0.0-1-gdc0e4a7+9,19.0.0-1-ge272bc4+6,19.0.0-1-ge3aa853,19.0.0-10-g448f008b,19.0.0-12-g6990b2c,19.0.0-2-g0d9f9cd+11,19.0.0-2-g3d9e4fb2+11,19.0.0-2-g5037de4,19.0.0-2-gb96a1c4+3,19.0.0-2-gd955cfd+15,19.0.0-3-g2d13df8,19.0.0-3-g6f3c7dc,19.0.0-4-g725f80e+11,19.0.0-4-ga671dab3b+1,19.0.0-4-gad373c5+3,19.0.0-5-ga2acb9c+2,19.0.0-5-gfe96e6c+2,w.2020.01
LSSTDataManagementBasePackage
Stack.cc
Go to the documentation of this file.
1 // -*- lsst-c++ -*-
2 
3 /*
4  * LSST Data Management System
5  * Copyright 2008, 2009, 2010 LSST Corporation.
6  *
7  * This product includes software developed by the
8  * LSST Project (http://www.lsst.org/).
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the LSST License Statement and
21  * the GNU General Public License along with this program. If not,
22  * see <http://www.lsstcorp.org/LegalNotices/>.
23  */
24 
25 /*
26  * Provide functions to stack images
27  *
28  */
29 #include <vector>
30 #include <cassert>
31 #include <memory>
32 
33 #include "lsst/base.h"
34 #include "lsst/pex/exceptions.h"
35 #include "lsst/afw/math/Stack.h"
37 
39 
40 namespace lsst {
41 namespace afw {
42 namespace math {
43 
44 namespace {
45 typedef std::vector<WeightPixel> WeightVector; // vector of weights (yes, really)
49 int bitcount(unsigned int x) {
50  int b;
51  for (b = 0; x != 0; x >>= 1) {
52  if (x & 01) {
53  b++;
54  }
55  }
56  return b;
57 }
58 
62 void checkOnlyOneFlag(unsigned int flags) {
63  if (bitcount(flags & ~ERRORS) != 1) {
65  "Requested more than one type of statistic to make the image stack.");
66  }
67 }
68 
72 template <typename ObjectVectorT, typename WeightVectorT>
73 void checkObjectsAndWeights(ObjectVectorT const &objects, WeightVectorT const &wvector) {
74  if (objects.size() == 0) {
75  throw LSST_EXCEPT(pexExcept::LengthError, "Please specify at least one object to stack");
76  }
77 
78  if (!wvector.empty() && wvector.size() != objects.size()) {
80  str(boost::format("Weight vector has different length "
81  "from number of objects to be stacked: %d v. %d") %
82  wvector.size() % objects.size()));
83  }
84 }
85 
86 template <typename ImageT>
87 void checkImageSizes(ImageT const &out, std::vector<std::shared_ptr<ImageT>> const &images) {
88  lsst::geom::Extent2I const &dim = out.getDimensions();
89  for (unsigned int i = 0; i < images.size(); ++i) {
90  if (images[i]->getDimensions() != dim) {
92  (boost::format("Bad dimensions for image %d: %dx%d vs %dx%d") % i %
93  images[i]->getDimensions().getX() % images[i]->getDimensions().getY() %
94  dim.getX() % dim.getY())
95  .str());
96  }
97  }
98 }
99 
100 /* ************************************************************************** *
101  *
102  * stack MaskedImages
103  *
104  * ************************************************************************** */
105 
107 
115 template <typename PixelT, bool isWeighted, bool useVariance>
116 void computeMaskedImageStack(image::MaskedImage<PixelT> &imgStack,
118  Property flags, StatisticsControl const &sctrl, image::MaskPixel const clipped,
120  WeightVector const &wvector = WeightVector()) {
121  // get a list of row_begin iterators
122  typedef typename image::MaskedImage<PixelT>::x_iterator x_iterator;
124  rows.reserve(images.size());
125 
126  MaskedVector<PixelT> pixelSet(images.size()); // a pixel from x,y for each image
127  WeightVector weights; // weights; non-const version
128  //
129  StatisticsControl sctrlTmp(sctrl);
130 
131  if (useVariance) { // weight using the variance image
132  assert(isWeighted);
133  assert(wvector.empty());
134 
135  weights.resize(images.size());
136 
137  sctrlTmp.setWeighted(true);
138  } else if (isWeighted) {
139  weights.assign(wvector.begin(), wvector.end());
140 
141  sctrlTmp.setWeighted(true);
142  }
143  assert(weights.empty() || weights.size() == images.size());
144 
145  // loop over x,y ... the loop over the stack to fill pixelSet
146  // - get the stats on pixelSet and put the value in the output image at x,y
147  for (int y = 0; y != imgStack.getHeight(); ++y) {
148  for (unsigned int i = 0; i < images.size(); ++i) {
149  x_iterator ptr = images[i]->row_begin(y);
150  if (y == 0) {
151  rows.push_back(ptr);
152  } else {
153  rows[i] = ptr;
154  }
155  }
156 
157  for (x_iterator ptr = imgStack.row_begin(y), end = imgStack.row_end(y); ptr != end; ++ptr) {
158  typename MaskedVector<PixelT>::iterator psPtr = pixelSet.begin();
159  WeightVector::iterator wtPtr = weights.begin();
160  for (unsigned int i = 0; i < images.size(); ++rows[i], ++i, ++psPtr, ++wtPtr) {
161  *psPtr = *rows[i];
162  if (useVariance) { // we're weighting using the variance
163  *wtPtr = 1.0 / rows[i].variance();
164  }
165  }
166 
167  Property const eflags = static_cast<Property>(flags | NPOINT | ERRORS | NCLIPPED | NMASKED);
168  Statistics stat = isWeighted ? makeStatistics(pixelSet, weights, eflags, sctrlTmp)
169  : makeStatistics(pixelSet, eflags, sctrlTmp);
170 
171  PixelT variance = ::pow(stat.getError(flags), 2);
172  image::MaskPixel msk(stat.getOrMask());
173  int const npoint = stat.getValue(NPOINT);
174  if (npoint == 0) {
175  msk = sctrlTmp.getNoGoodPixelsMask();
176  } else if (npoint == 1) {
177  /*
178  * you should be using sctrl.setCalcErrorFromInputVariance(true) if you want to avoid
179  * getting a variance of NaN when you only have one input
180  */
181  }
182  // Check to see if any pixels were rejected due to clipping
183  if (stat.getValue(NCLIPPED) > 0) {
184  msk |= clipped;
185  }
186  // Check to see if any pixels were rejected by masking, and apply
187  // any associated masks to the result.
188  if (stat.getValue(NMASKED) > 0) {
189  for (auto const &pair : maskMap) {
190  for (auto pp = pixelSet.begin(); pp != pixelSet.end(); ++pp) {
191  if ((*pp).mask() & pair.first) {
192  msk |= pair.second;
193  break;
194  }
195  }
196  }
197  }
198 
199  *ptr = typename image::MaskedImage<PixelT>::Pixel(stat.getValue(flags), msk, variance);
200  }
201  }
202 }
203 template <typename PixelT, bool isWeighted, bool useVariance>
204 void computeMaskedImageStack(image::MaskedImage<PixelT> &imgStack,
206  Property flags, StatisticsControl const &sctrl, image::MaskPixel const clipped,
207  image::MaskPixel const excuse, WeightVector const &wvector = WeightVector()) {
209  maskMap.push_back(std::make_pair(sctrl.getAndMask() & ~excuse, clipped));
210  computeMaskedImageStack<PixelT, isWeighted, useVariance>(imgStack, images, flags, sctrl, clipped, maskMap,
211  wvector);
212 }
214 
215 } // end anonymous namespace
216 
217 template <typename PixelT>
220  StatisticsControl const &sctrl, WeightVector const &wvector, image::MaskPixel clipped,
221  image::MaskPixel excuse) {
222  if (images.size() == 0) {
223  throw LSST_EXCEPT(pexExcept::LengthError, "Please specify at least one image to stack");
224  }
226  new image::MaskedImage<PixelT>(images[0]->getDimensions()));
227  statisticsStack(*out, images, flags, sctrl, wvector, clipped, excuse);
228  return out;
229 }
230 
231 template <typename PixelT>
234  StatisticsControl const &sctrl, WeightVector const &wvector, image::MaskPixel clipped,
236  if (images.size() == 0) {
237  throw LSST_EXCEPT(pexExcept::LengthError, "Please specify at least one image to stack");
238  }
240  new image::MaskedImage<PixelT>(images[0]->getDimensions()));
241  statisticsStack(*out, images, flags, sctrl, wvector, clipped, maskMap);
242  return out;
243 }
244 
245 template <typename PixelT>
248  StatisticsControl const &sctrl, WeightVector const &wvector, image::MaskPixel clipped,
249  image::MaskPixel excuse) {
250  checkObjectsAndWeights(images, wvector);
251  checkOnlyOneFlag(flags);
252  checkImageSizes(out, images);
253 
254  if (sctrl.getWeighted()) {
255  if (wvector.empty()) {
256  return computeMaskedImageStack<PixelT, true, true>(out, images, flags, sctrl, clipped,
257  excuse); // use variance
258  } else {
259  return computeMaskedImageStack<PixelT, true, false>(out, images, flags, sctrl, clipped, excuse,
260  wvector); // use wvector
261  }
262  } else {
263  return computeMaskedImageStack<PixelT, false, false>(out, images, flags, sctrl, clipped, excuse);
264  }
265 }
266 
267 template <typename PixelT>
270  StatisticsControl const &sctrl, WeightVector const &wvector, image::MaskPixel clipped,
272  checkObjectsAndWeights(images, wvector);
273  checkOnlyOneFlag(flags);
274  checkImageSizes(out, images);
275 
276  if (sctrl.getWeighted()) {
277  if (wvector.empty()) {
278  return computeMaskedImageStack<PixelT, true, true>(out, images, flags, sctrl, clipped,
279  maskMap); // use variance
280  } else {
281  return computeMaskedImageStack<PixelT, true, false>(out, images, flags, sctrl, clipped, maskMap,
282  wvector); // use wvector
283  }
284  } else {
285  return computeMaskedImageStack<PixelT, false, false>(out, images, flags, sctrl, clipped, maskMap);
286  }
287 }
288 
289 namespace {
290 /* ************************************************************************** *
291  *
292  * stack Images
293  *
294  * All the work is done in the function comuteImageStack.
295  * A boolean template variable has been used to allow the compiler to generate the different instantiations
296  * to handle cases when we are, or are not, weighting
297  *
298  * ************************************************************************** */
305 template <typename PixelT, bool isWeighted>
306 void computeImageStack(image::Image<PixelT> &imgStack,
308  StatisticsControl const &sctrl, WeightVector const &weights = WeightVector()) {
309  MaskedVector<PixelT> pixelSet(images.size()); // a pixel from x,y for each image
310  StatisticsControl sctrlTmp(sctrl);
311 
312  // set the mask to be an infinite iterator
314 
315  if (!weights.empty()) {
316  sctrlTmp.setWeighted(true);
317  }
318 
319  // get the desired statistic
320  for (int y = 0; y != imgStack.getHeight(); ++y) {
321  for (int x = 0; x != imgStack.getWidth(); ++x) {
322  for (unsigned int i = 0; i != images.size(); ++i) {
323  (*pixelSet.getImage())(i, 0) = (*images[i])(x, y);
324  }
325 
326  if (isWeighted) {
327  imgStack(x, y) = makeStatistics(pixelSet, weights, flags, sctrlTmp).getValue();
328  } else {
329  imgStack(x, y) = makeStatistics(pixelSet, weights, flags, sctrlTmp).getValue();
330  }
331  }
332  }
333 }
334 
335 } // end anonymous namespace
336 
337 template <typename PixelT>
340  StatisticsControl const &sctrl, WeightVector const &wvector) {
341  if (images.size() == 0) {
342  throw LSST_EXCEPT(pexExcept::LengthError, "Please specify at least one image to stack");
343  }
344  std::shared_ptr<image::Image<PixelT>> out(new image::Image<PixelT>(images[0]->getDimensions()));
345  statisticsStack(*out, images, flags, sctrl, wvector);
346  return out;
347 }
348 
349 template <typename PixelT>
351  Property flags, StatisticsControl const &sctrl, WeightVector const &wvector) {
352  checkObjectsAndWeights(images, wvector);
353  checkOnlyOneFlag(flags);
354  checkImageSizes(out, images);
355 
356  if (wvector.empty()) {
357  return computeImageStack<PixelT, false>(out, images, flags, sctrl);
358  } else {
359  return computeImageStack<PixelT, true>(out, images, flags, sctrl, wvector);
360  }
361 }
362 
363 /* ************************************************************************** *
364  *
365  * stack VECTORS
366  *
367  * ************************************************************************** */
368 
369 namespace {
370 
377 template <typename PixelT, bool isWeighted>
378 std::vector<PixelT> computeVectorStack(
379  std::vector<std::vector<PixelT>> &vectors, Property flags,
380  StatisticsControl const &sctrl, WeightVector const &wvector = WeightVector()) {
381  // create the image to be returned
382  typedef std::vector<PixelT> Vect;
383  Vect vecStack(vectors[0].size(), 0.0);
384 
385  MaskedVector<PixelT> pixelSet(vectors.size()); // values from a given pixel of each image
386 
387  StatisticsControl sctrlTmp(sctrl);
388  // set the mask to be an infinite iterator
390 
391  if (!wvector.empty()) {
392  sctrlTmp.setWeighted(true);
393  }
394 
395  // collect elements from the stack into the MaskedVector to do stats
396  for (unsigned int x = 0; x < vectors[0].size(); ++x) {
397  typename MaskedVector<PixelT>::iterator psPtr = pixelSet.begin();
398  for (unsigned int i = 0; i < vectors.size(); ++i, ++psPtr) {
399  psPtr.value() = (vectors[i])[x];
400  }
401 
402  if (isWeighted) {
403  (vecStack)[x] = makeStatistics(pixelSet, wvector, flags, sctrlTmp).getValue(flags);
404  } else {
405  (vecStack)[x] = makeStatistics(pixelSet, flags, sctrlTmp).getValue(flags);
406  }
407  }
408 
409  return vecStack;
410 }
411 
412 } // end anonymous namespace
413 
414 template <typename PixelT>
416  std::vector<std::vector<PixelT>> &vectors, Property flags,
417  StatisticsControl const &sctrl, WeightVector const &wvector) {
418  checkObjectsAndWeights(vectors, wvector);
419  checkOnlyOneFlag(flags);
420 
421  if (wvector.empty()) {
422  return computeVectorStack<PixelT, false>(vectors, flags, sctrl);
423  } else {
424  return computeVectorStack<PixelT, true>(vectors, flags, sctrl, wvector);
425  }
426 }
427 
428 /* ************************************************************************ *
429  *
430  * XY row column stacking
431  *
432  * ************************************************************************ */
433 
434 template <typename PixelT>
436  char dimension, StatisticsControl const &sctrl) {
437  int x0 = image.getX0();
438  int y0 = image.getY0();
439  typedef image::MaskedImage<PixelT> MImage;
441 
442  // do each row or column, one at a time
443  // - create a subimage with a bounding box, and get the stats and assign the value to the output image
444  if (dimension == 'x') {
445  imgOut = std::shared_ptr<MImage>(new MImage(lsst::geom::Extent2I(1, image.getHeight())));
446  int y = y0;
447  typename MImage::y_iterator oEnd = imgOut->col_end(0);
448  for (typename MImage::y_iterator oPtr = imgOut->col_begin(0); oPtr != oEnd; ++oPtr, ++y) {
451  image::Image<PixelT> subImage(image, bbox);
452  Statistics stat = makeStatistics(subImage, flags | ERRORS, sctrl);
453  *oPtr = typename image::MaskedImage<PixelT>::Pixel(stat.getValue(), 0x0,
454  stat.getError() * stat.getError());
455  }
456 
457  } else if (dimension == 'y') {
458  imgOut = std::shared_ptr<MImage>(new MImage(lsst::geom::Extent2I(image.getWidth(), 1)));
459  int x = x0;
460  typename MImage::x_iterator oEnd = imgOut->row_end(0);
461  for (typename MImage::x_iterator oPtr = imgOut->row_begin(0); oPtr != oEnd; ++oPtr, ++x) {
464  image::Image<PixelT> subImage(image, bbox);
465  Statistics stat = makeStatistics(subImage, flags | ERRORS, sctrl);
466  *oPtr = typename image::MaskedImage<PixelT>::Pixel(stat.getValue(), 0x0,
467  stat.getError() * stat.getError());
468  }
469  } else {
471  "Can only run statisticsStack in x or y for single image.");
472  }
473 
474  return imgOut;
475 }
476 
477 template <typename PixelT>
479  Property flags, char dimension,
480  StatisticsControl const &sctrl) {
481  int const x0 = image.getX0();
482  int const y0 = image.getY0();
483  typedef image::MaskedImage<PixelT> MImage;
485 
486  // do each row or column, one at a time
487  // - create a subimage with a bounding box, and get the stats and assign the value to the output image
488  if (dimension == 'x') {
489  imgOut = std::shared_ptr<MImage>(new MImage(lsst::geom::Extent2I(1, image.getHeight())));
490  int y = 0;
491  typename MImage::y_iterator oEnd = imgOut->col_end(0);
492  for (typename MImage::y_iterator oPtr = imgOut->col_begin(0); oPtr != oEnd; ++oPtr, ++y) {
495  image::MaskedImage<PixelT> subImage(image, bbox);
496  Statistics stat = makeStatistics(subImage, flags | ERRORS, sctrl);
497  *oPtr = typename image::MaskedImage<PixelT>::Pixel(stat.getValue(), 0x0,
498  stat.getError() * stat.getError());
499  }
500 
501  } else if (dimension == 'y') {
502  imgOut = std::shared_ptr<MImage>(new MImage(lsst::geom::Extent2I(image.getWidth(), 1)));
503  int x = 0;
504  typename MImage::x_iterator oEnd = imgOut->row_end(0);
505  for (typename MImage::x_iterator oPtr = imgOut->row_begin(0); oPtr != oEnd; ++oPtr, ++x) {
508  image::MaskedImage<PixelT> subImage(image, bbox);
509  Statistics stat = makeStatistics(subImage, flags | ERRORS, sctrl);
510  *oPtr = typename image::MaskedImage<PixelT>::Pixel(stat.getValue(), 0x0,
511  stat.getError() * stat.getError());
512  }
513  } else {
515  "Can only run statisticsStack in x or y for single image.");
516  }
517 
518  return imgOut;
519 }
520 
521 /*
522  * Explicit Instantiations
523  *
524  */
526 #define INSTANTIATE_STACKS(TYPE) \
527  template std::shared_ptr<image::Image<TYPE>> statisticsStack<TYPE>( \
528  std::vector<std::shared_ptr<image::Image<TYPE>>> & images, Property flags, \
529  StatisticsControl const &sctrl, WeightVector const &wvector); \
530  template void statisticsStack<TYPE>( \
531  image::Image<TYPE> & out, std::vector<std::shared_ptr<image::Image<TYPE>>> & images, \
532  Property flags, StatisticsControl const &sctrl, WeightVector const &wvector); \
533  template std::shared_ptr<image::MaskedImage<TYPE>> statisticsStack<TYPE>( \
534  std::vector<std::shared_ptr<image::MaskedImage<TYPE>>> & images, Property flags, \
535  StatisticsControl const &sctrl, WeightVector const &wvector, image::MaskPixel, \
536  image::MaskPixel); \
537  template std::shared_ptr<image::MaskedImage<TYPE>> statisticsStack<TYPE>( \
538  std::vector<std::shared_ptr<image::MaskedImage<TYPE>>> & images, Property flags, \
539  StatisticsControl const &sctrl, WeightVector const &wvector, image::MaskPixel, \
540  std::vector<std::pair<image::MaskPixel, image::MaskPixel>> const &); \
541  template void statisticsStack<TYPE>(image::MaskedImage<TYPE> & out, \
542  std::vector<std::shared_ptr<image::MaskedImage<TYPE>>> & images, \
543  Property flags, StatisticsControl const &sctrl, \
544  WeightVector const &wvector, image::MaskPixel, image::MaskPixel); \
545  template void statisticsStack<TYPE>( \
546  image::MaskedImage<TYPE> & out, std::vector<std::shared_ptr<image::MaskedImage<TYPE>>> & images, \
547  Property flags, StatisticsControl const &sctrl, WeightVector const &wvector, image::MaskPixel, \
548  std::vector<std::pair<image::MaskPixel, image::MaskPixel>> const &); \
549  template std::vector<TYPE> statisticsStack<TYPE>( \
550  std::vector<std::vector<TYPE>> & vectors, Property flags, \
551  StatisticsControl const &sctrl, WeightVector const &wvector); \
552  template std::shared_ptr<image::MaskedImage<TYPE>> statisticsStack(image::Image<TYPE> const &image, \
553  Property flags, char dimension, \
554  StatisticsControl const &sctrl); \
555  template std::shared_ptr<image::MaskedImage<TYPE>> statisticsStack( \
556  image::MaskedImage<TYPE> const &image, Property flags, char dimension, \
557  StatisticsControl const &sctrl);
558 
559 INSTANTIATE_STACKS(double)
560 INSTANTIATE_STACKS(float)
562 } // namespace math
563 } // namespace afw
564 } // namespace lsst
AmpInfoBoxKey bbox
Definition: Amplifier.cc:117
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
Definition: history.py:174
uint64_t * ptr
Definition: RangeSet.cc:88
afw::table::Key< afw::table::Array< VariancePixelT > > variance
Basic LSST definitions.
lsst::afw::image::pixel::Pixel< ImagePixelT, MaskPixelT, VariancePixelT > Pixel
A Pixel in the MaskedImage.
Definition: MaskedImage.h:108
lsst::afw::image::MaskedImage< EntryT >::Image::Pixel & value()
Definition: MaskedVector.h:120
double getError(Property const prop=NOTHING) const
Return the error in the desired property (if specified in the constructor)
Definition: Statistics.cc:1058
int getHeight() const
Return the number of rows in the image.
Definition: ImageBase.h:335
number of clipped points
Definition: Statistics.h:81
table::Key< int > b
Reports attempts to exceed implementation-defined length limits for some classes. ...
Definition: Runtime.h:76
int y
Definition: SpanSet.cc:49
int getX0() const
Return the image&#39;s column-origin.
Definition: ImageBase.h:343
Include errors of requested quantities.
Definition: Statistics.h:65
A class to evaluate image statistics.
Definition: Statistics.h:215
number of masked points
Definition: Statistics.h:82
MaskedImageIterator< typename Image::iterator, typename Mask::iterator, typename Variance::iterator > iterator
Definition: MaskedImage.h:539
std::shared_ptr< lsst::afw::image::Image< PixelT > > statisticsStack(std::vector< std::shared_ptr< lsst::afw::image::Image< PixelT >>> &images, Property flags, StatisticsControl const &sctrl=StatisticsControl(), std::vector< lsst::afw::image::VariancePixel > const &wvector=std::vector< lsst::afw::image::VariancePixel >(0))
A function to compute some statistics of a stack of Images.
T push_back(T... args)
int getHeight() const
Return the number of rows in the image.
Definition: MaskedImage.h:1095
Pass parameters to a Statistics object.
Definition: Statistics.h:93
A base class for image defects.
int getX0() const
Return the image&#39;s column-origin.
Definition: MaskedImage.h:1105
Statistics makeStatistics(lsst::afw::image::Image< Pixel > const &img, lsst::afw::image::Mask< image::MaskPixel > const &msk, int const flags, StatisticsControl const &sctrl=StatisticsControl())
Handle a watered-down front-end to the constructor (no variance)
Definition: Statistics.h:354
A Mask wrapper to provide an infinite_iterator for Mask::row_begin().
Definition: Statistics.h:339
x_iterator row_begin(int y) const
Return an x_iterator to the start of the image.
Definition: MaskedImage.cc:612
A class to manipulate images, masks, and variance as a single object.
Definition: MaskedImage.h:73
number of sample points
Definition: Statistics.h:66
T make_pair(T... args)
double getValue(Property const prop=NOTHING) const
Return the value of the desired property (if specified in the constructor)
Definition: Statistics.cc:1056
double x
x_iterator row_end(int y) const
Return an x_iterator to the end of the image.
Definition: MaskedImage.cc:622
int getY0() const
Return the image&#39;s row-origin.
Definition: MaskedImage.h:1113
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
STL class.
int getY0() const
Return the image&#39;s row-origin.
Definition: ImageBase.h:351
int getWidth() const
Return the number of columns in the image.
Definition: ImageBase.h:333
Reports invalid arguments.
Definition: Runtime.h:66
int getWidth() const
Return the number of columns in the image.
Definition: MaskedImage.h:1093
bool getWeighted() const noexcept
Definition: Statistics.h:138
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...
Property
control what is calculated
Definition: Statistics.h:63
An integer coordinate rectangle.
Definition: Box.h:55
A class to represent a 2-dimensional array of pixels.
Definition: Image.h:58
int end
T reserve(T... args)