Skip to content

Commit 5e8018b

Browse files
committed
Propagate sample temperature for overplotting
1 parent 3ccb562 commit 5e8018b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/mslice/presenters/cut_plotter_presenter.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
cut_figure_exists,
77
get_current_plot,
88
)
9+
from mslice.models.cut.cut import SampleTempValueError
910
from mslice.models.cut.cut_functions import compute_cut
1011
from mslice.models.labels import generate_legend
1112
from mslice.models.workspacemanager.workspace_algorithms import export_workspace_to_ads
@@ -316,6 +317,13 @@ def _get_overall_q_axis(self):
316317
def _get_overall_max_signal(self, intensity_correction):
317318
overall_max_signal = 0
318319
for cut in self._cut_cache_dict[plt.gca()]:
320+
try:
321+
cut.sample_temp
322+
except SampleTempValueError:
323+
try:
324+
self.propagate_sample_temperatures_throughout_cache(plt.gca())
325+
except RuntimeError:
326+
continue
319327
ws = cut.get_intensity_corrected_ws(intensity_correction)
320328
max_cut_signal = np.nanmax(ws.get_signal())
321329
if max_cut_signal > overall_max_signal:

0 commit comments

Comments
 (0)