ebe_scripts/average_event_spvn_h5.py
def calculate_vn_diff_SP(vn_diff_real, vn_diff_imag,
                         vn_diff_denorm1, vn_diff_denorm2):
    """
        this funciton calculates the scalar-product vn
        assumption: no overlap between particles of interest
                    and reference flow Qn vectors
    """
    vn_diff_real = array(vn_diff_real)
    vn_diff_imag = array(vn_diff_imag)
    vn_diff_denorm1 = array(vn_diff_denorm1) + 1e-30
    vn_diff_denorm2 = array(vn_diff_denorm2)
    nev = len(vn_diff_denorm1[:, 0])

    #vn_denorm = vn_2.reshape(len(vn_2), 1)
    #vn_denorm_err = vn_2_err.reshape(len(vn_2_err), 1)
    dn_diff_denorm = mean(vn_diff_denorm1, 0)
    dn_diff_denorm_err = std(vn_diff_denorm1, 0)/sqrt(nev)
    vn_denorm = sqrt(mean(vn_diff_denorm2, 0))
    vn_denorm_err = (std(vn_diff_denorm2, 0)/sqrt(nev)/2./vn_denorm)
    vn_denorm = vn_denorm.reshape(len(vn_denorm), 1)
    vn_denorm_err = vn_denorm_err.reshape(len(vn_denorm), 1)

    vn_diff_SP = mean(vn_diff_real, 0)/dn_diff_denorm/vn_denorm
    vn_diff_SP_err = sqrt(
        (std(vn_diff_real, 0)/sqrt(nev)/dn_diff_denorm/vn_denorm)**2.
        + (vn_diff_SP*dn_diff_denorm_err/dn_diff_denorm)**2.
        + (vn_diff_SP*vn_denorm_err/vn_denorm)**2.)
    return(vn_diff_SP, vn_diff_SP_err)

        this funciton calculates the scalar-product vn
        assumption: no overlap between particles of interest
                    and reference flow Qn vectors
    
this funciton calculates the scalar-product vn
assumption: no overlap between particles of interest
and reference flow Qn vectors
this funciton calculates the scalar - product vn assumption : no overlap between particles of interest and reference flow Qn vectors
def calculate_vn_diff_SP(vn_diff_real, vn_diff_imag,
                         vn_diff_denorm1, vn_diff_denorm2):
    vn_diff_real = array(vn_diff_real)
    vn_diff_imag = array(vn_diff_imag)
    vn_diff_denorm1 = array(vn_diff_denorm1) + 1e-30
    vn_diff_denorm2 = array(vn_diff_denorm2)
    nev = len(vn_diff_denorm1[:, 0])
    dn_diff_denorm = mean(vn_diff_denorm1, 0)
    dn_diff_denorm_err = std(vn_diff_denorm1, 0)/sqrt(nev)
    vn_denorm = sqrt(mean(vn_diff_denorm2, 0))
    vn_denorm_err = (std(vn_diff_denorm2, 0)/sqrt(nev)/2./vn_denorm)
    vn_denorm = vn_denorm.reshape(len(vn_denorm), 1)
    vn_denorm_err = vn_denorm_err.reshape(len(vn_denorm), 1)
    vn_diff_SP = mean(vn_diff_real, 0)/dn_diff_denorm/vn_denorm
    vn_diff_SP_err = sqrt(
        (std(vn_diff_real, 0)/sqrt(nev)/dn_diff_denorm/vn_denorm)**2.
        + (vn_diff_SP*dn_diff_denorm_err/dn_diff_denorm)**2.
        + (vn_diff_SP*vn_denorm_err/vn_denorm)**2.)
    return(vn_diff_SP, vn_diff_SP_err)
def calculate_vn_diff_SP ( vn_diff_real , vn_diff_imag , vn_diff_denorm1 , vn_diff_denorm2 ) : vn_diff_real = array ( vn_diff_real ) vn_diff_imag = array ( vn_diff_imag ) vn_diff_denorm1 = array ( vn_diff_denorm1 ) + 1e-30 vn_diff_denorm2 = array ( vn_diff_denorm2 ) nev = len ( vn_diff_denorm1 [ : , 0 ] ) dn_diff_denorm = mean ( vn_diff_denorm1 , 0 ) dn_diff_denorm_err = std ( vn_diff_denorm1 , 0 ) / sqrt ( nev ) vn_denorm = sqrt ( mean ( vn_diff_denorm2 , 0 ) ) vn_denorm_err = ( std ( vn_diff_denorm2 , 0 ) / sqrt ( nev ) / 2. / vn_denorm ) vn_denorm = vn_denorm . reshape ( len ( vn_denorm ) , 1 ) vn_denorm_err = vn_denorm_err . reshape ( len ( vn_denorm ) , 1 ) vn_diff_SP = mean ( vn_diff_real , 0 ) / dn_diff_denorm / vn_denorm vn_diff_SP_err = sqrt ( ( std ( vn_diff_real , 0 ) / sqrt ( nev ) / dn_diff_denorm / vn_denorm ) ** 2. + ( vn_diff_SP * dn_diff_denorm_err / dn_diff_denorm ) ** 2. + ( vn_diff_SP * vn_denorm_err / vn_denorm ) ** 2. ) return ( vn_diff_SP , vn_diff_SP_err )
this funciton calculates the scalar-product vn
assumption: no overlap between particles of interest
and reference flow Qn vectors
this funciton calculates the scalar - product vn assumption : no overlap between particles of interest and reference flow Qn vectors
"""
        this funciton calculates the scalar-product vn
        assumption: no overlap between particles of interest
                    and reference flow Qn vectors
    """ #vn_denorm = vn_2.reshape(len(vn_2), 1) #vn_denorm_err = vn_2_err.reshape(len(vn_2_err), 1)
vn_diff_real
vn_diff_imag
vn_diff_denorm1
vn_diff_denorm2