Skip to content

Commit

Permalink
black fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanSchott committed Jun 24, 2024
1 parent 8e58836 commit f29bcd7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
8 changes: 4 additions & 4 deletions impurityModel/plotScripts/plotRIXS.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ def main():

dx = wIn[1] - wIn[0]
dy = wLoss[1] - wLoss[0]
left = wIn[0] - dx/2
right = wIn[-1] + dx/2
bottom = wLoss[0] - dy/2
top = wLoss[-1] + dy/2
left = wIn[0] - dx / 2
right = wIn[-1] + dx / 2
bottom = wLoss[0] - dy / 2
top = wLoss[-1] + dy / 2

plt.figure()
cs = plt.imshow(tmp, origin="lower", extent=(left, right, bottom, top), aspect="auto", norm="log")
Expand Down
24 changes: 13 additions & 11 deletions impurityModel/plotScripts/plotSpectra.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,13 @@ def plot_spectra_in_file(filename):
tmp = np.sum(rixs, axis=(0, 1)).T
mask = tmp < plotCutOff
tmp[mask] = np.nan

dx = wIn[1] - wIn[0]
dy = wLoss[1] - wLoss[0]
left = wIn[0] - dx/2
right = wIn[-1] + dx/2
bottom = wLoss[0] - dy/2
top = wLoss[-1] + dy/2
left = wIn[0] - dx / 2
right = wIn[-1] + dx / 2
bottom = wLoss[0] - dy / 2
top = wLoss[-1] + dy / 2

plt.figure()
cs = plt.imshow(tmp, origin="lower", extent=(left, right, bottom, top), aspect="auto", norm="log")
Expand All @@ -188,7 +188,7 @@ def plot_spectra_in_file(filename):
plt.xlabel(r"$\omega_{in}$ (eV)")
plt.ylabel(r"$\omega_{loss}$ (eV)")
plt.tight_layout()
#plt.savefig("rixs.png")
# plt.savefig("rixs.png")

# All polarization combinations In:x,y,z , Out:x,y,z
if rixs.shape[:2] != (1, 1):
Expand All @@ -198,19 +198,21 @@ def plot_spectra_in_file(filename):
tmp = np.copy(rixs[i, j, :, :].T)
mask = tmp < plotCutOff
tmp[mask] = np.nan

cs = axes[i, j].imshow(tmp, origin="lower", extent=(left, right, bottom, top), aspect="auto", norm="log")

cs = axes[i, j].imshow(
tmp, origin="lower", extent=(left, right, bottom, top), aspect="auto", norm="log"
)
cbar = plt.colorbar(cs, ax=axes[i, j])
if j == np.shape(axes)[1] -1:
if j == np.shape(axes)[1] - 1:
cbar.ax.set_ylabel("RIXS intensity")
axes[i, j].set_title(f"({i},{j})")
for ax in axes[2, :]:
ax.set_xlabel(r"$\omega_{in}$ (eV)")
for ax in axes[:, 0]:
ax.set_ylabel(r"$\omega_{loss}$ (eV)")
plt.tight_layout()
#plt.savefig("rixs_polarizations.png")
# plt.savefig("rixs_polarizations.png")

plt.show()


Expand Down

0 comments on commit f29bcd7

Please sign in to comment.