-
Notifications
You must be signed in to change notification settings - Fork 19
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
New normalized_pop_mass.py file #376
base: development
Are you sure you want to change the base?
Conversation
Update (Aug 29): This looks like a necessary and important improvement - needs to be checked carefully. |
@dimsour94 asked me how we should pass the f_bin_nature to the calculation.
|
(1/(2-a1)) * ((m_1**(2-a1) - m_min**(2-a1))/(m_min**-a1)) | ||
((1/(2-a2)) | ||
* (m_1/m_min)**-a1 * ((m_2**(2-a2) - m_1**(2-a2))/(m_1**-a2))) | ||
((1/(2-a3)) * (m_1/m_min)**-a1 * (m_2/m_1)**-a2 | ||
* ((m_max**(2-a3) - m_2**(2-a3))/(m_2**-a3)))) | ||
return mean_mass | ||
|
||
def mean_mass_simulated(alpha3, m_a, m_b): | ||
def mean_mass_simulated(alpha3, m_a, m_b, f_bin_simulated): |
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.
Do we need this function? Wouldn't it be better to get the mean_mass_simulated=mass_simulated/count_simulated?
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.
In my opinion, it's just a different approach. However, you might be right—it does seem much more straightforward to use this.
@dimsour94 I've changed how/where the calculation is done to allow for a user defined It calculates the simulated_mass, simulated_mass_single and simulated_mass_binaries and stores those values. I removed the The You will still have to implement the passing of |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
…into dimitris_normalized_pop_mass
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.
Looks good to me. I tested it and it gives the simulated mass per system.
I have added that calculate_underlying_mass()
save the calculated data to the Population file.
Tutorials changed in PR #406 Ready for this PR to be accepted. |
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.
Beside a few typos, e.g. "stae" -> "star" and not always respecting the 80 characters line length, the PR looks complete now.
The new normalized_pop_mass.py file estimates the underlying mass of a population based on your simulated binary fraction (as defined in your ini file) and any specified desired binary fraction you want the "nature" population to have.