Noise Module
Methods for adding artificial noise to data
@author: Antony Vamvakeros
- nDTomo.methods.noise.addpnoise1D(sp, ct)[source]
Add Poisson noise to a 1D spectrum.
- Parameters:
sp (ndarray) – 1D array representing the spectrum (e.g., intensity values).
ct (float) – Scaling factor representing the total counts or acquisition time.
- Returns:
Noisy spectrum with Poisson noise applied and rescaled by the count factor.
- Return type:
ndarray
- nDTomo.methods.noise.addpnoise2D(im, ct)[source]
Add Poisson noise to a 2D image.
- Parameters:
im (ndarray) – 2D array representing the image (e.g., integrated intensity map).
ct (float) – Scaling factor representing the total counts or acquisition time.
- Returns:
Noisy image with Poisson noise applied and rescaled by the count factor.
- Return type:
ndarray
- nDTomo.methods.noise.addpnoise3D(vol, ct)[source]
Adds Poisson noise to a 3D hyperspectral volume (H x W x Bands), noise is added per pixel-spectrum (i.e., per (i,j,:)).
- Parameters:
vol (ndarray) – 3D hyperspectral image (H x W x Bands), must be non-negative.
ct (float) – Scaling constant to simulate photon counts.