Commit 630b1bf8 authored by Julia Garriga Ferrer's avatar Julia Garriga Ferrer
Browse files

[gui][grainplot] Modify axes if transformation is present

parent 8ad456b5
......@@ -231,8 +231,16 @@ class GrainPlotWidget(qt.QMainWindow):
plot.addImage(darfix.config.FWHM_VAL * self._moments[i][1])
elif method == Method.COM:
self._plotWidget.show()
for i, plot in enumerate(self._plots):
plot.addImage(self._moments[i][0])
if self.dataset.transformation is not None:
px = self.dataset.transformation[0][0][0]
py = self.dataset.transformation[1][0][0]
xscale = (self.dataset.transformation[0][-1][-1] - px) / len(self.dataset.transformation[0][0])
yscale = (self.dataset.transformation[1][-1][-1] - py) / len(self.dataset.transformation[1][0])
for i, plot in enumerate(self._plots):
plot.addImage(self._moments[i][0], origin=(px, py), scale=(xscale, yscale))
else:
for i, plot in enumerate(self._plots):
plot.addImage(self._moments[i][0])
elif method == Method.SKEWNESS:
self._plotWidget.show()
for i, plot in enumerate(self._plots):
......
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