Skip to content

Commit

Permalink
Small changes in the results
Browse files Browse the repository at this point in the history
- setting automatic autoscale of the phonon bands
- putting INS results at the end
  • Loading branch information
mikibonacci committed Sep 21, 2024
1 parent 24bafec commit 7ec2adb
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/aiidalab_qe_vibroscopy/app/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ 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"]!
downloadBandsPdos_widget = DownloadBandsPdosWidget(
Expand All @@ -101,7 +105,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 +162,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"])
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 @@ -210,6 +209,13 @@ def _update_view(self):
dielectric_results = DielectricResults(dielectric_data)
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)

Expand Down

0 comments on commit 7ec2adb

Please sign in to comment.