m-thesis-introduction/simulations/lib/location/emitter.py

17 lines
400 B
Python
Raw Normal View History

2022-03-11 16:40:02 +01:00
from functools import partial
try:
from .location import Location
except ImportError:
from location import Location
class Emitter(Location):
"""
Emit a signal from position x_0 (and time t_0)
"""
def __repr__(self):
return "Emitter({})".format(repr(self.x))
def emit(self, travel_signal: callable) -> callable:
return partial(travel_signal, x_0=self.x)