b-remy / gems

GEnerative Morphology for Shear
MIT License
0 stars 0 forks source link

Build realistic galaxy simulations #8

Open b-remy opened 2 years ago

b-remy commented 2 years ago

I'm openning this draft PR to discuss the development of realistic galaxy simulations as described in Sheldon & Huff (2017), section 6.

The code is using GalFlow/TF operations, because I think it will make the creation of tensorflow datasets easier later (and soon the operations we need in GalFlow will be equivalent to those in galsim).

Here is a summary of the process to create the simulations:

b-remy commented 2 years ago

At first, I wanted to do the development in a colab notebook, but it requires to download the COSMOS catalog to get the parametric fits... So I will continue with this script :-)

As an intermediate step here is an illustration of the Bulge+Disk model:

Figure_1

b-remy commented 2 years ago

I am starting to build these simulations with galsim, waiting for the convolution ops implementation in GalFlow.

We can already discuss here about how to choose the parameters. I had issues using the bulgefit params from the COSMOS catalog so I decided to sample problematic parameters (bulge shape) according to the description in Sheldon & Huff (2017). Figure_1

EiffL commented 2 years ago

Yeah I think that's fine to use the settings for Erin's paper, but what was the issue in cosmos?

b-remy commented 2 years ago

In the case of the bulge, the fitted axes ratio q makes the profile shape so sharp (as you can see in the first row, second column of the first figure of above) that it requires interpolations on huge images, asking for several GB of memory.

EiffL commented 2 years ago

humm ok... I see.... :-/ okok But if you draw the galaxies with GalSim you're ok right? It's just that it will be annoying to draw them with your TF code.

Note that some galaxies had a poor B+D fit, and in those cases, a simple sersic fit is better. When you use the galsim cosmoscatalog.makeGalaxy() it automatically use the appropriate fit

b-remy commented 2 years ago

Since we are now using real galaxies from the COSMOS catalog #11 #8 , I think we don't need this code anymore. Are you ok to just close this PR @EiffL ?

EiffL commented 2 years ago

Maybe not, yeah, unless something goes wrong with the real galaxies and we need to go back to an intermediate step.