-
Notifications
You must be signed in to change notification settings - Fork 40
Halo circular velocity function from Maller & Bullock 2004 #284
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
Conversation
…r issues to come back to at the end of the comments though
rrjbca
left a comment
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
Mshould probably be renamedmass - We try to use astropy units where appropriate. So you should do
from astropy.units import Unitand then e.g.96.6 * Unit('km s-1')and(mass.to_value('Msun') / 1e11) - Use
cosmology.hrather 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.pyand 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
Lucia-Fonseca
left a comment
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 <[email protected]>
Co-authored-by: Lucia-Fonseca <[email protected]>
…g news headlines so please check!
|
Replaced with #529 to change target branch. |
Description
Checklist