uniform_xy

artpop.space.uniform_xy(num_stars, xy_dim, random_state=None)[source]

Sample xy positions from a uniform distribution.

Parameters
num_starsint

Number of stars (i.e., positions) to sample.

xy_dimint or list-like

Dimensions of the mock image in xy coordinates. If int is given, will make the x and y dimensions the same.

random_stateNone, int, list of ints, or RandomState

If None, return the RandomState singleton used by numpy.random. If int, return a new RandomState instance seeded with the int. If RandomState, return it. Otherwise raise ValueError.

Returns
xyarray

xy pixel positions.