Skip to content

Commit cc04948

Browse files
committed
chore: add non-implemented methods in Pulse class
So it can be subclassed.
1 parent 56dd936 commit cc04948

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

src/komm/_pulses/Pulse.py

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
from functools import cached_property
2+
3+
import numpy as np
4+
import numpy.typing as npt
5+
16
from .. import abc
27

38

@@ -6,4 +11,23 @@ class Pulse(abc.Pulse):
611
General pulse [Not implemented yet].
712
"""
813

9-
pass
14+
def waveform(self, t: npt.ArrayLike) -> npt.NDArray[np.floating]:
15+
raise NotImplementedError
16+
17+
def spectrum(self, f: npt.ArrayLike) -> npt.NDArray[np.complexfloating]:
18+
raise NotImplementedError
19+
20+
def autocorrelation(self, tau: npt.ArrayLike) -> npt.NDArray[np.floating]:
21+
raise NotImplementedError
22+
23+
def energy_density_spectrum(self, f: npt.ArrayLike) -> npt.NDArray[np.floating]:
24+
raise NotImplementedError
25+
26+
@cached_property
27+
def support(self) -> tuple[float, float]:
28+
raise NotImplementedError
29+
30+
def taps(
31+
self, samples_per_symbol: int, span: tuple[int, int] | None = None
32+
) -> npt.NDArray[np.floating]:
33+
return super().taps(samples_per_symbol, span)

0 commit comments

Comments
 (0)