Skip to content

Commit

Permalink
qplanes mod
Browse files Browse the repository at this point in the history
  • Loading branch information
mikibonacci committed Dec 8, 2024
1 parent f256211 commit 8d3a3da
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
30 changes: 16 additions & 14 deletions src/aiidalab_qe_vibroscopy/app/widgets/euphonicmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]]),
Expand All @@ -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 = (
Expand All @@ -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,
):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 8d3a3da

Please sign in to comment.