if len(sys.argv) == 2: if (type(sys.argv[1]) == str): files = glob.glob(sys.argv[1]) elif (type(sys.argv[1]) == list): files = sys.argv[1] else: print("Unrecognized input.") # end if else: files = sys.argv[1:] # end if files.sort() print(files) skews = skewtools.gatherDataFromFiles(files,'Avgd_Skewness') # Assume the same times for all files to save space. time = skewtools.gatherDataFromFiles([files[0]],'Time')[0] # Set up a colormap. cnum=0 cmaps = cm.jet(linspace(0,1,len(skews))) idx = 0 fig = pyplot.figure() ax = fig.add_subplot(1,1,1) ax.hold(True)
import glob import skewtools # Read the input arguments as a list of files to pull data from. # Then pull the information from each of those files. if len(sys.argv) == 2: files = glob.glob(sys.argv[1]) else: files = sys.argv[1:] # end if files.sort() kurts = skewtools.gatherDataFromFiles(files, 'Avgd_Kurtosis') # Assume the same times for all files to save space. time = skewtools.gatherDataFromFiles([files[0]], 'Time')[0] # Set up a colormap. cnum = 0 cmaps = cm.jet(linspace(0, 1, len(kurts))) idx = 0 fig = pyplot.figure() ax = fig.add_subplot(1, 1, 1) ax.hold(True) for kurt in kurts: time = skewtools.gatherDataFromFiles([files[cnum]], 'Time')[0]
#h5pydir = workdir+'/lib/python-2.7/site-packages/h5py/' #sys.path.append(str(h5pydir)) #import highlevel as h5py import h5py import skewtools # Read the input files. The first file will be used as a reference, # and the rest will be compared against it. reference = [sys.argv[1]] files = sys.argv[2:] # Generate a list tref = skewtools.gatherDataFromFiles(reference, 'Time')[0] # May need to change the name of the dataset here. skref = skewtools.gatherDataFromFiles(reference, 'Avgd_Skewness_Hybrid')[0] kuref = skewtools.gatherDataFromFiles(reference, 'Avgd_Kurtosis_Hybrid')[0] - 3. times = skewtools.gatherDataFromFiles(files, 'Time') skews = skewtools.gatherDataFromFiles(files, 'Avgd_Skewness') kurts = skewtools.gatherDataFromFiles(files, 'Avgd_Kurtosis') # Get a time interval which all the simulations share. tmin = tref.min() tmax = tref.max() for ta in times:
import glob import skewtools # Read the input arguments as a list of files to pull data from. # Then pull the information from each of those files. if len(sys.argv) == 2: files = glob.glob(sys.argv[1]) else: files = sys.argv[1:] # end if files.sort() Pe = skewtools.gatherDataFromFiles(files, 'Peclet')[0] variances = skewtools.gatherDataFromFiles(files, 'Avgd_Variance') # Assume the same times for all files to save space. times = skewtools.gatherDataFromFiles(files, 'Time') # Set up a colormap. cnum = 0 cmaps = cm.jet(linspace(0, 1, len(variances))) idx = 0 fig = pyplot.figure() ax = fig.add_subplot(1, 1, 1) ax.set_xlabel('Time')