LatticeAddNoise.h
Classes
- LatticeAddNoise -- Add noise from specified distribution to a lattice (full description)
Interface
- Public Members
- LatticeAddNoise()
- LatticeAddNoise (Random::Types type, const Vector<Double>& parameters)
- LatticeAddNoise (const LatticeAddNoise& other)
- LatticeAddNoise& operator=(const LatticeAddNoise& other)
- ~LatticeAddNoise()
- void set (Random::Types type, const Vector<Double>& parameters)
- void add (MaskedLattice<Float>& lattice)
- void add (MaskedLattice<Complex>& lattice)
- void add (Lattice<Float>& lattice)
- void add (Lattice<Complex>& lattice)
- Private Members
- void addNoiseToArray (Array<Float>& data)
- void addNoiseToArray (Array<Complex>& data)
- void makeDistribution ()
Review Status
- Date Reviewed:
- yyyy/mm/dd
Prerequisite
Synopsis
This class allows you to add noise from one of many enumerated
types to a Lattice. If the Lattice is Complex, then the noise
is added to real and imaginary separately.
Example
Vector<Double> pars(2):
pars(0) = 0.5; // Mean
pars(1) = 0.2; // Variance
LatticeAddNoise lan(Random::NORMAL, pars);
ArrayLattice<Float> lat(IPosition(2,100,100));
lan.add(lat);
Member Description
Default constructor
LatticeAddNoise (Random::Types type, const Vector<Double>& parameters)
Constructor. An exception will occur if we cannot generate
the distribution (e.g. illegal parameters).
LatticeAddNoise (const LatticeAddNoise& other)
Copy constructor (copy semantics)
LatticeAddNoise& operator=(const LatticeAddNoise& other)
Assignment (copy semantics)
Destructor
void set (Random::Types type, const Vector<Double>& parameters)
Set a new distribution. An exception will occur if we cannot generate
the distribution (e.g. illegal parameters).
Add noise of given type to lattice. For Complex, the
noise is added to real and imaginary separately.
Any mask is ignored when adding the noise. I.e.
noise is added to masked pixels.
Add noise to array. For Complex, noise is added to
real and imaginary separately.
Make noise generator