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

Small changes #33

Merged
merged 6 commits into from
Sep 14, 2020
Merged

Small changes #33

merged 6 commits into from
Sep 14, 2020

Conversation

nsabrams
Copy link
Contributor

Allows hard upper limit on the number of objects in systems
Fixed small commenting errors

@@ -194,7 +199,10 @@ def random_companion_count(self, x, CSF, MF):
Helper function: calculate number of companions.
"""
n_comp = 1 + np.random.poisson((CSF / MF) - 1)


if self.companion_max == True:
Copy link
Contributor

@mwhosek mwhosek Sep 14, 2020

Choose a reason for hiding this comment

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

I'm a bit confused here. Isn't this saying that n_comp is always set to companion_max if self.companion_max==True? Shouldn't it only set to companion_max if n_comp is greater than self.companion_max?

Also, isn't self.companion_max a boolean, based on the if statement? Then it isn't actually a number, and ultimately n_comp needs to be a number.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry that was an error. It should be fixed now!

@mwhosek mwhosek merged commit 7c69543 into astropy:dev Sep 14, 2020
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

Successfully merging this pull request may close these issues.

2 participants