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

added P&R2017 neutral hydrogen mass model #347

Open
wants to merge 5 commits into
base: module/neutral_hydrogen
Choose a base branch
from

Conversation

itrharrison
Copy link
Contributor

Description

Merging will close #234. This implements the Padmanabhan & Refregier HI halo mass model described in that issue.

Checklist

  • Follow the Contributor Guidelines
  • Write unit tests
  • Write documentation strings
  • Assign someone from your working team to review this pull request
  • Assign someone from the infrastructure team to review this pull request

@itrharrison itrharrison added the new feature New feature, such as a new model label Oct 9, 2020
@itrharrison itrharrison requested review from laurawolz and a team October 9, 2020 15:35
@itrharrison itrharrison self-assigned this Oct 9, 2020
Copy link
Contributor

@rrjbca rrjbca left a comment

Choose a reason for hiding this comment

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

Since this is all built on halo properties I would put it in skypy/halo/gas.py (or similar) rather than starting an entire new module

@itrharrison
Copy link
Contributor Author

@rrjbca hmm... I'm not sure I agree. HI would be an observable which is fundamentally and conceptually different to the other types of observables we have (galaxies, gravy waves etc) and on a level with them.

We could say that 'halos' implies 'Dark Matter halos'. This model also makes a prediction only for HI mass.

By your argument, could we also, say, not suggest that the gravitational wave merger rates should also have been placed in galaxies?

I can imagine there are things where what you say does make sense though. e.g. multi-wavelength observations of a cluster's gas (HI, X-ray) might require some 'gas' structure within the halos module.

@laurawolz
Copy link

I have had similar thoughts, as the HI models I work with a based on galaxies, so. for this case then, HI model could equally fit into the galaxies module.

I think, based on the fact that HI can based on halo and galaxy properties (or possibly other observables), it would make most sense to have it as an own module which can host a variety of HI models.

@rrjbca
Copy link
Contributor

rrjbca commented Oct 12, 2020

I meant to say that neutral_hydrogen is way too narrow to justify creating an entire new module (in my opinion). If this doesn't belong in halos (probably true) I would at least suggest skypy/gas/hydrogen.py. A new module for gas has a lot more scope to grow and incorporate e.g. ISM, IGM, ICL etc while hydrogen.py can contain all HI properties you care about irrespective of wether it is bound to halos or galaxies and without having to create a new file for each property.

@rrjbca
Copy link
Contributor

rrjbca commented Dec 8, 2020

Following a discussion we decided that skypy.neutral_hydrogen is a suitable module for this work. This can always be revisited and changed if we find it conflicts with future design choices.

@itrharrison itrharrison changed the title added P&H2017 neutral hydrogen mass model added P&R2017 neutral hydrogen mass model Jan 19, 2021
@rrjbca rrjbca changed the base branch from master to main February 22, 2021 13:39
@ntessore ntessore changed the base branch from main to module/neutral_hydrogen May 4, 2021 12:14

Merger Rates
Copy link
Member

Choose a reason for hiding this comment

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

this is still the heading from GW, plus too many underlines

:nosignatures:
:toctree: ../api/

pr_halo_model
Copy link
Member

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 best name for the model, mostly because it makes me think that this is a halo model. Suggestions would be hi_mass_pr17 or padmanabhan_refregier_17 (which not everyone likes).


"""

from .mass import * # noqa F401,F403
Copy link
Member

Choose a reason for hiding this comment

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

It's ambiguous how the module is to be structured. In this way, you could access the function under both skypy.neutral_hydrogen as well as skypy.neutral_hydrogen.mass. If it's supposed to be the former, then I would add an underscore to _mass to indicate it is an implementation file. If the latter, then you should only from . import mass. (I guess it depends on how much stuff there is going to be in the module to decide which is right.)

Comment on lines +32 to +33
cosmology : `~astropy.cosmology.Cosmology`
Cosmology object providing values of omega_baryon and omega_matter.
Copy link
Member

Choose a reason for hiding this comment

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

This would be better moved to the end of the parameter list because it will be filled by the pipeline runner automatically.

Comment on lines +7 to +8
pr_data = np.asarray([0.00000000e+00, 8.08547768e-45, 6.40736312e+09, 3.66714636e+09,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00]) * units.Msun
Copy link
Member

Choose a reason for hiding this comment

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

Is it useful to have half of the tests return zero masses?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature, such as a new model
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Padmanabhan & Refregier HI halo model
4 participants