Пример #1
0
def specContourWithXYZout(L, inputFolder=inputFolderWRF, label="", vmin="", vmax="", title=""):
    if label=="":
        label = str(time.time())
    plt.close()
    Z = np.zeros((13,8))
    for frameCount, fileName in enumerate(L):
        XYZ = pickle.load(open(inputFolder+fileName,'r'))
        #X   = XYZ['X']
        #Y   = XYZ['Y']
        Z1  = XYZ['Z']
        Z  += Z1
    XYZ['Z'] = Z/ (frameCount+1)
    #vmins = (np.log10(XYZ["Z"])* (Z>0)).min()
    #vmaxs = (np.log10(XYZ["Z"])* (Z>0)).max()
    X = XYZ['X']
    Y = XYZ['Y']
    XYZout = specContour.specContour(XYZ, display=True,  outputFolder=outputFolder, 
                                            #vmin=-1.0, vmax=3.6,
                                            vmin=vmin, vmax=vmax,
                                            fileName = testName+ label + "_average_of_" + str(frameCount+1) +'images.png',
                                            title=title,
                                            )
    plt.close()
    


    print testName, "number of frames", frameCount+1
    return XYZout
Пример #2
0
for count , L in enumerate([Ltotal, Lmax]):
    plt.close()
    Z = np.zeros((13,8))
    for frameCount, fileName in enumerate(L):
        XYZ = pickle.load(open(inputFolder+fileName,'r'))
        #X   = XYZ['X']
        #Y   = XYZ['Y']
        Z1  = XYZ['Z']
        Z  += Z1
    XYZ['Z'] = Z/ (frameCount+1)
    #vmins[count] = (np.log10(XYZ["Z"])* (Z>0)).min()
    #vmaxs[count] = (np.log10(XYZ["Z"])* (Z>0)).max()
    X = XYZ['X']
    Y = XYZ['Y']
    XYZouts[count] = specContour.specContour(XYZ, display=True,  outputFolder=outputFolder, 
                                            vmin=-1.0, vmax=3.6,
                                            fileName = testName+ labels[count] + "_average_of_" + str(frameCount+1) +'images.png')
    plt.close()
    XYZs[count] = {'X': X.copy(), 'Y': Y.copy(), 'Z': Z.copy()}

specContour.specContour(XYZs[0], XYZs[1], outputFolder=outputFolder, fileName=testName+"total-max.png")
#specContour.specContour(XYZs[0], XYZs[1], outputFolder=outputFolder, fileName=testName+"total-max.png", vmin=-.8, vmax=3.17)
print testName, "number of frames", frameCount+1

#
##
####
########

##   set the "setMin/setMax"  - edit here
#vmax = max(vmaxs)