casacore
|
#include <LatticeAddNoise.h>
Public Member Functions | |
LatticeAddNoise () | |
Default constructor. More... | |
LatticeAddNoise (Random::Types type, const Vector< Double > ¶meters, Int seed1=0, Int seed2=1) | |
Constructor. More... | |
LatticeAddNoise (const LatticeAddNoise &other) | |
Copy constructor (copy semantics) More... | |
LatticeAddNoise & | operator= (const LatticeAddNoise &other) |
Assignment (copy semantics) More... | |
~LatticeAddNoise () | |
Destructor. More... | |
void | set (Random::Types type, const Vector< Double > ¶meters) |
Set a new distribution. More... | |
template<class T > | |
void | add (Lattice< T > &lattice) |
Add noise of given type to lattice. More... | |
template<class T > | |
void | add (MaskedLattice< T > &lattice) |
Private Member Functions | |
void | addNoiseToArray (Array< Float > &data) |
Add noise to array. More... | |
void | addNoiseToArray (Array< Complex > &data) |
void | addNoiseToArray (Array< Double > &data) |
void | addNoiseToArray (Array< DComplex > &data) |
void | makeDistribution () |
Make noise generator. More... | |
Private Attributes | |
Random::Types | itsType |
Vector< Double > | itsParameters |
MLCG | itsGen |
Random * | itsNoise |
Add noise from specified distribution to a lattice
Public interface
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.
Definition at line 82 of file LatticeAddNoise.h.
casacore::LatticeAddNoise::LatticeAddNoise | ( | ) |
Default constructor.
casacore::LatticeAddNoise::LatticeAddNoise | ( | Random::Types | type, |
const Vector< Double > & | parameters, | ||
Int | seed1 = 0 , |
||
Int | seed2 = 1 |
||
) |
Constructor.
An exception will occur if we cannot generate the distribution (e.g. illegal parameters). seed1 and seed2 are used to seed the MLCG object.
casacore::LatticeAddNoise::LatticeAddNoise | ( | const LatticeAddNoise & | other | ) |
Copy constructor (copy semantics)
casacore::LatticeAddNoise::~LatticeAddNoise | ( | ) |
Destructor.
void casacore::LatticeAddNoise::add | ( | Lattice< T > & | lattice | ) |
Add noise of given type to lattice.
For complex types, 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.
void casacore::LatticeAddNoise::add | ( | MaskedLattice< T > & | lattice | ) |
|
private |
|
private |
Add noise to array.
For Complex, noise is added to real and imaginary separately.
|
private |
Make noise generator.
LatticeAddNoise& casacore::LatticeAddNoise::operator= | ( | const LatticeAddNoise & | other | ) |
Assignment (copy semantics)
void casacore::LatticeAddNoise::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).
|
private |
Definition at line 123 of file LatticeAddNoise.h.
|
private |
Definition at line 124 of file LatticeAddNoise.h.
Definition at line 122 of file LatticeAddNoise.h.
|
private |
Definition at line 121 of file LatticeAddNoise.h.