ebe_scripts/average_event_spvn_h5.py
def calculate_symmetric_cumulant(vn_data_array):
    """
        this funciton computes the symmetric cumulant
            SC(m,n) = <v_m*conj(v_m)*v_n*conj(v_n)>
                      - <v_m*conj(v_m)>*<v_n*conj(v_n)>
        we use Jackknife resampling method to estimate the statistical error
    """
    vn_data_array = array(vn_data_array)
    nev = len(vn_data_array[:, 0])
    dN = real(vn_data_array[:, 0])
    Q1 = dN*vn_data_array[:, 1]
    Q2 = dN*vn_data_array[:, 2]
    Q3 = dN*vn_data_array[:, 3]
    Q4 = dN*vn_data_array[:, 4]
    Q5 = dN*vn_data_array[:, 5]
    Q6 = dN*vn_data_array[:, 6]

    # two-particle correlation
    N2_weight = dN*(dN - 1.)
    Q2_2 = abs(Q2)**2. - dN
    Q3_2 = abs(Q3)**2. - dN
    Q4_2 = abs(Q4)**2. - dN

    # four-particle correlation
    N4_weight = dN*(dN - 1.)*(dN - 2.)*(dN - 3.)
    Q_32 = ((abs(Q2)**2.)*(abs(Q3)**2.) - 2.*real(Q5*conj(Q2)*conj(Q3))
        - 2.*real(Q3*conj(Q1)*conj(Q2)) + abs(Q5)**2. + abs(Q1)**2.
        - (dN - 4.)*(abs(Q2)**2. + abs(Q3)**2.) + dN*(dN - 6.)
    )
    Q_42 = ((abs(Q2)**2.)*(abs(Q4)**2.) - 2.*real(Q6*conj(Q2)*conj(Q4))
        - 2.*real(Q4*conj(Q2)*conj(Q2)) + abs(Q6)**2. + abs(Q2)**2.
        - (dN - 4.)*(abs(Q2)**2. + abs(Q4)**2.) + dN*(dN - 6.)
    )

    # calcualte observables with Jackknife resampling method
    SC32_array = zeros(nev)
    SC42_array = zeros(nev)
    for iev in range(nev):
        array_idx = [True]*nev
        array_idx[iev] = False
        array_idx = array(array_idx)

        # SC(3,2)
        SC32_array[iev] = (mean(Q_32[array_idx])/mean(N4_weight[array_idx])
                           - (mean(Q3_2[array_idx])*mean(Q2_2[array_idx]))
                             /(mean(N2_weight[array_idx])**2.))

        # SC(4,2)
        SC42_array[iev] = (mean(Q_42[array_idx])/mean(N4_weight[array_idx])
                           - (mean(Q4_2[array_idx])*mean(Q2_2[array_idx]))
                             /(mean(N2_weight[array_idx])**2.))

    SC32_mean = mean(SC32_array)
    SC32_err = sqrt((nev - 1.)/nev*sum((SC32_array - SC32_mean)**2.))

    SC42_mean = mean(SC42_array)
    SC42_err = sqrt((nev - 1.)/nev*sum((SC42_array - SC42_mean)**2.))

    results = [SC32_mean, SC32_err, SC42_mean, SC42_err]
    return(results)

        this funciton computes the symmetric cumulant
            SC(m,n) = <v_m*conj(v_m)*v_n*conj(v_n)>
                      - <v_m*conj(v_m)>*<v_n*conj(v_n)>
        we use Jackknife resampling method to estimate the statistical error
    
this funciton computes the symmetric cumulant
SC(m,n) = 
*
we use Jackknife resampling method to estimate the statistical error
this funciton computes the symmetric cumulant SC ( m n ) = * we use Jackknife resampling method to estimate the statistical error
def calculate_symmetric_cumulant(vn_data_array):
    vn_data_array = array(vn_data_array)
    nev = len(vn_data_array[:, 0])
    dN = real(vn_data_array[:, 0])
    Q1 = dN*vn_data_array[:, 1]
    Q2 = dN*vn_data_array[:, 2]
    Q3 = dN*vn_data_array[:, 3]
    Q4 = dN*vn_data_array[:, 4]
    Q5 = dN*vn_data_array[:, 5]
    Q6 = dN*vn_data_array[:, 6]
    N2_weight = dN*(dN - 1.)
    Q2_2 = abs(Q2)**2. - dN
    Q3_2 = abs(Q3)**2. - dN
    Q4_2 = abs(Q4)**2. - dN
    N4_weight = dN*(dN - 1.)*(dN - 2.)*(dN - 3.)
    Q_32 = ((abs(Q2)**2.)*(abs(Q3)**2.) - 2.*real(Q5*conj(Q2)*conj(Q3))
        - 2.*real(Q3*conj(Q1)*conj(Q2)) + abs(Q5)**2. + abs(Q1)**2.
        - (dN - 4.)*(abs(Q2)**2. + abs(Q3)**2.) + dN*(dN - 6.)
    )
    Q_42 = ((abs(Q2)**2.)*(abs(Q4)**2.) - 2.*real(Q6*conj(Q2)*conj(Q4))
        - 2.*real(Q4*conj(Q2)*conj(Q2)) + abs(Q6)**2. + abs(Q2)**2.
        - (dN - 4.)*(abs(Q2)**2. + abs(Q4)**2.) + dN*(dN - 6.)
    )
    SC32_array = zeros(nev)
    SC42_array = zeros(nev)
    for iev in range(nev):
        array_idx = [True]*nev
        array_idx[iev] = False
        array_idx = array(array_idx)
        SC32_array[iev] = (mean(Q_32[array_idx])/mean(N4_weight[array_idx])
                           - (mean(Q3_2[array_idx])*mean(Q2_2[array_idx]))
                             /(mean(N2_weight[array_idx])**2.))
        SC42_array[iev] = (mean(Q_42[array_idx])/mean(N4_weight[array_idx])
                           - (mean(Q4_2[array_idx])*mean(Q2_2[array_idx]))
                             /(mean(N2_weight[array_idx])**2.))
    SC32_mean = mean(SC32_array)
    SC32_err = sqrt((nev - 1.)/nev*sum((SC32_array - SC32_mean)**2.))
    SC42_mean = mean(SC42_array)
    SC42_err = sqrt((nev - 1.)/nev*sum((SC42_array - SC42_mean)**2.))
    results = [SC32_mean, SC32_err, SC42_mean, SC42_err]
    return(results)
