Skip to content

Commit

Permalink
Merge branch 'main' into fix/INS_lowD
Browse files Browse the repository at this point in the history
  • Loading branch information
mikibonacci committed Sep 23, 2024
2 parents dfb735f + 7ec2adb commit 4ab3eea
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/aiidalab_qe_vibroscopy/app/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ def _update_view(self):
_bands_plot_view_class = PhononBandPdosPlotly(
bands_data=phonon_data["bands"][0],
pdos_data=phonon_data["pdos"][0],
).bandspdosfigure
_bands_plot_view_class.update_layout(
yaxis=dict(autorange=True), # Automatically scale the y-axis
)

# the data (bands and pdos) are the first element of the lists phonon_data["bands"] and phonon_data["pdos"]!
Expand All @@ -101,7 +104,7 @@ def _update_view(self):
)

phonon_children += (
_bands_plot_view_class.bandspdosfigure,
_bands_plot_view_class,
ipw.HBox(
children=[
downloadBandsPdos_widget,
Expand Down Expand Up @@ -158,11 +161,6 @@ def _update_view(self):
),
),
) # the comma is required! otherwise the tuple is not detected.
# euphonic
if ins_data:
intensity_maps = EuphonicSuperWidget(fc=ins_data["fc"], q_path=ins_data["q_path"])
children_result_widget += (intensity_maps,)
tab_titles.append("Inelastic Neutrons")

if spectra_data:
# Here we should provide the possibility to have both IR and Raman,
Expand Down Expand Up @@ -211,6 +209,12 @@ def _update_view(self):
children_result_widget += (dielectric_results,)
tab_titles.append("Dielectric properties")

# euphonic
if ins_data:
intensity_maps = EuphonicSuperWidget(fc=ins_data["fc"])
children_result_widget += (intensity_maps,)
tab_titles.append("Inelastic Neutrons")

self.result_tabs = ipw.Tab(children=children_result_widget)

for title_index in range(len(tab_titles)):
Expand Down

0 comments on commit 4ab3eea

Please sign in to comment.