|
9 | 9 | from mslice.models.cut.cut_functions import compute_cut
|
10 | 10 | from mslice.models.labels import generate_legend
|
11 | 11 | from mslice.models.workspacemanager.workspace_algorithms import export_workspace_to_ads
|
12 |
| -from mslice.models.workspacemanager.workspace_provider import get_workspace_handle |
| 12 | +from mslice.models.workspacemanager.workspace_provider import ( |
| 13 | + add_workspace, |
| 14 | + get_workspace_handle, |
| 15 | +) |
13 | 16 | import mslice.plotting.pyplot as plt
|
14 | 17 | from mslice.presenters.presenter_utility import PresenterUtility
|
15 | 18 | from mslice.plotting.plot_window.overplot_interface import (
|
|
18 | 21 | )
|
19 | 22 | from mslice.models.powder.powder_functions import compute_powder_line
|
20 | 23 | from mslice.models.intensity_correction_algs import sample_temperature
|
21 |
| -from mslice.models.workspacemanager.workspace_provider import add_workspace |
22 | 24 | from mslice.models.axis import Axis
|
23 | 25 | from mslice.util.intensity_correction import IntensityType, IntensityCache
|
24 | 26 | import warnings
|
@@ -350,24 +352,40 @@ def _show_intensity(self, cut_cache, intensity_correction):
|
350 | 352 | self._temp_cut_cache = []
|
351 | 353 |
|
352 | 354 | def show_scattering_function(self, axes):
|
353 |
| - self._show_intensity( |
354 |
| - self._cut_cache_dict[axes], IntensityType.SCATTERING_FUNCTION |
355 |
| - ) |
| 355 | + for key, value in self._cut_cache_dict.items(): |
| 356 | + if key == axes: |
| 357 | + self._show_intensity(value, IntensityType.SCATTERING_FUNCTION) |
| 358 | + break |
356 | 359 |
|
357 | 360 | def show_dynamical_susceptibility(self, axes):
|
358 |
| - self._show_intensity(self._cut_cache_dict[axes], IntensityType.CHI) |
| 361 | + for key, value in self._cut_cache_dict.items(): |
| 362 | + if key == axes: |
| 363 | + self._show_intensity(value, IntensityType.CHI) |
| 364 | + break |
359 | 365 |
|
360 | 366 | def show_dynamical_susceptibility_magnetic(self, axes):
|
361 |
| - self._show_intensity(self._cut_cache_dict[axes], IntensityType.CHI_MAGNETIC) |
| 367 | + for key, value in self._cut_cache_dict.items(): |
| 368 | + if key == axes: |
| 369 | + self._show_intensity(value, IntensityType.CHI_MAGNETIC) |
| 370 | + break |
362 | 371 |
|
363 | 372 | def show_d2sigma(self, axes):
|
364 |
| - self._show_intensity(self._cut_cache_dict[axes], IntensityType.D2SIGMA) |
| 373 | + for key, value in self._cut_cache_dict.items(): |
| 374 | + if key == axes: |
| 375 | + self._show_intensity(value, IntensityType.D2SIGMA) |
| 376 | + break |
365 | 377 |
|
366 | 378 | def show_symmetrised(self, axes):
|
367 |
| - self._show_intensity(self._cut_cache_dict[axes], IntensityType.SYMMETRISED) |
| 379 | + for key, value in self._cut_cache_dict.items(): |
| 380 | + if key == axes: |
| 381 | + self._show_intensity(value, IntensityType.SYMMETRISED) |
| 382 | + break |
368 | 383 |
|
369 | 384 | def show_gdos(self, axes):
|
370 |
| - self._show_intensity(self._cut_cache_dict[axes], IntensityType.GDOS) |
| 385 | + for key, value in self._cut_cache_dict.items(): |
| 386 | + if key == axes: |
| 387 | + self._show_intensity(value, IntensityType.GDOS) |
| 388 | + break |
371 | 389 |
|
372 | 390 | def set_sample_temperature(self, axes, ws_name, temp):
|
373 | 391 | cut_dict = {}
|
|
0 commit comments