make_random_gaussians_table¶
- photutils.datasets.make_random_gaussians_table(n_sources, param_ranges, seed=None)[source]¶
Deprecated since version 1.13.0: The make_random_gaussians_table function is deprecated and may be removed in a future version. Use make_random_models_table instead.
Make a
QTable
containing randomly generated parameters for 2D Gaussian sources.Each row of the table corresponds to a Gaussian source whose parameters are defined by the column names. The parameters are drawn from a uniform distribution over the specified input ranges.
The output table will contain columns for both the Gaussian amplitude and flux.
The output table can be input into
make_gaussian_sources_image()
to create an image containing the 2D Gaussian sources.- Parameters:
- n_sourcesfloat
The number of random 2D Gaussian sources to generate.
- param_rangesdict
The lower and upper boundaries for each of the
Gaussian2D
parameters as a dictionary mapping the parameter name to its(lower, upper)
bounds. The dictionary keys must be validGaussian2D
parameter names or'flux'
. If'flux'
is specified, but not'amplitude'
then the 2D Gaussian amplitudes will be calculated and placed in the output table. If'amplitude'
is specified, then the 2D Gaussian fluxes will be calculated and placed in the output table. If both'flux'
and'amplitude'
are specified, then'flux'
will be recalculated and overwritten. Model parameters not defined inparam_ranges
will be set to the default value.- seedint, optional
A seed to initialize the
numpy.random.BitGenerator
. IfNone
, then fresh, unpredictable entropy will be pulled from the OS.
- Returns:
- table
QTable
A table of parameters for the randomly generated Gaussian sources. Each row of the table corresponds to a Gaussian source whose parameters are defined by the column names.
- table
See also
Notes
To generate identical parameter values from separate function calls,
param_ranges
must have the same parameter ranges and theseed
must be the same.