From 8b066d048ce9426ff701d6718c5e318d3c72df6c Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Mon, 23 Sep 2024 13:02:46 +0000 Subject: [PATCH] Bug fixing the q_path in Result panel. --- src/aiidalab_qe_vibroscopy/app/result.py | 4 +++- .../utils/euphonic/euphonic_single_crystal_widgets.py | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/aiidalab_qe_vibroscopy/app/result.py b/src/aiidalab_qe_vibroscopy/app/result.py index 36cc7c8..30dae04 100644 --- a/src/aiidalab_qe_vibroscopy/app/result.py +++ b/src/aiidalab_qe_vibroscopy/app/result.py @@ -211,7 +211,9 @@ def _update_view(self): # euphonic if ins_data: - intensity_maps = EuphonicSuperWidget(fc=ins_data["fc"]) + intensity_maps = EuphonicSuperWidget( + fc=ins_data["fc"], q_path=ins_data["q_path"] + ) children_result_widget += (intensity_maps,) tab_titles.append("Inelastic Neutrons") diff --git a/src/aiidalab_qe_vibroscopy/utils/euphonic/euphonic_single_crystal_widgets.py b/src/aiidalab_qe_vibroscopy/utils/euphonic/euphonic_single_crystal_widgets.py index 7e9ec26..f03df86 100644 --- a/src/aiidalab_qe_vibroscopy/utils/euphonic/euphonic_single_crystal_widgets.py +++ b/src/aiidalab_qe_vibroscopy/utils/euphonic/euphonic_single_crystal_widgets.py @@ -203,7 +203,7 @@ def __init__(self, fc, q_path, **kwargs): self.spectra, self.parameters = produce_bands_weigthed_data( fc=self.fc, - linear_path = self.q_path, + linear_path=self.q_path, plot=False, # CHANGED ) @@ -252,7 +252,8 @@ def _on_plot_button_clicked(self, change=None): } else: linear_path = copy.deepcopy(self.q_path) - linear_path["delta_q"] = parameters_["q_spacing"] + if linear_path: + linear_path["delta_q"] = parameters_["q_spacing"] self.spectra, self.parameters = produce_bands_weigthed_data( params=parameters_,