ebe_scripts/average_event_spvn_h5_minimumbias.py
def calcualte_vn_2_with_gap(vn_data_array_sub1, vn_data_array_sub2):
    """
        this function computes vn{2} and its stat. err.
        using two subevents with a eta gap
    """
    vn_data_array_sub1 = array(vn_data_array_sub1)
    vn_data_array_sub2 = array(vn_data_array_sub2)
    nev = len(vn_data_array_sub1[:, 0])
    dN1 = real(vn_data_array_sub1[:, 0])
    dN1 = dN1.reshape(len(dN1), 1)
    dN2 = real(vn_data_array_sub2[:, 0])
    dN2 = dN1.reshape(len(dN2), 1)
    Qn_array1 = dN1*vn_data_array_sub1[:, 1:]
    Qn_array2 = dN2*vn_data_array_sub2[:, 1:]

    corr = (Qn_array1*conj(Qn_array2))/(dN1*dN2)
    vn_2 = sqrt(real(mean(corr, 0))) + 1e-30
    vn_2_err = std(real(corr), 0)/sqrt(nev)/2./vn_2
    return(nan_to_num(vn_2), nan_to_num(vn_2_err))

        this function computes vn{2} and its stat. err.
        using two subevents with a eta gap
    
this function computes vn{2} and its stat. err.
using two subevents with a eta gap
this function computes vn { 2 } and its stat . err . using two subevents with a eta gap
def calcualte_vn_2_with_gap(vn_data_array_sub1, vn_data_array_sub2):
    vn_data_array_sub1 = array(vn_data_array_sub1)
    vn_data_array_sub2 = array(vn_data_array_sub2)
    nev = len(vn_data_array_sub1[:, 0])
    dN1 = real(vn_data_array_sub1[:, 0])
    dN1 = dN1.reshape(len(dN1), 1)
    dN2 = real(vn_data_array_sub2[:, 0])
    dN2 = dN1.reshape(len(dN2), 1)
    Qn_array1 = dN1*vn_data_array_sub1[:, 1:]
    Qn_array2 = dN2*vn_data_array_sub2[:, 1:]
    corr = (Qn_array1*conj(Qn_array2))/(dN1*dN2)
    vn_2 = sqrt(real(mean(corr, 0))) + 1e-30
    vn_2_err = std(real(corr), 0)/sqrt(nev)/2./vn_2
    return(nan_to_num(vn_2), nan_to_num(vn_2_err))
def calcualte_vn_2_with_gap ( vn_data_array_sub1 , vn_data_array_sub2 ) : vn_data_array_sub1 = array ( vn_data_array_sub1 ) vn_data_array_sub2 = array ( vn_data_array_sub2 ) nev = len ( vn_data_array_sub1 [ : , 0 ] ) dN1 = real ( vn_data_array_sub1 [ : , 0 ] ) dN1 = dN1 . reshape ( len ( dN1 ) , 1 ) dN2 = real ( vn_data_array_sub2 [ : , 0 ] ) dN2 = dN1 . reshape ( len ( dN2 ) , 1 ) Qn_array1 = dN1 * vn_data_array_sub1 [ : , 1 : ] Qn_array2 = dN2 * vn_data_array_sub2 [ : , 1 : ] corr = ( Qn_array1 * conj ( Qn_array2 ) ) / ( dN1 * dN2 ) vn_2 = sqrt ( real ( mean ( corr , 0 ) ) ) + 1e-30 vn_2_err = std ( real ( corr ) , 0 ) / sqrt ( nev ) / 2. / vn_2 return ( nan_to_num ( vn_2 ) , nan_to_num ( vn_2_err ) )
this function computes vn{2} and its stat.
this function computes vn { 2 } and its stat .
"""
        this function computes vn{2} and its stat. err.
        using two subevents with a eta gap
    """
vn_data_array_sub1
vn_data_array_sub2