UNDER DEVELOPMENT
The software package is currently being dramatically improved and updated.
This is a (very) old version, potentially with bugs.
Help for "simage_add_noise" routine:
Adds a model of background and observational noise to a simulated image.
This takes a noise-free simulated image, and adds "observational" noise. It
is called automatically at the end of
simage_assemble_image.pro. The image plus noise, and the inverse variance
pixel weight map, are written to disc. If the simulated image is called
image.fits, and noise is added to represent a 100ks exposure, the output
files will be image_t100.0.fits and image_t100.0_noise.fits.
The headers of these files contain details of the noise levels imposed.
Currently, the noise model includes
- A positive-definite constraint
Any non-physical, slightly negative pixel values are reset to zero.
- Sky background noise
Random sky background noise, drawn from a Gaussian distribution,
proportional to the square root of the exposure time and calibrated
from the amount of background noise in the HDFs.
- Sky background value
A constant value added to every pixel.
- Photon counting noise
Random shot noise, proportional to the square root of the flux in each pixel.
Although this should strictly be drawn from a Poisson distribution, a Gaussian
distribution is used for computational speed.
The constant of proportionality is set from the approximate amount of shot
noise observed in the HDFs.
- Cosmic rays
A model of cosmic rays developed by Jodi Lamoreux, which takes such inputs
as the exposure time, CCD thickness and diffusion. You will need to
compile the C routines on your computer. See the instructions in
cosmic_rays/README for details. Note that cosmic ray hits
are not currently incorporated as bad pixels into the inverse variance map.
By default, the noise is uncorrelated in adjacent pixels. This will not be
true in real life, especially if multiple exposures are stacked using the
DRIZZLE or MULTIDRIZZLE algorithms. As a very quick approximation to this
scenario, the noise model (only) can be smoothed prior to its superposition on
the noise-free simulated image. This is done using the /SMOOTH flag, but be
aware that it is rather unsophisticated.
See also the header below, which has been extracted from the source code for this routine.
; NAME:
; SIM_ADDNOISE
;
; PURPOSE:
; Adds a model of observational noise to a simulated image.
;
; CATEGORY:
; Astronomical image simulation.
;
; INPUTS:
; filename - Name of input image, with path but w/o extension.
; time - Equivalent exposure time on WFPC2, in ks.
; Ought to be < 100, since that is the depth of the HDF!
;
; OPTIONAL INPUTS:
; [image] - Image array, to save time loading it from disc.
; [header] - Image FITS header
; [seed] - Random number seed.
;
; KEYWORD PARAMETERS:
; [/HDF] - Cuts out WFPC L shape, for fun.
; [/NOSMOOTH] - Explicitly set to -1 to force correlated background noise.
; DEFAULT is now unsmoothed, uncorrelated pixels.
; [/SMOOTH] - Set in order to enable correlated background noise.
; [/COSMIC_RAYS] - Add cosmic rays, using model by Jodi Lamoureux.
;
; OUTPUTS:
; Image with noise added is written to file image_t100.fits.
; The updated image, updated header and the inverse variance map
; are also returned in variables image, header and image_noise
; respectively.
;
; NOTES:
; The current implementation consists of a noise model including
; photon counting noise plus Gaussian background noise, with their
; levels set to roughly match those in the HDF.
;
; MODIFICATION HISTORY:
; Oct 03 - Jodi Lamoureux's cosmic ray model incorporated.
; Sep 03 - Inverse variance map output created by RM.
; May 03 - Default behaviour for correlated bground noise
; changed to unsmoothed by RM.
; Mar 03 - Program name changed to protect the innocent.
; Jul 02 - Exposure time glitch corrected by RM.
; Feb 02 - add_noise.pro written by Richard Massey.
Return to the shapelets web page or the code help menu.