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

[Feature Req] Upcoming Features - Discussion #172

Open
camarman opened this issue Mar 29, 2023 · 5 comments
Open

[Feature Req] Upcoming Features - Discussion #172

camarman opened this issue Mar 29, 2023 · 5 comments
Assignees

Comments

@camarman
Copy link

I want to try to implement these features into the hmf. I thought I could share them here. If they are okay with you, I'll try to implement each of them.

  1. Improving docs (adding more equations or maybe creating a special page for units)
  2. A function that converts into units that has no reduced hubble parameter (h)
  3. A function that converts halo mass into stellar mass.
  4. Cumulative stellar mass density.

So far these are my ideas but if more comes I'll share here.

@steven-murray
Copy link
Collaborator

Hi @seVenVo1d,

  1. This is a good idea
  2. One idea here would be to use astropy.units. I can't think of a good interface for it right now. The obvious thing to do would be to make all outputs from hmf astropy.Quantity objects, which can be manipulated. But that does make it a backwards-incompatible change, and would require quite a few changes across the codebase. You could write functions for just some of the most used outputs (like dndm) maybe?
  3. This (and 4) is I think outside the scope of hmf. You could write another package that depends on hmf though?

@camarman
Copy link
Author

Hello @steven-murray,

I am working on (1) and I'll try to do my best. For 2,3, and 4, I was thinking some sort of a function (tool) that can be used to convert these things, without altering the source code of the hmf. As you have pointed out, doing calculations in terms of natural units could alter the source code a lot..

@camarman
Copy link
Author

  1. I think we should add matplotlib in the requirements. But I am not exactly sure how to do that...

@steven-murray
Copy link
Collaborator

@seVenVo1d I do not think it's a good idea to add matplotlib. None of the hmf modules use matplotlib. While it is a useful extra tool to have if you're making you're own plots, it is not fundamental to the workings of hmf, and every extra dependency is something that has to be managed (i.e. extra work)

@camarman
Copy link
Author

camarman commented Apr 26, 2023

I see. That is understandable. In that case I'll work about the docs for now. I was busy for the last couple of weeks so I could not do much, but I'll contribute and open pull request maybe in a week or so. Meantime my research project gave me a lot of insight about the code and structure itself. I am at now much better position in understanding the code and its structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants