GalSim icon indicating copy to clipboard operation
GalSim copied to clipboard

Spiral profile

Open esheldon opened this issue 1 year ago • 9 comments

Adds a new profile Spiral that creates a logarithmic spiral object, represented by point sources.

The points are created in three dimensions in a disk, with possible inclination along the line of sight and rotations in the plane of the sky. The number of spiral arms is also configurable.

Some examples

two spiral arms

Points in 3d as well as a rendered image

Edge on

More arms

Full scenes

rgb-1021620208 rgb-119650250

esheldon avatar Mar 06 '24 19:03 esheldon

Cool! Would you still add a bulge component separately?

cwwalter avatar Mar 06 '24 20:03 cwwalter

Yes, that can be added separately.

In the color images above, the galaxies have up to three parts

  • spiral using the Spiral class
  • knots, using the exact same Spiral profile parameters but with fewer points, more flux per point, and bluer color
  • bulge as a DeVauc profile

esheldon avatar Mar 06 '24 20:03 esheldon

Here you can see the knots clearly rgb-979104074

esheldon avatar Mar 06 '24 20:03 esheldon

This is quite cool, Erin! The images look great.

rmjarvis avatar Mar 06 '24 20:03 rmjarvis

Some things for discussion

  • Mike mentioned that nowadays we should be able to replace the _sbp property with something better.
  • The use of points in 3d to represent the profile makes the code simple, but a lot of points are needed to make it look right when the spiral is well resolved. This can make it slow to render, even with photon shooting. Is there some way to hack up an analytic form?

esheldon avatar Mar 06 '24 22:03 esheldon

Thanks Erin - this is super cool. I was going to ask about computational expense and then you commented on it yourself... it feels to me like there must be some trick one could use, relying on the fact that each point is fundamentally the same exact light profile after PSF convolution, modulo sub-pixel shifts. (I assume we are still making the approximation that there is a single well-defined PSF for the entire Spiral object... i.e. no PSF spatial variation across the Spiral object and no color gradients within the Spiral)

rmandelb avatar Mar 07 '24 02:03 rmandelb

Hi @esheldon - thanks have been quiet on this PR for a while, so I wanted to check in and let you know that we've been discussing tagging GalSim v2.6 in about a month from now. Do you want this feature in the next tagged version, and if so, do you anticipate that timeline working for you to address the review?

rmandelb avatar Jul 17 '24 15:07 rmandelb

I started this as a fun project with my son while on vacation. I haven't had any time since to work on it.

If I don't get to Mike's comments in time, please don't wait for me.

esheldon avatar Jul 17 '24 16:07 esheldon

Ah, the vacation project; I can relate to that phenomenon. Thanks for letting us know... we won't wait on this, but if you do find time for it, we can definitely include it.

rmandelb avatar Jul 17 '24 16:07 rmandelb