def src_mass_from_z_det_mass(z, del_z, mdet, del_mdet):
    """Takes values of redshift, redshift uncertainty, detector mass and its
    uncertainty and computes the source mass and its uncertainty.
    """
    msrc = mdet / (1.0 + z)
    del_msrc = msrc * ((del_mdet / mdet) ** 2.0 + (del_z / (1.0 + z)) ** 2.0
        ) ** 0.5
    return msrc, del_msrc
