def masses_from_q(q,total_mass=50.):
    """
        Computes mass1 and mass2 from eta and total mass.

        Parameters
        ----------
        q       : {float}
                q = m1/m2, where m1>m2.
        total_m : {float}
                Total mass m1+m2 of the system in MSun.

        Returns
        ------
        mass1 and mass2 in MSun.
    """

    mass1 = q/(1+q)*total_mass
    mass2 = total_mass-mass1
    return mass1,mass2