Skip to content

Commit

Permalink
Merge pull request #9 from RIMS-Code/more_autoformatting
Browse files Browse the repository at this point in the history
Formatting adjustments
  • Loading branch information
trappitsch authored Feb 16, 2024
2 parents 43c2a64 + 579344a commit 7cb31a8
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 26 deletions.
2 changes: 0 additions & 2 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
# with-sources: false

-e file:.
# via file:///-
attrs==23.2.0
# via hypothesis
contourpy==1.2.0
# via matplotlib
coverage==7.4.1
# via coverage
# via pytest-cov
cycler==0.12.1
# via matplotlib
Expand Down
1 change: 0 additions & 1 deletion requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# with-sources: false

-e file:.
# via file:///-
contourpy==1.2.0
# via matplotlib
cycler==0.12.1
Expand Down
8 changes: 4 additions & 4 deletions src/rimsschemedrawer/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,10 @@ def init_ui(self):
"ticks."
)
self.edt_sett_headspace.setToolTip(
"Set how much space is added on top of the"
"IP level: the head space. Adjust this"
"value whenever there is not enough space"
"on top to fit all the text in. The value"
"Set how much space is added on top of the "
"IP level: the head space. Adjust this "
"value whenever there is not enough space "
"on top to fit all the text in. The value "
"is given in cm<sup>-1</sup>."
)
layout.addWidget(self.edt_sett_arrwidth, 7, 7, 1, 1)
Expand Down
37 changes: 22 additions & 15 deletions src/rimsschemedrawer/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self, data: dict, **kwargs):
self.coluv = "#8c96df"
self.colfuv = "#9365b2"
self.colpump = "#60a55b"
self.colhdr = "#343f74" # header color
self.colhdr = "#4b5482" # header color
else:
self.colmain = "#000000"
self.colir = "#a00000"
Expand Down Expand Up @@ -170,19 +170,10 @@ def _plotit(self):
size=fsz_labels,
)

# Draw the horizontal lines for every transition below IP and for IP
for it in transition_steps:
# Draw the horizontal lines for every transition except last and for IP
for it in transition_steps[:-1]:
if it < ipvalue:
self._axes.hlines(it, xmin=0, xmax=10, color=self.colmain)
# Lines for manifold ground states
for it in range(np.sum(self.config_parser.is_low_lying)):
self._axes.hlines(
mfld_yinc * ipvalue * (1 + it),
xmin=1.5 * it + 2.3,
xmax=1.5 * it + 3.7,
linestyle="solid",
color=self.colmain,
)

# draw the state we come out of, if not ground state
if wavenumber_gs > 0.0:
Expand Down Expand Up @@ -253,7 +244,7 @@ def _plotit(self):
markeredgewidth=5.0,
)

# draw a little dashed line for the last/end state
# draw a little solid line for the last/end state
if it == len(lambda_steps) - 1:
self._axes.hlines(
tstp,
Expand Down Expand Up @@ -332,6 +323,22 @@ def _plotit(self):
yval_bott = transition_steps[it]

# now go through low-lying excited states
x_spacing_es = (
1.5
if np.sum(transition_strengths_es) == 0 or not show_trans_strength
else 2.0
)

# Lines for manifold ground states
for it in range(np.sum(self.config_parser.is_low_lying)):
self._axes.hlines(
mfld_yinc * ipvalue * (1 + it),
xmin=x_spacing_es * it + 2.3,
xmax=x_spacing_es * it + 3.7,
linestyle="solid",
color=self.colmain,
)

for it in range(len(wavenumber_es)):
if lambda_step_es[it] >= 700:
col = self.colir
Expand All @@ -342,8 +349,8 @@ def _plotit(self):
else:
col = self.colfuv

# values
xval = firstarrowxmfl + 1.5 + it * 1.5
# values for spacing and distance
xval = firstarrowxmfl + x_spacing_es + it * x_spacing_es
yval = mfld_yinc * ipvalue * (1 + it)
wstp = float(wavenumber_steps[0]) - yval

Expand Down
8 changes: 4 additions & 4 deletions src/rimsschemedrawer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
"fs_title": 14,
"fs_axes": 12,
"fs_axes_labels": 12,
"fs_labels": 14,
"headspace": 2000,
"fs_labels": 12,
"headspace": 3000,
"arrow_width": 0.2,
"arrow_head_width": 0.6,
"prec_wavelength": 3,
"prec_level": 0,
"line_breaks": False,
"ip_label_pos": "Top",
"ip_label_pos": "Bottom",
"show_forbidden_transitions": "x-out",
"show_transition_strength": False,
"show_transition_strength": True,
"show_cm-1_axis": True,
"show_eV_axis": True,
"plot_darkmode": False,
Expand Down

0 comments on commit 7cb31a8

Please sign in to comment.