Adding noise on surface brightness maps

The Mockimg module offers the possibility to add noise on a surface brightness image using the command mockimgs_sb_add_noise:

mockimgs_sb_add_noise galaxy.fits.gz --SB_limit 31 --output-flux  -o galaxy_with_noise.fits

where the option --SB_limit sets the targeted surface brightness limit, by default, assuming a signal to noise of 3 and a standard deviation computed in 100 arcseconds square. While by default the output will be a surface brightness map (magnitudes), it is highly recommended to add the option --output-flux to store the output as a flux. This will prevent problems with pixels with a negative flux. To display the output image, use mockimgs_sb_display_fits, for example:

mockimgs_sb_display_fits --add_axes --ax_unit kpc --colorbar --add_axes --colormap Greys --colormap_reverse galaxy_with_noise.fits.gz

Scripts

mockimgs_sb_add_noise

usage: mockimgs_sb_add_noise [-h] [--SB_limit FLOAT] [--SB_area FLOAT]
                             [--SB_SN FLOAT] [--sigma_per_pixel FLOAT]
                             [--random-seed INT] [--output-flux]
                             [--noise-only] [-v] [--zp FLOAT]
                             [-o OUTPUTFILENAME]
                             FILE

add noise on an sb image

positional arguments:
  FILE                  input file

options:
  -h, --help            show this help message and exit
  --SB_limit FLOAT      surface brightness limit
  --SB_area FLOAT       area in arcsec2 to compute the SB limit
  --SB_SN FLOAT         targeted signal to noise
  --sigma_per_pixel FLOAT
                        standard noise deviation per pixel
  --random-seed INT     random seed
  --output-flux         store flux assuming
  --noise-only          consider only noise
  -v                    verbose mode
  --zp FLOAT            zero point to get flux
  -o OUTPUTFILENAME     Name of the output file

Examples:
--------
mockimgs_sb_add_noise in.fits  -o out.fits
mockimgs_sb_add_noise in.fits --SB_limit 31 --output-flux -o out.fits