From c77ecc652498abf33d3340e79a434db5464317dc Mon Sep 17 00:00:00 2001 From: jupfi Date: Wed, 2 Aug 2023 11:04:27 +0200 Subject: [PATCH] Added method to get time domain points. --- src/nqrduck_spectrometer/pulseparameters.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nqrduck_spectrometer/pulseparameters.py b/src/nqrduck_spectrometer/pulseparameters.py index e4aa4f5..a9a6fb1 100644 --- a/src/nqrduck_spectrometer/pulseparameters.py +++ b/src/nqrduck_spectrometer/pulseparameters.py @@ -52,6 +52,11 @@ class Function: f = sympy.lambdify([x], final_expr, "numpy") return f(t) + + def get_tdx(self, pulse_length : float) -> None: + n = int(pulse_length / self.resolution) + t = np.linspace(self.start_x, self.end_x, n) + return t def frequency_domain_plot(self, pulse_length: Decimal) -> MplWidget: mpl_widget = MplWidget()