Projects/laydi
Projects
/
laydi
Archived
7
0
Fork 0

Correct behavior of dataset icons and names under transformations

This commit is contained in:
Arnar Flatberg 2007-12-17 18:50:27 +00:00
parent 083702b3b1
commit 163271fc17
1 changed files with 10 additions and 9 deletions

View File

@ -383,8 +383,9 @@ class NavigatorMenu(gtk.Menu):
def on_transpose(self, item, navigator):
project = main.project
ds = self.dataset.transpose()
icon = fluents.icon_factory.get("dataset")
project.data_tree_insert(self.tree_iter, self.dataset.get_name()+".T", ds, None, "black", icon)
ds._name = ds._name + ".T"
icon = fluents.icon_factory.get(ds)
project.data_tree_insert(self.tree_iter, ds.get_name(), ds, None, "black", icon)
def on_standardise_rows(self, item, navigator):
project = main.project
@ -392,8 +393,8 @@ class NavigatorMenu(gtk.Menu):
ds._name = self.dataset._name + ".rsc"
axis = 1
ds._array = ds._array/scipy.expand_dims(ds._array.std(axis), axis)
icon = fluents.icon_factory.get("dataset")
project.data_tree_insert(self.tree_iter, ds._name, ds, None, "black", icon)
icon = fluents.icon_factory.get(ds)
project.data_tree_insert(self.tree_iter, ds.get_name(), ds, None, "black", icon)
def on_standardise_cols(self, item, navigator):
project = main.project
@ -401,8 +402,8 @@ class NavigatorMenu(gtk.Menu):
ds._name = self.dataset._name + ".csc"
axis = 0
ds._array = ds._array/scipy.expand_dims(ds._array.std(axis), axis)
icon = fluents.icon_factory.get("dataset")
project.data_tree_insert(self.tree_iter, ds._name, ds, None, "black", icon)
icon = fluents.icon_factory.get(ds)
project.data_tree_insert(self.tree_iter, ds.get_name(), ds, None, "black", icon)
def on_log(self, item, navigator):
project = main.project
@ -415,6 +416,6 @@ class NavigatorMenu(gtk.Menu):
ds = self.dataset.copy()
ds._array = scipy.log(ds._array)
icon = fluents.icon_factory.get("dataset")
ds._name = self.dataset.get_name()+".log"
project.data_tree_insert(self.tree_iter, ds._name, ds, None, "black", icon)
icon = fluents.icon_factory.get(ds)
ds._name = ds._name + ".log"
project.data_tree_insert(self.tree_iter, ds.get_name(), ds, None, "black", icon)