def calculate_symmetric_cumulant ( vn_data_array ) : vn_data_array = array ( vn_data_array ) nev = len ( vn_data_array [ : , 0 ] ) dN = real ( vn_data_array [ : , 0 ] ) Q1 = dN * vn_data_array [ : , 1 ] Q2 = dN * vn_data_array [ : , 2 ] Q3 = dN * vn_data_array [ : , 3 ] Q4 = dN * vn_data_array [ : , 4 ] Q5 = dN * vn_data_array [ : , 5 ] Q6 = dN * vn_data_array [ : , 6 ] N2_weight = dN * ( dN - 1. ) Q2_2 = abs ( Q2 ) ** 2. - dN Q3_2 = abs ( Q3 ) ** 2. - dN Q4_2 = abs ( Q4 ) ** 2. - dN N4_weight = dN * ( dN - 1. ) * ( dN - 2. ) * ( dN - 3. ) Q_32 = ( ( abs ( Q2 ) ** 2. ) * ( abs ( Q3 ) ** 2. ) - 2. * real ( Q5 * conj ( Q2 ) * conj ( Q3 ) ) - 2. * real ( Q3 * conj ( Q1 ) * conj ( Q2 ) ) + abs ( Q5 ) ** 2. + abs ( Q1 ) ** 2. - ( dN - 4. ) * ( abs ( Q2 ) ** 2. + abs ( Q3 ) ** 2. ) + dN * ( dN - 6. ) ) Q_42 = ( ( abs ( Q2 ) ** 2. ) * ( abs ( Q4 ) ** 2. ) - 2. * real ( Q6 * conj ( Q2 ) * conj ( Q4 ) ) - 2. * real ( Q4 * conj ( Q2 ) * conj ( Q2 ) ) + abs ( Q6 ) ** 2. + abs ( Q2 ) ** 2. - ( dN - 4. ) * ( abs ( Q2 ) ** 2. + abs ( Q4 ) ** 2. ) + dN * ( dN - 6. ) ) SC32_array = zeros ( nev ) SC42_array = zeros ( nev ) for iev in range ( nev ) : array_idx = [ True ] * nev array_idx [ iev ] = False array_idx = array ( array_idx ) SC32_array [ iev ] = ( mean ( Q_32 [ array_idx ] ) / mean ( N4_weight [ array_idx ] ) - ( mean ( Q3_2 [ array_idx ] ) * mean ( Q2_2 [ array_idx ] ) ) / ( mean ( N2_weight [ array_idx ] ) ** 2. ) ) SC42_array [ iev ] = ( mean ( Q_42 [ array_idx ] ) / mean ( N4_weight [ array_idx ] ) - ( mean ( Q4_2 [ array_idx ] ) * mean ( Q2_2 [ array_idx ] ) ) / ( mean ( N2_weight [ array_idx ] ) ** 2. ) ) SC32_mean = mean ( SC32_array ) SC32_err = sqrt ( ( nev - 1. ) / nev * sum ( ( SC32_array - SC32_mean ) ** 2. ) ) SC42_mean = mean ( SC42_array ) SC42_err = sqrt ( ( nev - 1. ) / nev * sum ( ( SC42_array - SC42_mean ) ** 2. ) ) results = [ SC32_mean , SC32_err , SC42_mean , SC42_err ] return ( results )
this funciton computes the symmetric cumulant
SC(m,n) = <v_m*conj(v_m)*v_n*conj(v_n)>
 <v_m*conj(v_m)>*<v_n*conj(v_n)>
we use Jackknife resampling method to estimate the statistical error
this funciton computes the symmetric cumulant SC ( m n ) = <v_m * conj ( v_m ) * v_n * conj ( v_n ) > <v_m * conj ( v_m ) > * <v_n * conj ( v_n ) > we use Jackknife resampling method to estimate the statistical error
"""
        this funciton computes the symmetric cumulant
            SC(m,n) = <v_m*conj(v_m)*v_n*conj(v_n)>
                      - <v_m*conj(v_m)>*<v_n*conj(v_n)>
        we use Jackknife resampling method to estimate the statistical error
    """ # two-particle correlation # four-particle correlation # calcualte observables with Jackknife resampling method # SC(3,2) # SC(4,2)
vn_data_array