mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-11-13 10:03:32 +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
|
from functools import partial
|
||||||
|
|
||||||
try:
|
from .location import Location
|
||||||
from .location import Location
|
|
||||||
except ImportError:
|
|
||||||
from location import Location
|
|
||||||
|
|
||||||
class Antenna(Location):
|
class Antenna(Location):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -3,8 +3,14 @@
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
from mpl_toolkits.mplot3d import axes3d
|
from mpl_toolkits.mplot3d import axes3d
|
||||||
|
|
||||||
import location as loc
|
# fix package-internal importing
|
||||||
from antenna import Receiver, Emitter
|
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
|
# 2D showcase
|
||||||
source = Emitter([1,1])
|
source = Emitter([1,1])
|
||||||
|
|
|
@ -2,10 +2,12 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import scipy.interpolate as interp
|
import scipy.interpolate as interp
|
||||||
|
|
||||||
try:
|
if __name__ == "__main__" and __package__ is None:
|
||||||
from .signal import *
|
import sys
|
||||||
except ImportError:
|
sys.path.append("../../")
|
||||||
from signal import *
|
__package__ = "lib.signals"
|
||||||
|
|
||||||
|
from .signal import *
|
||||||
|
|
||||||
class DigitisedSignal(Signal):
|
class DigitisedSignal(Signal):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue