spacetelescope / STScI-STIPS

STScI-STIPS
https://stips.readthedocs.io
13 stars 16 forks source link

Background Galaxies simulation rate #168

Closed kwynn03 closed 1 year ago

kwynn03 commented 1 year ago

For some reason when I run a simulation with background galaxies (as well as point sources), simulating the galaxies seems to be running at about 300 galaxies an hour. This seems significantly slower than I was expecting - is there some parameter for setting an edge to the Sersic profile? I'm wondering if it is trying to add to each pixel throughout the image, rather than cutting off at a certain number of galactic radii. Any thoughts would be very much appreciated! Thank you!

gmzsebastian commented 1 year ago

Hi @kwynn03, unfortunately there is not much way around this right now. Placing an extended source requires calculating the shape of the PSF at each pixel location, and we're currently testing different methods to see if it's worth compromising some accuracy for speed. In terms of how far away from the core a galaxy is simulated, it depends on the radius you specify, but also on a fixed parameter that defines the size of the PSF, but don't worry, this is not the entire image, it's just a few dozen pixels.