예제 #1
0
mEff_err = np.std(mEff, axis=0) * float(binNum - 1) / math.sqrt(float(binNum))

######################
# Write output files #
######################

# Two-point functions

outputFilename = output_template.replace("*", "twop")

avgOutputFilename = output_template.replace("*", "twop_avg")

rw.writeDataFile(twop_jk, outputFilename)

rw.writeAvgDataFile(twop_avg, twop_err, avgOutputFilename)

print "Wrote two-point function files"

# Effective mass

outputFilename = output_template.replace("*", "mEff")

avgOutputFilename = output_template.replace("*", "mEff_avg")

rw.writeDataFile(mEff, outputFilename)

rw.writeAvgDataFile(mEff_avg, mEff_err, avgOutputFilename)

print "Wrote effective mass files"
    threep = threep_gtDt - 0.25 * ( threep_gtDt + threep_gxDx + threep_gyDy + threep_gzDz )

    # Jackknife
    # threep_jk[ ts ][ b, t ]
    
    threep_jk.append( fncs.jackknife( threep, binSize ) )

    threep_jk_cp = fncs.jackknife( threep, binSize )

    threep_avg = np.average( threep_jk_cp, axis=0 )

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

    avgOutputFilename = output_template.replace( "*", "threep_tsink" + str( ts ) )

    rw.writeAvgDataFile( threep_avg, threep_err, avgOutputFilename )

# End loop over tsink

avgOutputFilename = output_template.replace( "*", "twop_avg" )

rw.writeAvgDataFile( twop_avg, twop_err, avgOutputFilename )

##################
# Two-state Fit  #
##################

fit = fncs.twoStateFit( twop_ts, threep_jk )

# Average over bins
예제 #3
0
    ######
    # gA #
    ######

    # Calculate
    # gA[ b, t ]

    gA = Z * pq.calcgA(threep_jk, twop_jk[:, ts])

    print "gA:"

    print gA

    # Average over bins
    # gA_avg[ t ]

    gA_avg = np.average(gA, axis=0)

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

    # Write output files

    gA_outFilename = output_template.replace("*", "gA_tsink" + str(ts))

    rw.writeAvgDataFile(gA_avg, gA_err, gA_outFilename)

    print "Wrote output files for tsink " + str(ts)

# End loop over tsink
예제 #4
0
    # Average over bins

    avgX_avg = np.average( avgX, axis=0 )

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

    ######################
    # Write output files #
    ######################

    # <x>
    
    avgX_outFilename = output_template.replace( "*", "avgX_tsink" + str( ts ) )

    rw.writeAvgDataFile( avgX_avg, avgX_err, avgX_outFilename )

    # Fitted effective mass

    mEff_outputFilename = output_template.replace( "*", "mEff_fit" )

    rw.writeFitDatafile( mEff_outputFilename, mEff_fit_avg, mEff_fit_err, mEff_fitStart, mEff_fitEnd )

    ###############
    # Fit plateau #
    ###############

    fitStart = []

    fitEnd = []