Minor revisions
This commit is contained in:
parent
124ef73439
commit
58f51a6172
@ -62,7 +62,7 @@ def parse_NIST_data(path, min_J, max_J, max_wavenumber):
|
||||
Parity = [ele for idx, ele in enumerate(Parity) if idx not in splice_idxs]
|
||||
J = [ele for idx, ele in enumerate(J) if idx not in splice_idxs]
|
||||
Wavenumber = [ele for idx, ele in enumerate(Wavenumber) if idx not in splice_idxs]
|
||||
|
||||
|
||||
# Create a Pandas data frame with the data
|
||||
dataset = pd.DataFrame(np.array(list(zip(Parity, J, Wavenumber))), columns=['Parity', 'J', 'Wavenumber'])
|
||||
|
||||
@ -117,9 +117,9 @@ def plot_level_structure_with_red_and_blue_transitions(*args, **kwargs):
|
||||
|
||||
#figure options
|
||||
f.canvas.draw()
|
||||
plt.xlabel('$J$', fontsize=16)
|
||||
plt.ylabel('$\\tilde{v}~(cm^{-1})$', fontsize=16)
|
||||
plt.ylabel('$\\lambda~(nm)$', fontsize=16)
|
||||
plt.xlabel('J', fontsize=16)
|
||||
#plt.ylabel('$\\tilde{v}~(cm^{-1})$', fontsize=16)
|
||||
plt.ylabel('Wavelength (nm)', fontsize=16)
|
||||
|
||||
plot_handle.set_xticks(range(min_J-1, max_J+2))
|
||||
ax.get_xticklabels()[0].set_visible(False)
|
||||
@ -130,14 +130,14 @@ def plot_level_structure_with_red_and_blue_transitions(*args, **kwargs):
|
||||
yticklabels = [item.get_text() for item in ax.get_yticklabels()]
|
||||
yticklabels = ['' if item.startswith('−') or item.startswith('0') else item for item in yticklabels]
|
||||
yticks = [float(item) if item != '' else 0.0 for item in yticklabels]
|
||||
new_yticks = np.arange(min(yticks), max(yticks), 4000)
|
||||
new_yticks = np.arange(min(yticks), max_wavenumber, 4000)
|
||||
plot_handle.set_yticks(new_yticks)
|
||||
new_yticklabels = [round(1e7/item) if item != 0 else item for item in new_yticks]
|
||||
ax.set_yticklabels(new_yticklabels)
|
||||
ax.get_yticklabels()[0].set_visible(False)
|
||||
ax.get_yticklabels()[-1].set_visible(False)
|
||||
#ax.get_yticklabels()[-1].set_visible(False)
|
||||
ax.get_yticklines()[0].set_visible(False)
|
||||
ax.get_yticklines()[-2].set_visible(False)
|
||||
#ax.get_yticklines()[-2].set_visible(False)
|
||||
|
||||
plt.tick_params(axis='both', which='major', labelsize=14)
|
||||
|
||||
@ -149,7 +149,7 @@ if __name__ == '__main__':
|
||||
|
||||
min_J = 8
|
||||
max_J = 9
|
||||
max_wavenumber = 25500.0
|
||||
max_wavenumber = 24500.0
|
||||
|
||||
#Ground State: [Xe]4f^{10} 6s^2(^5I_8)
|
||||
gs_J = 8
|
||||
@ -167,7 +167,7 @@ if __name__ == '__main__':
|
||||
home_path = str(Path(__file__).parent.resolve())
|
||||
|
||||
dataframe = parse_NIST_data(home_path + os.sep + NIST_Dy_level_data_filename, min_J, max_J, max_wavenumber)
|
||||
plot_level_structure_with_red_and_blue_transitions(dataframe, gs_J, gs_wavenumber, red_J, red_wavenumber, blue_J, blue_wavenumber, home_path)
|
||||
plot_level_structure_with_red_and_blue_transitions(dataframe, gs_J, gs_wavenumber, red_J, red_wavenumber, blue_J, blue_wavenumber, max_wavenumber, home_path)
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user