Advertisement
Stex6299

Untitled

May 24th, 2021
751
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. g2Num = np.zeros_like(imgSomma, dtype = np.float64)
  2.  
  3. for i,e in enumerate(os.scandir(r".\1slit_thermal_npz")):
  4.     tmpImg = np.load(e)['arr_0']
  5.     print(i)
  6.    
  7.     if e.name in strBuio: continue    
  8.    
  9.     tmpImg = tmpImg - matNoise
  10.    
  11.     Ix1 = tmpImg[110, 325]    
  12.     g2Num += tmpImg * Ix1
  13.        
  14. g2Num = g2Num/numFrame
  15.        
  16. #avgx1 = np.sum(imgSommaFilt[110:121, 325:356]) / numFrame
  17. avgx1 = imgSommaFilt[110, 325] / numFrame
  18. avgx2 = imgSommaFilt / numFrame
  19.  
  20. g2 = g2Num / (avgx1 * avgx2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement