mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-12-22 11:33:32 +01:00
16 lines
400 B
Python
16 lines
400 B
Python
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)
|