40 do_random(Random &rand) :
_rand(rand) {}
47 struct do_uniform :
public do_random<T> {
48 do_uniform(Random &rand) : do_random<T>(rand) {}
54 struct do_uniformPos :
public do_random<T> {
55 do_uniformPos(Random &rand) : do_random<T>(rand) {}
61 struct do_uniformInt :
public do_random<T> {
62 do_uniformInt(Random &rand,
unsigned long n) : do_random<T>(rand), _n(n) {}
71 struct do_flat :
public do_random<T> {
72 do_flat(Random &rand,
double const a,
double const b) : do_random<T>(rand), _a(a), _b(b) {}
82 struct do_gaussian :
public do_random<T> {
83 do_gaussian(Random &rand) : do_random<T>(rand) {}
89 struct do_chisq :
public do_random<T> {
90 do_chisq(Random &rand,
double nu) : do_random<T>(rand), _nu(nu) {}
99 struct do_poisson :
public do_random<T> {
100 do_poisson(Random &rand,
double mu) : do_random<T>(rand), _mu(mu) {}
109 template <
typename ImageT>
114 template <
typename ImageT>
119 template <
typename ImageT>
124 template <
typename ImageT>
129 template <
typename ImageT>
134 template <
typename ImageT>
139 template <
typename ImageT>
148 #define INSTANTIATE(T) \ 149 template void randomUniformImage(lsst::afw::image::Image<T> *image, Random &rand); \ 150 template void randomUniformPosImage(lsst::afw::image::Image<T> *image, Random &rand); \ 151 template void randomUniformIntImage(lsst::afw::image::Image<T> *image, Random &rand, unsigned long n); \ 152 template void randomFlatImage(lsst::afw::image::Image<T> *image, Random &rand, double const a, \ 154 template void randomGaussianImage(lsst::afw::image::Image<T> *image, Random &rand); \ 155 template void randomChisqImage(lsst::afw::image::Image<T> *image, Random &rand, double const nu); \ 156 template void randomPoissonImage(lsst::afw::image::Image<T> *image, Random &rand, double const mu); void randomUniformImage(ImageT *image, Random &rand)
Set image to random numbers uniformly distributed in the range [0, 1)
void for_each_pixel(Image< LhsT > &lhs, pixelOp0< LhsT > const &func)
Set each pixel in an Image<LhsT> to func()
void randomFlatImage(ImageT *image, Random &rand, double const a, double const b)
Set image to random numbers uniformly distributed in the range [a, b)
void randomUniformPosImage(ImageT *image, Random &rand)
Set image to random numbers uniformly distributed in the range (0, 1)
A base class for image defects.
void randomChisqImage(ImageT *image, Random &rand, double const nu)
Set image to random numbers with a chi^2_{nu} distribution.
void randomGaussianImage(ImageT *image, Random &rand)
Set image to random numbers with a gaussian N(0, 1) distribution.
A functor class equivalent to std::function<ValT ()>, but with a virtual operator() ...
void randomUniformIntImage(ImageT *image, Random &rand, unsigned long n)
Set image to random integers uniformly distributed in the range 0 ...
void randomPoissonImage(ImageT *image, Random &rand, double const mu)
Set image to random numbers with a Poisson distribution with mean mu (n.b.
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...
A class that can be used to generate sequences of random numbers according to a number of different a...
#define INSTANTIATE(FROMSYS, TOSYS)