How to generate particles with an arbitrary point-wise current density distribution?

Hi everyone!
I want to generate a particle source with a spatial distribition of a square, on which each point has its own beam current intensity.
I notice that the /gps/pos/shape command can set the source shape type, and the /gps/ene/type command can set the energy distribution type to a point-wise spectrum. But I don’t know how to generate a distribution of the particles that I want.
Maybe generating multiple particle sources with different intensities can solve the problem. But generating 20000 particle sources one by one may not be a good idea.
Any suggestions would be welcome. Thanks a lot!