mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-12-22 03:23:34 +01:00
Simu: hardcode Signal dependency in Antenna
This commit is contained in:
parent
e4af62e51d
commit
aa959f4b3d
1 changed files with 6 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
|||
from functools import partial
|
||||
|
||||
from .location import Location
|
||||
from ..signals import Signal
|
||||
|
||||
class Antenna(Location):
|
||||
"""
|
||||
|
@ -13,18 +14,18 @@ class Antenna(Location):
|
|||
def __repr__(self):
|
||||
return "Antenna({})".format(repr(self.x))
|
||||
|
||||
def recv(self, travel_signal: callable) -> callable:
|
||||
def emit(self, signal: Signal) -> callable:
|
||||
return partial(signal, x_0=self.x)
|
||||
|
||||
def recv(self, signal: Signal) -> callable:
|
||||
"""
|
||||
Return a function that traces the signal as a function of time
|
||||
at the antenna's location
|
||||
"""
|
||||
return partial(travel_signal, x_f=self.x)
|
||||
return partial(signal, x_f=self.x)
|
||||
|
||||
receive = recv
|
||||
|
||||
def emit(self, travel_signal: callable) -> callable:
|
||||
return partial(travel_signal, x_0=self.x)
|
||||
|
||||
class Receiver(Antenna):
|
||||
"""
|
||||
An antenna which main purpose is to trace a signal over time.
|
||||
|
|
Loading…
Reference in a new issue