In read_metadata: Removed raise IOError if no station-meta info are available, instead print info and leave parameters as None. In restitute_data: break if no station-meta info are available.
This commit is contained in:
		
							parent
							
								
									c502f26c88
								
							
						
					
					
						commit
						86819f6b4a
					
				| @ -180,8 +180,9 @@ def read_metadata(path_to_inventory): | ||||
|     invtype = key_for_set_value(inv) | ||||
| 
 | ||||
|     if invtype is None: | ||||
|         raise IOError("Neither dataless-SEED file, inventory-xml file nor " | ||||
|                       "RESP-file found!") | ||||
|         print("Neither dataless-SEED file, inventory-xml file nor " | ||||
|               "RESP-file found!") | ||||
|         robj = None,  | ||||
|     elif invtype == 'dless':  # prevent multiple read of large dlsv | ||||
|         print("Reading metadata information from dataless-SEED file ...") | ||||
|         if len(inv[invtype]) == 1: | ||||
| @ -250,6 +251,9 @@ def restitute_data(data, invtype, inobj, unit='VEL', force=False): | ||||
|             else: | ||||
|                 finv = invlist[0] | ||||
|             inventory = read_inventory(finv, format='STATIONXML') | ||||
|         elif invtype == None: | ||||
|             print("No restitution possible, as there are no station-meta data available!") | ||||
|             break | ||||
|         else: | ||||
|             data.remove(tr) | ||||
|             continue | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user