Update the calibrant preview tooltip

This commit is contained in:
Valentin Valls 2019-05-16 18:33:42 +02:00
parent 0a2162e354
commit f8eb95c42a
1 changed files with 3 additions and 3 deletions

View File

@ -103,14 +103,14 @@ class CalibrantPreview(qt.QFrame):
fileds.append((u"Name", name, None)) fileds.append((u"Name", name, None))
fileds.append((u"Nb registered rays", calibrant.count_registered_dSpacing(), None)) fileds.append((u"Nb registered rays", calibrant.count_registered_dSpacing(), None))
dSpacing = calibrant.get_dSpacing() dSpacing = calibrant.get_dSpacing()
fileds.append((u"Nb visible rays", len(dSpacing), u"between 0 and π")) fileds.append((u"Nb visible rays", len(dSpacing), u"between 0 and 180°"))
if len(dSpacing) > 0: if len(dSpacing) > 0:
ray = calibrant.get_dSpacing()[0] ray = calibrant.get_dSpacing()[0]
angle = calibrant.get_2th()[0] angle = calibrant.get_2th()[0]
fileds.append((u"First visible ray", u"%f (%f rad)" % (ray, angle), None)) fileds.append((u"First visible ray", u"%f Å (%f°)" % (ray, numpy.rad2deg(angle)), None))
ray = calibrant.get_dSpacing()[-1] ray = calibrant.get_dSpacing()[-1]
angle = calibrant.get_2th()[-1] angle = calibrant.get_2th()[-1]
fileds.append((u"Last visible ray", u"%f (%f rad)" % (ray, angle), None)) fileds.append((u"Last visible ray", u"%f Å (%f°)" % (ray, numpy.rad2deg(angle)), None))
toolTip = [] toolTip = []
for f in fileds: for f in fileds: