aboutsummaryrefslogtreecommitdiffstats
path: root/python/dpd/ExtractStatistic.py
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-19 16:11:58 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-19 16:12:19 +0100
commitf4ca82137e850e30d31e7008b34800d8b2699e5d (patch)
treeff19ad63f6ddf8a4f62b173c5955b2711646f123 /python/dpd/ExtractStatistic.py
parent9d2c85f7a2a23fcf9ce3c842d86227afed43a153 (diff)
downloaddabmod-f4ca82137e850e30d31e7008b34800d8b2699e5d.tar.gz
dabmod-f4ca82137e850e30d31e7008b34800d8b2699e5d.tar.bz2
dabmod-f4ca82137e850e30d31e7008b34800d8b2699e5d.zip
DPD: Merge Model_PM and _AM into _Poly
Diffstat (limited to 'python/dpd/ExtractStatistic.py')
-rw-r--r--python/dpd/ExtractStatistic.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/python/dpd/ExtractStatistic.py b/python/dpd/ExtractStatistic.py
index 1aa4391..a23fa1a 100644
--- a/python/dpd/ExtractStatistic.py
+++ b/python/dpd/ExtractStatistic.py
@@ -38,7 +38,7 @@ class ExtractStatistic:
"""Calculate a low variance RX value for equally spaced tx values
of a predefined range"""
- def __init__(self, c):
+ def __init__(self, c, peak_amplitude):
self.c = c
self._plot_data = None
@@ -47,7 +47,7 @@ class ExtractStatistic:
self.n_meas = 0
# Boundaries for the bins
- self.tx_boundaries = np.linspace(c.ES_start, c.ES_end, c.ES_n_bins + 1)
+ self.tx_boundaries = np.linspace(0.0, peak_amplitude, c.ES_n_bins + 1)
self.n_per_bin = c.ES_n_per_bin
# List of rx values for each bin
@@ -60,6 +60,10 @@ class ExtractStatistic:
for i in range(c.ES_n_bins):
self.tx_values_lists.append([])
+ def get_bin_info(self):
+ return "Binning: {} bins used for amplitudes between {} and {}".format(
+ len(self.tx_boundaries), np.min(self.tx_boundaries), np.max(self.tx_boundaries))
+
def plot(self, plot_path, title):
if self._plot_data is not None:
tx_values, rx_values, phase_diffs_values, phase_diffs_values_lists = self._plot_data