From 91b4fd4d98e1ebc7be7adf058dc5cade2aa2cfbf Mon Sep 17 00:00:00 2001 From: AndresOrtegaGuerrero Date: Thu, 5 Dec 2024 14:39:05 +0000 Subject: [PATCH] comment temp update --- .../widgets/euphonic/single_crystal_model.py | 60 +++++++++---------- 1 file changed, 27 insertions(+), 33 deletions(-) diff --git a/src/aiidalab_qe_vibroscopy/app/widgets/euphonic/single_crystal_model.py b/src/aiidalab_qe_vibroscopy/app/widgets/euphonic/single_crystal_model.py index a014346..308aedb 100644 --- a/src/aiidalab_qe_vibroscopy/app/widgets/euphonic/single_crystal_model.py +++ b/src/aiidalab_qe_vibroscopy/app/widgets/euphonic/single_crystal_model.py @@ -4,14 +4,8 @@ import traitlets as tl from aiida.common.extendeddicts import AttributeDict from IPython.display import display -import numpy as np from euphonic import ForceConstants -from aiidalab_qe_vibroscopy.utils.euphonic.data_manipulation.intensity_maps import ( - produce_bands_weigthed_data, - generated_curated_data, -) - class SingleCrystalFullModel(Model): node = tl.Instance(AttributeDict, allow_none=True) @@ -99,33 +93,33 @@ def _update_spectra(self): ) q_path["delta_q"] = self.q_spacing - spectra, parameters = produce_bands_weigthed_data( - params=self.parameters, - fc=self.fc, - linear_path=q_path, - plot=False, - ) - - if self.custom_path: - self.x, self.y = np.meshgrid( - spectra[0].x_data.magnitude, spectra[0].y_data.magnitude - ) - ( - self.final_xspectra, - self.final_zspectra, - self.ticks_positions, - self.ticks_labels, - ) = generated_curated_data(spectra) - else: - # Spectrum2D as output of the powder data - self.x, self.y = np.meshgrid( - spectra.x_data.magnitude, spectra.y_data.magnitude - ) - - # we don't need to curate the powder data, - # we can directly use them: - self.final_xspectra = spectra.x_data.magnitude - self.final_zspectra = spectra.z_data.magnitude + # spectra, parameters = produce_bands_weigthed_data( + # params=self.parameters, + # fc=self.fc, + # linear_path=q_path, + # plot=False, + # ) + + # if self.custom_path: + # self.x, self.y = np.meshgrid( + # spectra[0].x_data.magnitude, spectra[0].y_data.magnitude + # ) + # ( + # self.final_xspectra, + # self.final_zspectra, + # self.ticks_positions, + # self.ticks_labels, + # ) = generated_curated_data(spectra) + # else: + # # Spectrum2D as output of the powder data + # self.x, self.y = np.meshgrid( + # spectra.x_data.magnitude, spectra.y_data.magnitude + # ) + + # # we don't need to curate the powder data, + # # we can directly use them: + # self.final_xspectra = spectra.x_data.magnitude + # self.final_zspectra = spectra.z_data.magnitude def curate_path_and_labels(self, path): # This is used to curate the path and labels of the spectra if custom kpath is provided.