mirror of
				https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
				synced 2025-10-31 03:46:44 +01:00 
			
		
		
		
	Simu: Python's import system is too hard for me
This commit is contained in:
		
							parent
							
								
									a50f6640a4
								
							
						
					
					
						commit
						e4af62e51d
					
				
					 3 changed files with 15 additions and 10 deletions
				
			
		|  | @ -1,9 +1,6 @@ | |||
| from functools import partial | ||||
| 
 | ||||
| try: | ||||
| from .location import Location | ||||
| except ImportError: | ||||
|     from location import Location | ||||
| 
 | ||||
| class Antenna(Location): | ||||
|     """ | ||||
|  |  | |||
|  | @ -3,8 +3,14 @@ | |||
| import matplotlib.pyplot as plt | ||||
| from mpl_toolkits.mplot3d import axes3d | ||||
| 
 | ||||
| import location as loc | ||||
| from antenna import Receiver, Emitter | ||||
| # fix package-internal importing | ||||
| if __name__ == "__main__" and __package__ is None: | ||||
|     import sys | ||||
|     sys.path.append("../../") | ||||
|     __package__ = "lib.location" | ||||
| 
 | ||||
| from . import location as loc | ||||
| from ..location.antenna import Receiver, Emitter | ||||
| 
 | ||||
| # 2D showcase | ||||
| source = Emitter([1,1]) | ||||
|  |  | |||
|  | @ -2,10 +2,12 @@ | |||
| import numpy as np | ||||
| import scipy.interpolate as interp | ||||
| 
 | ||||
| try: | ||||
| if __name__ == "__main__" and __package__ is None: | ||||
|     import sys | ||||
|     sys.path.append("../../") | ||||
|     __package__ = "lib.signals" | ||||
| 
 | ||||
| from .signal import * | ||||
| except ImportError: | ||||
|     from signal import * | ||||
| 
 | ||||
| class DigitisedSignal(Signal): | ||||
|     """ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue