summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-10-07 15:13:39 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2020-10-07 15:13:39 +0200
commitd5ace16a8efb627aa9882e595a8bfd1778b6ae36 (patch)
treed0fa0e09c41bfc43527cb9aecd28545012c23e3a /bin
parentf3f571ea0d4c2f2827681b81a9b341e62d086b69 (diff)
remove unused helpers
Diffstat (limited to 'bin')
-rwxr-xr-xbin/Proof_Of_Concept_PELT.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/bin/Proof_Of_Concept_PELT.py b/bin/Proof_Of_Concept_PELT.py
index 1bbff11..e359e5f 100755
--- a/bin/Proof_Of_Concept_PELT.py
+++ b/bin/Proof_Of_Concept_PELT.py
@@ -26,40 +26,6 @@ from dfatool.utils import by_name_to_by_param
from dfatool.validation import CrossValidator
-# helper functions. Not used
-def plot_data_from_json(filename, trace_num, x_axis, y_axis):
- with open(filename, "r") as file:
- tx_data = json.load(file)
- print(tx_data[trace_num]["parameter"])
- plt.plot(tx_data[trace_num]["offline"][0]["uW"])
- plt.xlabel(x_axis)
- plt.ylabel(y_axis)
- plt.show()
-
-
-def plot_data_vs_mean(signal, x_axis, y_axis):
- plt.plot(signal)
- average = np.mean(signal)
- plt.hlines(average, 0, len(signal))
- plt.xlabel(x_axis)
- plt.ylabel(y_axis)
- plt.show()
-
-
-def plot_data_vs_data_vs_means(signal1, signal2, x_axis, y_axis):
- plt.plot(signal1)
- lens = max(len(signal1), len(signal2))
- average = np.mean(signal1)
- plt.hlines(average, 0, lens, color="red")
- plt.vlines(len(signal1), 0, 100000, color="red", linestyles="dashed")
- plt.plot(signal2)
- average = np.mean(signal2)
- plt.hlines(average, 0, lens, color="green")
- plt.vlines(len(signal2), 0, 100000, color="green", linestyles="dashed")
- plt.xlabel(x_axis)
- plt.ylabel(y_axis)
- plt.show()
-
# returns the found changepoints by algo for the specific penalty pen.
# algo should be the return value of Pelt(...).fit(signal)