[add] check for nsamples and negative slope of cf
This commit is contained in:
		
							parent
							
								
									e6aa1ad031
								
							
						
					
					
						commit
						039f98a811
					
				| @ -24,7 +24,7 @@ from pylot.core.util.utils import getPatternLine, gen_Pool, identifyPhase, loopI | ||||
| from obspy.taup import TauPyModel | ||||
| 
 | ||||
| 
 | ||||
| def autopickevent(data, param, iplot=0, fig_dict=None, ncores=1, metadata=None, origin=None): | ||||
| def autopickevent(data, param, iplot=0, fig_dict=None, ncores=0, metadata=None, origin=None): | ||||
|     stations = [] | ||||
|     all_onsets = {} | ||||
|     input_tuples = [] | ||||
|  | ||||
| @ -397,8 +397,14 @@ class PragPicker(AutoPicker): | ||||
|             # prominent trend: decrease aus | ||||
|             # flat: use given aus | ||||
|             cfdiff = np.diff(cfipick) | ||||
|             if len(cfdiff)<20: | ||||
|                 print('PragPicker: Very few samples for CF. Check LTA window dimensions!') | ||||
|             i0diff = np.where(cfdiff > 0) | ||||
|             cfdiff = cfdiff[i0diff] | ||||
|             if len(cfdiff)<1: | ||||
|                 print('PragPicker: Negative slope for CF. Check LTA window dimensions! STOP') | ||||
|                 self.Pick = None | ||||
|                 return | ||||
|             minaus = min(cfdiff * (1 + self.aus)) | ||||
|             aus1 = max([minaus, self.aus]) | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user