make_100gaussians_image#
- photutils.datasets.make_100gaussians_image(noise=True)[source]#
Make an example image containing 100 2D Gaussians plus a constant background.
The constant background has a value of 5.
If
noiseisTrue, then Gaussian noise with a mean of 0 and a standard deviation of 2 is added to the output image. The noise is generated with a fixed random seed, so the output image is the same for every call.- Parameters:
- noisebool, optional
Whether to include noise in the output image (default is
True).
- Returns:
- image2D
ndarray The image, with shape (300, 500), containing 100 2D Gaussian sources.
- image2D
See also
Examples
import matplotlib.pyplot as plt from astropy.visualization import simple_norm from photutils.datasets import make_100gaussians_image image = make_100gaussians_image() fig, ax = plt.subplots() norm = simple_norm(image, 'sqrt', percent=99.5) ax.imshow(image, norm=norm, origin='lower')
(
Source code,png,hires.png,pdf,svg)