start = time.time() print('{0}'.format(filePath)) print(filename + ' detected, processing') ########## Begin data reduction scripts ########################### SAXSDimReduce(calibPath, filePath, config) #QRange=QRange, ChiRange=ChiRange) stage1int = time.time() peakFitBBA(filePath, config) stage2int = time.time() ########## Visualization ######################################### # Pulling info from master CSV FWHMmap(filePath) contrastMap(filePath, hiLimit) print(filename + ' completed') end = time.time() loopTime += [(end - start)] stage1Time += [(stage1int - start)] stage2Time += [(stage2int - stage1int)] #break # Evaluate performance avgTime = np.mean(loopTime) maxTime = np.max(loopTime) avg1 = np.mean(stage1Time) avg2 = np.mean(stage2Time)
print(filename + ' detected, processing') # fake a path in prev folder # Assume name of format xxxxx_[index]_1D.csv fakeName = filename[:-7]+'.tif' fakePath = dataPath + fakeName print(fakePath) ########## Begin data reduction scripts ########################### stage1int = time.time() peakFitBBA(fakePath, config) stage2int = time.time() ########## Visualization ######################################### # Pulling info from master CSV FWHMmap(fakePath) contrastMap(fakePath, hiLimit) print(filename + ' completed') end = time.time() loopTime += [(end-start)] stage2Time += [(stage2int - stage1int)] #break # Evaluate performance avgTime = np.mean(loopTime) maxTime = np.max(loopTime) avg2 = np.mean(stage2Time) max2 = np.max(stage2Time)
import os, sys import glob from save_wafer_heatMap import FWHMmap, contrastMap ''' Takes data path and generates heatmaps based on existing master files Skips data analysis / image reduction ''' ############ INPUT PARAMETERS HERE ################ dataPath = os.path.expanduser('/data/b_mehta/bl1-5/Mar2018/TiAlCo/data/k9a/') threshFWHM = 0.57 ########### END INPUT PARAMETERS ################## # find single file for feeding into pre-existing functions fileList = glob.glob(os.path.join(dataPath, '*.tif')) if len(fileList) == 0: sys.exit('No files found') FWHMmap(fileList[0]) # generates both normal FWHM and key maps contrastMap(fileList[0], threshFWHM) # generates contrast heatmap
def test3(): masterPath = '/home/b_mehta/monHiTp/testHoldOld/k9a_040318_1_24x24_t45_0001.tif' contrastMap(masterPath) print('test3 complete')