-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec98b52
commit 280c378
Showing
13 changed files
with
355 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import numpy as np | ||
import scipy.stats as st | ||
import pandas as pd | ||
from pathlib import Path | ||
import matplotlib.pyplot as plt | ||
from matplotlib.pyplot import cm, title | ||
import scipy.stats as st | ||
from scipy.stats import skewnorm | ||
import glob | ||
import os | ||
from argparse import ArgumentParser | ||
|
||
|
||
import matplotlib.style | ||
import matplotlib as mpl | ||
|
||
import scienceplots | ||
|
||
plt.style.use(['science', 'muted', 'scatter', 'grid']) | ||
|
||
|
||
def scatter_plot_rates(filename): | ||
fig, ax = plt.subplots() | ||
data = np.loadtxt(filename) | ||
energy = data[:,0] | ||
energy -= np.min(energy) | ||
for i in range(1, data.shape[1]): | ||
ax.scatter(energy, data[:,i], label=f"Mode {i}", s=1) | ||
ax.set_xlabel("Energy (eV)") | ||
ax.set_ylabel("Rate (s$^-1$)") | ||
|
||
fig.tight_layout() | ||
|
||
ax.legend() | ||
|
||
def plot_rates(filename): | ||
fig, ax = plt.subplots() | ||
data = np.loadtxt(filename) | ||
energy = data[:,0] | ||
energy -= np.min(energy) | ||
dos = data[:,1] | ||
ax.plot(energy, dos, label="DOS") | ||
ax.set_xlabel("Energy (eV)") | ||
ax.set_ylabel("DOS") | ||
fig.tight_layout() | ||
ax.legend() | ||
|
||
|
||
|
||
|
||
if __name__ == "__main__": | ||
parser = ArgumentParser() | ||
parser.add_argument("-f", "--filename", type=str, required=True, help="Filename to plot") | ||
args = parser.parse_args() | ||
# scatter_plot_rates(args.filename) | ||
plot_rates(args.filename) | ||
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.