From 8d3a3da0c1fcc76300189c9c4b3a5763f1132fd5 Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sun, 8 Dec 2024 22:24:21 +0000 Subject: [PATCH] qplanes mod --- .../app/widgets/euphonicmodel.py | 30 ++++++++++--------- .../utils/euphonic/structurefactorwidget.py | 2 +- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/aiidalab_qe_vibroscopy/app/widgets/euphonicmodel.py b/src/aiidalab_qe_vibroscopy/app/widgets/euphonicmodel.py index b2f5616..f625c3f 100644 --- a/src/aiidalab_qe_vibroscopy/app/widgets/euphonicmodel.py +++ b/src/aiidalab_qe_vibroscopy/app/widgets/euphonicmodel.py @@ -191,7 +191,7 @@ def _get_qsection_spectra( self, ): # This is used to update the spectra in the case we plot the Q planes (the third tab). - parameters_qplanes = AttrDict( + self.parameters_qplanes = AttrDict( { "h": np.array([i for i in self.h_vec[:-2]]), "k": np.array([i for i in self.k_vec[:-2]]), @@ -210,14 +210,14 @@ def _get_qsection_spectra( modes, q_array, h_array, k_array, labels, dw = produce_Q_section_modes( self.fc, - h=parameters_qplanes.h, - k=parameters_qplanes.k, - Q0=parameters_qplanes.Q0, - n_h=parameters_qplanes.n_h, - n_k=parameters_qplanes.n_k, - h_extension=parameters_qplanes.h_extension, - k_extension=parameters_qplanes.k_extension, - temperature=parameters_qplanes.temperature, + h=self.parameters_qplanes.h, + k=self.parameters_qplanes.k, + Q0=self.parameters_qplanes.Q0, + n_h=self.parameters_qplanes.n_h, + n_k=self.parameters_qplanes.n_k, + h_extension=self.parameters_qplanes.h_extension, + k_extension=self.parameters_qplanes.k_extension, + temperature=self.parameters_qplanes.temperature, ) self.av_spec, self.z, self.x, self.y, self.labels = ( @@ -226,15 +226,17 @@ def _get_qsection_spectra( q_array, h_array, k_array, - ecenter=parameters_qplanes.ecenter, - deltaE=parameters_qplanes.deltaE, - bins=parameters_qplanes.bins, - spectrum_type=parameters_qplanes.spectrum_type, + ecenter=self.parameters_qplanes.ecenter, + deltaE=self.parameters_qplanes.deltaE, + bins=self.parameters_qplanes.bins, + spectrum_type=self.parameters_qplanes.spectrum_type, dw=dw, labels=labels, ) ) - + self.xlabel = "AAA" + self.ylabel = "AAA" + def _curate_path_and_labels( self, ): diff --git a/src/aiidalab_qe_vibroscopy/utils/euphonic/structurefactorwidget.py b/src/aiidalab_qe_vibroscopy/utils/euphonic/structurefactorwidget.py index 3d9c9bf..acda557 100644 --- a/src/aiidalab_qe_vibroscopy/utils/euphonic/structurefactorwidget.py +++ b/src/aiidalab_qe_vibroscopy/utils/euphonic/structurefactorwidget.py @@ -451,7 +451,7 @@ def _download(payload, filename): def _on_vector_changed(self, change=None): """ - Update the model. + Update the model. Specific to qplanes case. """ self._model.Q0_vec = [i.value for i in self.Q0_vec.children[:-2]] self._model.h_vec = [i.value for i in self.h_vec.children]