Calculates the components of Gamma (Gamma0 and delta_Gamma), 
    assuming that the Data_ref is uncooled data (ideally at 3mbar
    for best fitting). It uses the fact that A_prime=A/Gamma0 should 
    be constant for a particular particle under changes in pressure
    and therefore uses the reference save to calculate A_prime (assuming
    the Gamma value found for the uncooled data is actually equal to Gamma0
    since only collisions should be causing the damping. Therefore for
    the cooled data Gamma0 should equal A/A_prime and therefore we
    can extract Gamma0 and delta_Gamma.

    A_prime = ConvFactor**2 * (2*k_B*T0/(pi*m))

    Parameters
    ----------
    Data_ref : DataObject
        Reference data set, assumed to be 300K
    Data : DataObject
        Data object to have the temperature calculated for

    Returns
    -------
    Gamma0 : uncertainties.ufloat
        Damping due to the environment
    delta_Gamma : uncertainties.ufloat
        Damping due to other effects (e.g. feedback cooling)

def calc_gamma_components(Data_ref, Data):
    """
    Calculates the components of Gamma (Gamma0 and delta_Gamma), 
    assuming that the Data_ref is uncooled data (ideally at 3mbar
    for best fitting). It uses the fact that A_prime=A/Gamma0 should 
    be constant for a particular particle under changes in pressure
    and therefore uses the reference save to calculate A_prime (assuming
    the Gamma value found for the uncooled data is actually equal to Gamma0
    since only collisions should be causing the damping. Therefore for
    the cooled data Gamma0 should equal A/A_prime and therefore we
    can extract Gamma0 and delta_Gamma.

    A_prime = ConvFactor**2 * (2*k_B*T0/(pi*m))

    Parameters
    ----------
    Data_ref : DataObject
        Reference data set, assumed to be 300K
    Data : DataObject
        Data object to have the temperature calculated for

    Returns
    -------
    Gamma0 : uncertainties.ufloat
        Damping due to the environment
    delta_Gamma : uncertainties.ufloat
        Damping due to other effects (e.g. feedback cooling)
    
    """
    A_prime = Data_ref.A/Data_ref.Gamma
    Gamma0 = Data.A/A_prime
    delta_Gamma = Data.Gamma - Gamma0
    return Gamma0, delta_Gamma