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 #576

Open
Fox-Davidson opened this issue Nov 11, 2022 · 2 comments
Open

BUG: Overgeneration of galaxies #576

Fox-Davidson opened this issue Nov 11, 2022 · 2 comments
Assignees
Labels
bug Something isn't working module: galaxies

Comments

@Fox-Davidson
Copy link
Collaborator

Describe the bug
When calculating the number density of galaxies for redshift sampling in 'schechter lf redshift' (/galaxies/redshift.py) there is a missing factor of h_0^3. This is required due to the units of phi_*. Not including this factor can overgenerate the number of galaxies by a factor of 3 (given h=0.7) for the entire magnitude/luminosity function.

To Reproduce
Steps to reproduce the behaviour:

  1. Generate a catalogue of galaxies
  2. Integrate the expected magnitude Schechter function with the values used in the YAML file by volume defined by skyarea
  3. Create a histogram (or extract values) from the catalogue with the same bins as the above integral
  4. Plot these together, there should be a significantly increased number in the catalogue values compared to the analytical values
    Please see the Jupyter Notebook and YAML files attached (I couldn't attach them in their native forms so hopefully they are still helpful)

Expected behaviour
The catalogue values should exactly follow the analytical plot as they are sampled from the same distribution

Desktop (please complete the following information):

@Fox-Davidson Fox-Davidson added bug Something isn't working module: galaxies labels Nov 11, 2022
@Fox-Davidson Fox-Davidson self-assigned this Nov 11, 2022
@itrharrison
Copy link
Contributor

Hi @Fox-Davidson, thanks for this PR! Am I right in saying this could also be fixed by making your units for phi* have a h_0 in them? I think doing that + updating the documentation to specify that normalisation constants should have those units would be better than putting h_0 units in here, which we had discussed before and decided not to do.

@Fox-Davidson
Copy link
Collaborator Author

Action: Add more specific guidance to the contributing guidelines for the consistency in h units. The user should put in and receive h-less units (ie where there is no h unit present as a variable).

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