Modified loop over all available stations to prevent processing of one station several times.
This commit is contained in:
		
							parent
							
								
									74682952e7
								
							
						
					
					
						commit
						c676fc5762
					
				
							
								
								
									
										13
									
								
								autoPyLoT.py
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								autoPyLoT.py
									
									
									
									
									
								
							@ -12,6 +12,7 @@ from pylot.core.util import _getVersionString
 | 
				
			|||||||
from pylot.core.read import Data, AutoPickParameter
 | 
					from pylot.core.read import Data, AutoPickParameter
 | 
				
			||||||
from pylot.core.pick.run_autopicking import run_autopicking
 | 
					from pylot.core.pick.run_autopicking import run_autopicking
 | 
				
			||||||
from pylot.core.util.structure import DATASTRUCTURE
 | 
					from pylot.core.util.structure import DATASTRUCTURE
 | 
				
			||||||
 | 
					import pdb
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
__version__ = _getVersionString()
 | 
					__version__ = _getVersionString()
 | 
				
			||||||
@ -72,11 +73,15 @@ def autoPyLoT(inputfile):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        ##########################################################
 | 
					        ##########################################################
 | 
				
			||||||
        # !automated picking starts here!   
 | 
					        # !automated picking starts here!   
 | 
				
			||||||
        for i in range(len(wfdat) - 2):
 | 
					        procstats = []
 | 
				
			||||||
 | 
					        for i in range(len(wfdat)):
 | 
				
			||||||
            stationID = wfdat[i].stats.station
 | 
					            stationID = wfdat[i].stats.station
 | 
				
			||||||
            #find corresponding streams
 | 
					            #check if station has already been processed
 | 
				
			||||||
            statdat = wfdat.select(station=stationID)
 | 
					            if stationID not in procstats:
 | 
				
			||||||
            run_autopicking(statdat, parameter)
 | 
					                procstats.append(stationID)
 | 
				
			||||||
 | 
					                #find corresponding streams
 | 
				
			||||||
 | 
					                statdat = wfdat.select(station=stationID)
 | 
				
			||||||
 | 
					                run_autopicking(statdat, parameter)
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if __name__ == "__main__":
 | 
					if __name__ == "__main__":
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user