Commit f61fdf45 authored by Julia Garriga Ferrer's avatar Julia Garriga Ferrer
Browse files

Merge branch 'bss_change_label' into 'master'

Change labels in BSS

See merge request !121
parents c80e49bd 8bef0a5b
Pipeline #48117 passed with stage
in 2 minutes and 18 seconds
......@@ -210,15 +210,20 @@ class DisplayComponentsWidget(qt.QMainWindow):
for i in range(len(self.W.T)):
self._plot_rocking_curves.addCurve(numpy.arange(len(self.W.T[i])), self.W.T[i], legend=str(i))
self._plot_rocking_curves.getBrowser().setEnabled(False)
self._plot_rocking_curves.getPlot().setGraphXLabel("Image id")
elif axis != -1 and axis is not None:
self.dimension = len(self.dimensions) - axis
self._plot_rocking_curves.clear()
self._plot_rocking_curves.getBrowser().setEnabled(True)
self._plot_rocking_curves.getBrowser().setRange(0, self.dimensions_shape[self.dimension] - 1)
self._plot_rocking_curves.getBrowser().setValue(0)
text = list(self.dimensions.keys())[self.dimension]
self._plot_rocking_curves.getPlot().setGraphXLabel(text)
dim_values = list(self.dimensions.values())[self.dimension]
dim_values = numpy.take(dim_values.reshape(self.dimensions_shape), self.index, self.dimension)
for i in range(len(self.W.T)):
W = numpy.take(self.W.T[i].reshape(self.dimensions_shape), self.index, self.dimension)
self._plot_rocking_curves.addCurve(numpy.arange(len(W)), W, legend=str(i))
self._plot_rocking_curves.addCurve(dim_values, W, legend=str(i))
else:
raise ValueError('Axis %s is not managed' % axis)
......@@ -229,9 +234,11 @@ class DisplayComponentsWidget(qt.QMainWindow):
"""
self.index = index
self._plot_rocking_curves.clear()
dim_values = list(self.dimensions.values())[self.dimension]
dim_values = numpy.take(dim_values.reshape(self.dimensions_shape), self.index, self.dimension)
for i in range(len(self.W.T)):
W = numpy.take(self.W.T[i].reshape(self.dimensions_shape), self.index, self.dimension)
self._plot_rocking_curves.addCurve(numpy.arange(len(W)), W, legend=str(i))
self._plot_rocking_curves.addCurve(dim_values, W, legend=str(i))
def setStackViewColormap(self, colormap):
"""
......
Supports Markdown
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