artifical z for 2D datasets is now removed
@@ -204,6 +204,7 @@ class Window(QtGui.QMainWindow):
self.status_bar = self.statusBar()
self._pixmap = None
self.locs = []
+ self.z_state = []
self.group_index = []
self.infos = []
self.locs_paths = []
@@ -454,6 +455,9 @@ class Window(QtGui.QMainWindow):
out_locs.y += cy
info = self.infos[i] + [{'Generated by': 'Picasso Average3'}]
+ if not self.z_state[i]:
+ out_locs = lib.remove_from_rec(out_locs, 'z')
+
out_path = os.path.splitext(self.locs_paths[i])[0] + '_avg3.hdf5'
path = QtGui.QFileDialog.getSaveFileName(self, 'Save localizations', out_path, filter='*.hdf5')
io.save_locs(path, out_locs, info)
@@ -492,7 +496,10 @@ class Window(QtGui.QMainWindow):
if not hasattr(locs, 'z'):
locs = lib.append_to_rec(locs, locs.x.copy(), 'z')
self.pixelsize = 1
+ has_z = False
+
else:
+ has_z = True
if self.pixelsize == 0:
pixelsize,ok = QtGui.QInputDialog.getInt(self,"Pixelsize Dialog","Please enter the pixelsize in nm", 130)
if ok:
@@ -501,6 +508,7 @@ class Window(QtGui.QMainWindow):
self.pixelsize = 130
self.locs.append(locs)
+ self.z_state.append(has_z)
self.infos.append(info)
self.locs_paths.append(path)
self.index_blocks.append(None)
