summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dpd/src/Model_PM.py7
-rw-r--r--dpd/src/const.py5
2 files changed, 10 insertions, 2 deletions
diff --git a/dpd/src/Model_PM.py b/dpd/src/Model_PM.py
index 6639382..8d35051 100644
--- a/dpd/src/Model_PM.py
+++ b/dpd/src/Model_PM.py
@@ -66,7 +66,7 @@ class Model_PM:
ax.scatter(tx_dpd, phase_diff,
label="Binned Data",
color="blue",
- s=0.1)
+ s=1)
ax.set_title("Model_PM")
ax.set_xlabel("TX Amplitude")
ax.set_ylabel("Phase DIff")
@@ -76,6 +76,10 @@ class Model_PM:
fig.savefig(fig_path)
plt.close(fig)
+ def _discard_small_values(self, tx_dpd, phase_diff):
+ mask = tx_dpd > self.c.MPM_tx_min
+ return tx_dpd[mask], phase_diff[mask]
+
def poly(self, sig):
return np.array([sig ** i for i in range(0, 5)]).T
@@ -88,6 +92,7 @@ class Model_PM:
return tx_range, phase_diff
def get_next_coefs(self, tx_dpd, phase_diff, coefs_pm):
+ tx_dpd, phase_diff = self._discard_small_values(tx_dpd, phase_diff)
check_input_get_next_coefs(tx_dpd, phase_diff)
coefs_pm_new = self.fit_poly(tx_dpd, phase_diff)
diff --git a/dpd/src/const.py b/dpd/src/const.py
index 75ff819..2a7e64c 100644
--- a/dpd/src/const.py
+++ b/dpd/src/const.py
@@ -41,4 +41,7 @@ class const:
self.ES_start = 0.0
self.ES_end = 1.0
self.ES_n_bins = 64
- self.ES_n_per_bin = 256
+ self.ES_n_per_bin = 128
+
+ # Constants for Model_PM
+ self.MPM_tx_min = 0.1