def tsallis(ion_temp, avg_temp, n):
    """
    Non-normalized probability of an ion at ion-temp using a Tsallis distribution
    :param ion_temp: temperature of ion (K)
    :param avg_temp: average temperature of ions (K)
    :param n: average harmonic oscillator level
    :return: value
    """
    kb = 1.38e-23
    energy = ion_temp * kb
    top = (n - 3) * (n - 2) * (n - 1) * energy ** 2
    bot = 2 * (n * kb * avg_temp) ** 3 * (1 + energy / (n * kb * avg_temp)) ** n

    output = top / bot

    return output