summaryrefslogtreecommitdiffstats
path: root/dpd
diff options
context:
space:
mode:
authorandreas128 <Andreas>2017-09-14 19:12:20 +0200
committerandreas128 <Andreas>2017-09-15 11:47:29 +0200
commita7f37b014174d09ff3b5aaaf7a54acee84a29ff2 (patch)
tree542c9151dc3f9aa542e4c8d32127d4c46d41777d /dpd
parent67ca2e1249eb4805ea064d5fa99b442afc560fc5 (diff)
downloaddabmod-a7f37b014174d09ff3b5aaaf7a54acee84a29ff2.tar.gz
dabmod-a7f37b014174d09ff3b5aaaf7a54acee84a29ff2.tar.bz2
dabmod-a7f37b014174d09ff3b5aaaf7a54acee84a29ff2.zip
Add minimum tx value for analysis by Model_PM
Diffstat (limited to 'dpd')
-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