GalSim-developers / JAX-GalSim

JAX port of GalSim, for parallelized, GPU accelerated, and differentiable galaxy image simulations.
Other
28 stars 3 forks source link

Adds jittable wcs and Transformation #12

Closed EiffL closed 1 year ago

EiffL commented 2 years ago

This PR depends on #11 and #7, it should be rebased on main once these PRs are merged.

It ports some basic WCS, to make it jittable, and also implements Transformations for simple GSObjects, which makes it possible to do flux rescaling and shifting object positions. So with this PR you can now do:

gal = galsim.Gaussian(sigma=1.0) * 1.5

Note that in implementing the WCS object, I tried a different approach than in other places, I inherit from the GalSim object instead of copy/pasting the entire code, and just redefined the methods that need to create jax-galsim versions of the corresponding galsim objects (Essentially Positions).

I kept the CelestialWCS out of the scope for now, because for demo1.py we just need a PixelScaleWCS.