Commit 5f943a8e authored by Benoit Rossignol's avatar Benoit Rossignol

Correct error in momentum_to_scattering_mode

parent 878c1daa
......@@ -780,8 +780,10 @@ class BandSketching:
assert _is_type(band, 'integer')
energy = self.__call__(k, band)
momenta = self._modes(energy=energy)[0].momenta
return np.abs(momenta[momenta > 0] - k).argmin()
modes = self._modes(energy=energy)[0]
momenta = modes.momenta
velocities = modes.velocities
return np.abs(momenta[velocities > 0] - k).argmin()
def energy_to_scattering_mode(self, energy, band, kmin, kmax):
"""Finds the scattering mode index for a band giving its energy.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment