From e9c31d4c9852c40ae0534c90f34291be6b90d87c Mon Sep 17 00:00:00 2001
From: Peter Doak <doakpw@ornl.gov>
Date: Mon, 11 Jul 2022 17:19:22 -0400
Subject: [PATCH] quick plot of S of q omega bins

---
 plot_S_q_omega.py | 49 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 plot_S_q_omega.py

diff --git a/plot_S_q_omega.py b/plot_S_q_omega.py
new file mode 100644
index 0000000..a36643e
--- /dev/null
+++ b/plot_S_q_omega.py
@@ -0,0 +1,49 @@
+# // Copyright (C) 2022 UT-Battelle, LLC
+# // All rights reserved.
+# //
+# // See LICENSE for terms of usage.
+# // See CITATION.md for citation guidelines, if DCA++ is used for scientific publications.
+# //
+# // Author: Peter Doak (doakpw@ornl.gov)
+# //
+
+# This script just plots the first 10 bins of an S of q omega calculation. 
+
+import pyDCA.Adios2.read as adr
+import matplotlib as mpl
+import matplotlib.pyplot as plt
+def trim_axs(axs, N):
+  """
+  Reduce *axs* to *N* Axes. All further Axes are removed from the figure.
+  """
+  axs = axs.flat
+  for ax in axs[N:]:
+      ax.remove()
+  return axs[:N]
+
+fig = plt.figure(figsize=(20,10), constrained_layout=True)
+axs = trim_axs(fig.subplots(2,5), 10)
+
+adios_fh = adr.fhFromFilename("analysis100k.bp")
+chi_dbl_prime = adr.readMRChiDoublePrime(adios_fh)
+
+for j in range(10):
+  for i in range(10):
+    axs[j].scatter(range(chi_dbl_prime.shape[1]), chi_dbl_prime[i,:,j])
+plt.show()
+
+
+# adios_fh =  adr.fhFromFilename("analysis.bp")
+# chi_dbl_prime = adr.readChiDoublePrime(adios_fh)
+
+# fig = plt.figure(figsize=(20,5), constrained_layout=True)
+# axs = fig.subplots(1,3)
+
+# for i in range(5):
+#   axs[0].scatter(range(chi_dbl_prime.shape[2]), chi_dbl_prime[0,i,:])
+#   axs[1].scatter(range(chi_dbl_prime.shape[2]), chi_dbl_prime[1,i,:])
+#   axs[2].scatter(range(chi_dbl_prime.shape[2]), chi_dbl_prime[2,i,:])
+# #plt.scatter(chi_dbl_prime[2][0,:])
+# plt.show()
+
+
-- 
GitLab