def moster_raw(z, Mhalo):
    """
    Stellar mass-halo mass relation from Moster+2013.

    Provided by Matthieu Schaller.
    """
    M_10 = 11.59
    M_11 = 1.195
    N_10 = 0.0351
    N_11 = -0.0247
    beta_10 = 1.376
    beta_11 = -0.826
    gama_10 = 0.608
    gama_11 = 0.329
    log_M_1 = M_10 + M_11 * z / (z + 1)
    N = N_10 + N_11 * z / (z + 1)
    beta = beta_10 + beta_11 * z / (z + 1)
    gama = gama_10 + gama_11 * z / (z + 1)
    M_1 = 10 ** log_M_1
    Mstar_over_Mhalo = 2.0 * N * ((Mhalo / M_1) ** -beta + (Mhalo / M_1) **
        gama) ** -1
    return Mstar_over_Mhalo * Mhalo
