gigi
gigi

Reputation: 11

How to draw two galaxies at manually set locations on GalSim

I want to draw a circular galaxy to the left and another circular galaxy to the right. All the GalSim demos seem to draw galaxies at randomly set locations -- how would I create 2 gal variables that have the respective position information, and place it within a larger image?

Thank you!

Upvotes: 1

Views: 88

Answers (1)

rmandelb
rmandelb

Reputation: 311

GalSim demo5, demo7, and demo10 do what you want: they draw galaxies to fixed, pre-specified locations within a larger image. Demos 5 and 10 have galaxies on a grid, while demo7 has just two galaxy images drawn into a single larger image (which I believe is exactly what you want to do). To summarize briefly, you create a galsim.Bounds() object that specifies the region in the larger image into which you want to draw each object, then draw into a sub-image that has that bounds. But the example scripts I mentioned show this in detail with many comments, so I encourage you to look at those.

Upvotes: 2

Related Questions