Skip to content

Commit

Permalink
More tweaks to web json line_breaks indices
Browse files Browse the repository at this point in the history
- The last value of line_break range seems to not be included?  By
- setting max index "too high" we get expected behaviour at
  discontinuities.
- Gamma-point LO-TO split still looks wrong, fix that separately?
  • Loading branch information
ajjackson committed Oct 11, 2024
1 parent 7dd02f2 commit 10621c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions euphonic/qpoint_phonon_modes.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,8 +888,8 @@ def _to_phonon_website_dict(self,
duplicates = self._expand_duplicates(abscissa)
breakpoints = self._remove_breaks(abscissa)

breakpoints = sorted(set([-1] + duplicates + breakpoints + [len(abscissa)]))
line_breaks = [(start + 1, end) for start, end in pairwise(breakpoints)]
breakpoints = sorted(set([-1] + duplicates + breakpoints + [len(abscissa) - 1]))
line_breaks = [(start + 1, end + 1) for start, end in pairwise(breakpoints)]

if x_tick_labels is None:
x_tick_labels = get_qpoint_labels(qpts,
Expand Down

0 comments on commit 10621c4

Please sign in to comment.