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