masking of low intensity part of spectra changed, it is now based on upstream spectrometer only
This commit is contained in:
		
							parent
							
								
									1bfbc9f51e
								
							
						
					
					
						commit
						d11aee2988
					
				|  | @ -112,8 +112,8 @@ def maskLowIntensity(p1,p2,threshold=0.03,squeeze=True): | |||
|     m1 = np.nanmax(p1,axis=1); m2 = np.nanmax(p2,axis=1) | ||||
|     # find where each spectrum is smaller than threshold*max_for_that_shot; they will be masked out | ||||
|     idx1 = p1 < (m1[:,np.newaxis]*threshold) | ||||
|     idx2 = p2 < (m2[:,np.newaxis]*threshold) | ||||
|     idx = idx1 & idx2 | ||||
|     #idx2 = p2 < (m2[:,np.newaxis]*threshold) | ||||
|     idx = idx1# & idx2 | ||||
|     p1.mask = idx | ||||
|     p2.mask = idx | ||||
|   if squeeze: | ||||
|  | @ -235,6 +235,7 @@ class AnalyzeRun(object): | |||
|       #print("Memory available 1",x3py.toolsOS.memAvailable()) | ||||
|       s1,s2 = self.getShots(shots,calib=calib) | ||||
|       #print("Memory available 2",x3py.toolsOS.memAvailable()) | ||||
|       ret = None | ||||
|       if nImagesToFit > 0: | ||||
|         ret,bestTransf = alignment.doShots(s1[:nToFit],s2[:nToFit],doFit=True,\ | ||||
|                 initpars=initpars,nSaveImg=nSaveImg,returnBestTransform=True); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue