make_test_psf_data

photutils.datasets.make_test_psf_data(shape, psf_model, psf_shape, nsources, *, flux_range=(100, 1000), min_separation=1, seed=0, border_size=None, progress_bar=False)[source]

Deprecated since version 1.13.0: The make_test_psf_data function is deprecated and may be removed in a future version. Use make_psf_model_image instead.

Make an example image containing PSF model images.

Source positions and fluxes are randomly generated using an optional seed.

Parameters:
shape2-tuple of int

The shape of the output image.

psf_modelastropy.modeling.Fittable2DModel

The PSF model.

psf_shape2-tuple of int

The shape around the center of the star that will used to evaluate the psf_model.

nsourcesint

The number of sources to generate.

flux_rangetuple, optional

The lower and upper bounds of the flux range.

min_separationfloat, optional

The minimum separation between the centers of two sources. Note that if the minimum separation is too large, the number of sources generated may be less than nsources.

seedint, optional

A seed to initialize the numpy.random.BitGenerator. If None, then fresh, unpredictable entropy will be pulled from the OS.

border_sizetuple of 2 int, optional

The (ny, nx) size of the border around the image where no sources will be generated (i.e., the source center will not be located within the border). If None, then a border size equal to half the (y, x) size of the evaluated PSF model (i.e., taking into account oversampling) will be used.

progress_barbool, optional

Whether to display a progress bar when creating the sources. The progress bar requires that the tqdm optional dependency be installed. Note that the progress bar does not currently work in the Jupyter console due to limitations in tqdm.

Returns:
data2D ndarray

The simulated image.

tableTable

A table containing the parameters of the generated sources.