Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dca_mini_apps
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NDIP
Tool Sources
DCA
dca_mini_apps
Commits
e9c31d4c
Commit
e9c31d4c
authored
2 years ago
by
Doak, Peter W.
Browse files
Options
Downloads
Patches
Plain Diff
quick plot of S of q omega bins
parent
62eb1683
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plot_S_q_omega.py
+49
-0
49 additions, 0 deletions
plot_S_q_omega.py
with
49 additions
and
0 deletions
plot_S_q_omega.py
0 → 100644
+
49
−
0
View file @
e9c31d4c
# // 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()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment