def mchirp_mass1_to_mass2(mchirp, mass1): """ This function takes a value of mchirp and one component mass and returns the second component mass. As this is a cubic equation this requires finding the roots and returning the one that is real. Basically it can be shown that: m2^3 - a(m2 + m1) = 0 where a = Mc^5 / m1^3 this has 3 solutions but only one will be real. """ return conversions.mass2_from_mchirp_mass1(mchirp, mass1)
def mchirp_mass1_to_mass2(mchirp, mass1): """ This function takes a value of mchirp and one component mass and returns the second component mass. As this is a cubic equation this requires finding the roots and returning the one that is real. Basically it can be shown that: m2^3 - a(m2 + m1) = 0 where a = Mc^5 / m1^3 this has 3 solutions but only one will be real. """ return conversions.mass2_from_mchirp_mass1(mchirp, mass1)