skypyproject / skypy

SkyPy: A package for modelling the Universe.
BSD 3-Clause "New" or "Revised" License
118 stars 38 forks source link

Bad galaxy sizes in Herbel example #182

Closed rrjbca closed 4 years ago

rrjbca commented 4 years ago

Describe the bug The Herbel galaxy example is giving physical galaxy sizes of order ~10^5 kpc leading to angular sizes of order ~10 degrees. The coefficients used by the physical size model are taken from https://arxiv.org/abs/2001.07727 but they may have used a different parameterisation of the linear-lognormal size model compared to https://arxiv.org/abs/astro-ph/0301527 which is what we based our model on. It is also not clear if mu_phys in the first reference is the same as Rbar_50 in the second reference so they could be modelling different size measures.

To Reproduce

skypy -c examples/herbel_galaxies.yaml -f fits
>>> hdu = fits.open("./blue_galaxies.fits")
>>> np.mean(hdu[1].data['physical_size'])
241537.8853921193
>>> np.mean(hdu[1].data['angular_size'])
0.13882203524226688

Expected behavior Figure 4 in https://arxiv.org/abs/astro-ph/0301527 shows that Rbar_50 should be of order 1kpc.

rrjbca commented 4 years ago

Changes in #208 to the luminosity function could have changed the sizes in this example so best to check the values again. Other things to check would be the zeropoint and the coefficients for the physical_size model

philipp128 commented 4 years ago

Changes in #208 to the luminosity function could have changed the sizes in this example so best to check the values again. Other things to check would be the zeropoint and the coefficients for the physical_size model

It didn't change. I get this output now:

>>>  hdu = fits.open("./blue_galaxies.fits")
>>> np.mean(hdu[1].data['physical_size'])
2910619.451085817
>>> np.mean(hdu[1].data['angular_size'])
0.7330269954807195

I also can't see where the absolute magnitude in herbel_galaxies.yaml is changed to the r-band to compare it to figure 4 in https://arxiv.org/abs/astro-ph/0301527. But this shouldn't give such a big difference.

Furthermore, the magnitudes make sense to me if I compare them to the ones in figure 4 (see above). They might be a bit too bright but that shouldn't be crucial.

The parameters mu_phys and Rbar_50 are not the same. I'd say ln(Rbar_50) = mu_phys but then the parametrisation has to be adapted.

rrjbca commented 4 years ago

This was resolved by #266 by using the size model parameters from Shen et al. 2003. Closing.