-
Notifications
You must be signed in to change notification settings - Fork 38
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
Halo circular velocity function from Maller & Bullock 2004 #284
Halo circular velocity function from Maller & Bullock 2004 #284
Conversation
…r issues to come back to at the end of the comments though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great start! A few suggestions to improve the code:
- We prefer to avoid abbreviations in variable names where practical, so
M
should probably be renamedmass
- We try to use astropy units where appropriate. So you should do
from astropy.units import Unit
and then e.g.96.6 * Unit('km s-1')
and(mass.to_value('Msun') / 1e11)
- Use
cosmology.h
rather thancosmology.H0 / 100
. This also has the correct units. - We need a test for the function. See e.g. test_carroll for a simple example of writing tests. Create a new file
skypy/halo/tests/test_properties.py
and write a functiontest_circular_velocity
. An easy test would be to choose the arguments such that each bracket in the function equals one and check that the returned value equals 96.6 km/s. Perhaps you can think of others - There are some trivial formatting issues relating to whitespace/tabs/blank lines etc. At the bottom of the pull request next to "codeclimate" click "details" to see the suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needs some changes and tests.
Please, take this review as suggestions.
We should update the description to link with the correspondent issue. |
Co-authored-by: Lucia-Fonseca <55983939+Lucia-Fonseca@users.noreply.github.com>
Co-authored-by: Lucia-Fonseca <55983939+Lucia-Fonseca@users.noreply.github.com>
…g news headlines so please check!
…ject#423) Co-authored-by: Richard R <58728519+rrjbca@users.noreply.github.com>
Replaced with #529 to change target branch. |
Description
Checklist