Skip to content
Snippets Groups Projects
Commit e9c31d4c authored by Doak, Peter W.'s avatar Doak, Peter W.
Browse files

quick plot of S of q omega bins

parent 62eb1683
No related branches found
No related tags found
No related merge requests found
# // 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()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment