# Average over bins

mEff_fit_avg = np.average(mEff_fit)

mEff_fit_err = np.std( mEff_fit ) \
               * float( binNum - 1 ) / math.sqrt( float( binNum ) )

###########
# Momenta #
###########

# Read momenta list from dataset
# momList[ c, Q ]

momList = rw.getDatasets(threepDir, configList, threep_template,
                         "Momenta_list")[:, 0, 0, ...]

# Check that momenta agree across configurations

Qsq, Qsq_start, Qsq_end = fncs.processMomList(momList)

# Convert to GeV

Qsq_GeV = pq.convertQsqToGeV(Qsq, latticeSpacing * mEff_fit_avg,
                             latticeSpacing, latticeDim)

for ts in tsink:

    #########################
    # Three-point functions #
    #########################
Esempio n. 2
0
configNum = len(configList)

assert configNum % binSize == 0, "Number of configurations " \
    + str( configNum ) + " not evenly divided by bin size " \
    + str( binSize ) + ".\n"

binNum = configNum / binSize

#######################
# Two-point functions #
#######################

# Get the real part of two-point functions
# twop[ c, t ]

twop = rw.getDatasets(twopDir, configList, twop_template, "twop")[:, 0, 0, ...,
                                                                  0, 0]

print "Read two-point functions from HDF5 files"

# Jackknife
# twop_jk[ b, t ]

twop_jk = fncs.jackknife(twop, binSize)

for ts in tsink:

    #########################
    # Three-point functions #
    #########################

    # Get the real part of g5gx, g5gy, and g5gz
Esempio n. 3
0
configNum = len(configList)

assert configNum % binSize == 0, "Number of configurations " \
    + str( configNum ) + " not evenly divided by bin size " \
    + str( binSize ) + ".\n"

binNum = configNum / binSize

#############################################
# Fill matrices with values from data files #
#############################################

# Get real part of zero-momentum two-point functions
# twop[ c, t ]

twop = rw.getDatasets(twopDir, configList, filename_template,
                      "twop")[:, 0, 0, :, 0, 0]

print "Read two-point functions from HDF5 files"

#############
# Jackknife #
#############

twop_jk = fncs.jackknife(twop, binSize)

twop_avg = np.average(twop_jk, axis=0)

twop_err = np.std(twop_jk, axis=0) * float(binNum - 1) / math.sqrt(
    float(binNum))

############################
print "Fit effective mass"

# Average over bins

mEff_fit_avg = np.average( mEff_fit )

mEff_fit_err = np.std( mEff_fit ) * float( binNum - 1 ) / np.sqrt( float( binNum ) )

#######################
# Two-point functions #
#######################

# Get the real part of two-point functions
# twop[ c, t ]

twop = rw.getDatasets( twopDir, configList, twop_template, "twop" )[ :, 0, 0, ..., 0, 0 ]

print "Read two-point functions from HDF5 files"

# Jackknife
# twop_jk[ b, t ]

twop_jk = fncs.jackknife( twop, binSize )

twop_avg = np.average( twop_jk, axis=0 )

twop_err = np.std( twop_jk, axis=0 ) * float( binNum - 1 ) / np.sqrt( float( binNum ) )

twop_ts = []

threep_jk = []
Esempio n. 5
0
    for ts in tsink:

        # Read three-point functions
        # threep[ ts ][ curr_type ][ c, src, ds, ti, q, curr, part ]

        threep_ts, threepDatasetName_ts = rw.getHDF5File_wNames(
            threepDir, configList, threep_template, "threep",
            "tsink_" + str(ts))

        threep.append(threep_ts)

        threepDatasetName.append(threepDatasetName_ts)

        momentaList_threep = rw.getDatasets(threepDir, configList,
                                            threep_template,
                                            "Momenta_list_xyz")

    # Check that all of the momenta are the same

    for c in range(configNum):

        momList_0 = momentaList_threep[c, 0].flat

        for momList in momentaList_threep[c]:

            for i in range(momList.size):

                assert momList.flat[ i ] == momList_0[ i ], \
                    "Momenta lists in configuration " + configList[ c ] \
                    + " do not match"
Esempio n. 6
0
print "Fit effective mass"

# Average over bins

mEff_fit_avg = np.average( mEff_fit )

mEff_fit_err = np.std( mEff_fit ) * float( binNum - 1 ) / np.sqrt( float( binNum ) )

#######################
# Two-point functions #
#######################

# Get the real part of two-point functions
# twop[ c, t ]

twop = rw.getDatasets( twopDir, configList, twop_template, "twop" )[ :, 0, 0, ..., 0, 0 ]

print "Read two-point functions from HDF5 files"

# Jackknife
# twop_jk[ b, t ]

twop_jk = fncs.jackknife( twop, binSize )

for ts in tsink:
    
    #########################
    # Three-point functions #
    #########################

    # Get the real part of gxDx, gyDy, gzDz, and gtDt
twop_jk = fncs.jackknife( twop, binSize )
"""
for ts in tsink:
    
    #########################
    # Three-point functions #
    #########################

    # Get the real part of gxDx, gyDy, gzDz, and gtDt
    # three-point functions at zero-momentum
    # threep[ c, t ]

    if dataFormat == "gpu":

        threep_u_gxDx = rw.getDatasets( threepDir, configList, threep_template, \
                                        "tsink_" + str( ts ), "oneD", "dir_00", \
                                        "up", "threep" )[ :, 0, 0, ..., 0, 1, 0 ]

        threep_u_gyDy = rw.getDatasets( threepDir, configList, threep_template, \
                                        "tsink_" + str( ts ), "oneD", "dir_01", \
                                        "up", "threep" )[ :, 0, 0, ..., 0, 2, 0 ]
    
        threep_u_gzDz = rw.getDatasets( threepDir, configList, threep_template, \
                                        "tsink_" + str( ts ), "oneD", "dir_02", \
                                        "up", "threep" )[ :, 0, 0, ..., 0, 3, 0 ]

        threep_u_gtDt = rw.getDatasets( threepDir, configList, threep_template, \
                                        "tsink_" + str( ts ), "oneD", "dir_03", \
                                        "up", "threep" )[ :, 0, 0, ..., 0, 4, 0 ]

        threep_s_gxDx = np.array( [] )
Esempio n. 8
0
# Fitted effective mass
# mEff_fit_avg

mEff_fit_avg = np.average(mEff_fit)

mEff_fit_err = np.std(mEff_fit) * float(binNum - 1) / math.sqrt(float(binNum))

################
# Momenta list #
################

# Read momenta list from dataset
# momList[ c, Q ]

momList = rw.getDatasets(threepDir, configList, threep_template,
                         "Momenta_list")[:, 0, 0, ...]

# Check that momenta agree across configurations

Qsq, Qsq_start, Qsq_end = fncs.processMomList(momList)

######################
# Convert Q^2 to GeV #
######################

Qsq_GeV = pq.convertQsqToGeV(Qsq, latticeSpacing * mEff_fit_avg,
                             latticeSpacing, latticeDim)

#######################
# Two-point functions #
#######################