Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Overgeneration of galaxies #578

Closed
wants to merge 3 commits into from

Conversation

Fox-Davidson
Copy link
Collaborator

@Fox-Davidson Fox-Davidson commented Nov 17, 2022

Description

This fixes the overgeneration of galaxies caused by the lack of a $h_0^3$ factor in the number density calculation (required due to the units of $phi_*$. Attached are a PDF of a notebook showing this result and text files for the generation of the galaxies.
This will close #576 .

Checklist

Fox-Davidson and others added 3 commits September 27, 2022 16:05
@Fox-Davidson Fox-Davidson added the bug Something isn't working label Nov 17, 2022
@Fox-Davidson Fox-Davidson requested a review from a team as a code owner November 17, 2022 12:44
@Fox-Davidson Fox-Davidson self-assigned this Nov 17, 2022
@@ -32,7 +32,7 @@ def test_schechter_lf_redshift():
x_min = 10.**(-0.4*(M_lim - M_star))

# density with factor from upper incomplete gamma function
density = phi_star*gamma(alpha+1)*gammaincc(alpha+1, x_min)
density = phi_star*gamma(alpha+1)*gammaincc(alpha+1, x_min)*np.power(cosmo.h, 3)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right place to account for h. The parameter phi_star has the same dimension [unit] as the luminosity function, which is 1/V/luminosity [commonly Mpc^-3 mag^-1]. That means phi_star must agree with these dimensions/units.

In your example, you are using the parameters of Tortorelli2020. In this work, they are giving phi_star in units of h_70 = H_0/70. So the input parameter must be corrected by this unit. However, as your defined cosmology includes H_0 = 70, h_70 is equal to 1. Therefore, the number that you have in your config files corresponds to units of Mpc^-3 mag^-1, which are as I said the physical units.

If we, however, want to enable phi_star to be given in units of h_0, we would also need to specify this in the documentation. But in this case, the parameter in your config file has the wrong value.

@philipp128
Copy link
Contributor

The current implementation is correct but we will add clarification about the units in the docs with a new PR. Issue #576 will be changed accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Overgeneration of galaxies
2 participants