FIXING STUFF!
Rename should be complete or almost so.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
from fluents import dataset
|
||||
from laydi import dataset
|
||||
|
||||
_dim_annotation_handlers = {}
|
||||
|
||||
|
||||
@@ -545,7 +545,7 @@ class Selection(dict):
|
||||
|
||||
|
||||
def write_ftsv(fd, ds, decimals=7, sep='\t', fmt=None, sp_format=True):
|
||||
"""Writes a dataset in fluents tab separated values (ftsv) form.
|
||||
"""Writes a dataset in laydi tab separated values (ftsv) form.
|
||||
|
||||
@param fd: An open file descriptor to the output file.
|
||||
@param ds: The dataset to be written.
|
||||
@@ -607,7 +607,7 @@ def write_ftsv(fd, ds, decimals=7, sep='\t', fmt=None, sp_format=True):
|
||||
fd.close()
|
||||
|
||||
def read_ftsv(fd, sep=None):
|
||||
"""Read a dataset in fluents tab separated values (ftsv) form and return it.
|
||||
"""Read a dataset in laydi tab separated values (ftsv) form and return it.
|
||||
|
||||
@param fd: An open file descriptor.
|
||||
@return: A Dataset, CategoryDataset or GraphDataset depending on the information
|
||||
|
||||
@@ -6,8 +6,8 @@ import os
|
||||
import gobject
|
||||
import logger, project, workflow
|
||||
|
||||
DATADIR = os.path.dirname(sys.modules['fluents'].__file__)
|
||||
GLADEFILENAME = os.path.join(DATADIR, 'fluents.glade')
|
||||
DATADIR = os.path.dirname(sys.modules['laydi'].__file__)
|
||||
GLADEFILENAME = os.path.join(DATADIR, 'laydi.glade')
|
||||
|
||||
class CreateProjectDruid(gtk.Window):
|
||||
"""A druid for creating a new project.
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="index1">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Open the fluents documentation.</property>
|
||||
<property name="tooltip" translatable="yes">Open the laydi documentation.</property>
|
||||
<property name="label" translatable="yes">_Index</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_index1_activate" last_modification_time="Thu, 27 Apr 2006 09:21:48 GMT"/>
|
||||
@@ -899,13 +899,13 @@ The functions of the workflow you select will be available on the right part of
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="destroy_with_parent">True</property>
|
||||
<property name="name" translatable="yes">Fluents</property>
|
||||
<property name="copyright" translatable="yes">Copyright (C) 2006 the Fluents Team
|
||||
<property name="name" translatable="yes">Laydi</property>
|
||||
<property name="copyright" translatable="yes">Copyright (C) 2006 the Laydi Team
|
||||
Released under the GNU General Public Licence
|
||||
</property>
|
||||
<property name="comments" translatable="yes">From WordNet (r) 2.0 [wn]: fluent (adj)
|
||||
<property name="comments" translatable="yes">From WordNet (r) 2.0 [wn]: laydi (adj)
|
||||
|
||||
1: easy and graceful in shape; "a yacht with long, fluent curves"
|
||||
1: easy and graceful in shape; "a yacht with long, laydi curves"
|
||||
|
||||
2: smooth and unconstrained in movement; "a long, smooth stride"; "the fluid motion of a cat"; "the liquid grace of a ballerina"; "liquid prose" [syn:{flowing}, {fluid}, {liquid}, {smooth}]
|
||||
|
||||
@@ -913,9 +913,9 @@ Released under the GNU General Public Licence
|
||||
|
||||
|
||||
|
||||
From the Fluents team: fluents (sw)
|
||||
From the Laydi team: laydi (sw)
|
||||
|
||||
1: fluent software for lightweight data analysis.</property>
|
||||
1: laydi software for lightweight data analysis.</property>
|
||||
<property name="license" translatable="yes">GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
|
||||
@@ -1212,8 +1212,8 @@ NO WARRANTY
|
||||
END OF TERMS AND CONDITIONS
|
||||
</property>
|
||||
<property name="wrap_license">False</property>
|
||||
<property name="website">https://dev.pvv.ntnu.no/projects/fluent</property>
|
||||
<property name="website_label" translatable="yes">The Fluent project website</property>
|
||||
<property name="website">https://dev.pvv.ntnu.no/projects/laydi</property>
|
||||
<property name="website_label" translatable="yes">The Laydi project website</property>
|
||||
<property name="authors">Arnar Flatberg
|
||||
Einar Ryeng
|
||||
Truls A. Tangstad</property>
|
||||
|
||||
@@ -19,10 +19,10 @@ from logger import logger, LogView
|
||||
|
||||
PROGRAM_NAME = 'laydi'
|
||||
VERSION = '0.1.0'
|
||||
DATADIR = os.path.join(main.PYDIR, 'fluents')
|
||||
DATADIR = os.path.join(main.PYDIR, 'laydi')
|
||||
#ICONDIR = os.path.join(DATADIR,"..","icons")
|
||||
ICONDIR = main.ICONDIR
|
||||
GLADEFILENAME = os.path.join(main.PYDIR, 'fluents/fluents.glade')
|
||||
GLADEFILENAME = os.path.join(main.PYDIR, 'laydi/laydi.glade')
|
||||
_icon_mapper = {dataset.Dataset: 'dataset',
|
||||
dataset.CategoryDataset: 'category_dataset',
|
||||
dataset.GraphDataset: 'graph_dataset',
|
||||
@@ -157,7 +157,7 @@ class ViewFrameToolButton (gtk.ToolItem):
|
||||
main.application['main_view'].resize_table(width, height)
|
||||
|
||||
|
||||
class FluentApp:
|
||||
class LaydiApp:
|
||||
|
||||
def __init__(self): # Application variables
|
||||
# self.project = None
|
||||
@@ -347,10 +347,10 @@ class FluentApp:
|
||||
about.run()
|
||||
|
||||
def on_help_index(self, *ignored):
|
||||
gnome.help_display_uri('https://dev.pvv.org/projects/fluents/wiki/help')
|
||||
gnome.help_display_uri('https://dev.pvv.org/projects/laydi/wiki/help')
|
||||
|
||||
def on_help_report_bug(self, *ignored):
|
||||
gnome.help_display_uri('https://dev.pvv.org/projects/fluents/newticket')
|
||||
gnome.help_display_uri('https://dev.pvv.org/projects/laydi/newticket')
|
||||
|
||||
def on_workflow_refresh_clicked(self, *ignored):
|
||||
try:
|
||||
|
||||
@@ -5,10 +5,10 @@ import copy
|
||||
import pygtk
|
||||
import gtk
|
||||
import gtk.glade
|
||||
from fluents import fluents
|
||||
from fluents.workflow import Function, OptionsDialog, Options
|
||||
from fluents.dataset import Dataset
|
||||
from fluents import plots, dataset, workflow, logger
|
||||
from laydi import laydi
|
||||
from laydi.workflow import Function, OptionsDialog, Options
|
||||
from laydi.dataset import Dataset
|
||||
from laydi import plots, dataset, workflow, logger
|
||||
import scipy
|
||||
from engines import pca, pls, nipals_lpls
|
||||
from cx_stats import leverage, variances, hotelling
|
||||
@@ -763,7 +763,7 @@ class PcaOptionsDialog(OptionsDialog):
|
||||
"""
|
||||
def __init__(self, data, options, input_names=['X']):
|
||||
OptionsDialog.__init__(self, data, options, input_names)
|
||||
glade_file = os.path.join(fluents.DATADIR, 'pca_options.glade')
|
||||
glade_file = os.path.join(laydi.DATADIR, 'pca_options.glade')
|
||||
|
||||
notebook_name = "vbox1"
|
||||
page_name = "Options"
|
||||
@@ -975,7 +975,7 @@ class LplsOptionsDialog(OptionsDialog):
|
||||
"""
|
||||
def __init__(self, data, options, input_names=['X', 'Y', 'Z']):
|
||||
OptionsDialog.__init__(self, data, options, input_names)
|
||||
glade_file = os.path.join(fluents.DATADIR, 'lpls_options.glade')
|
||||
glade_file = os.path.join(laydi.DATADIR, 'lpls_options.glade')
|
||||
|
||||
notebook_name = "vbox1"
|
||||
page_name = "Options"
|
||||
@@ -1179,7 +1179,7 @@ class PlsOptionsDialog(OptionsDialog):
|
||||
"""
|
||||
def __init__(self, data, options, input_names=['X', 'Y']):
|
||||
OptionsDialog.__init__(self, data, options, input_names)
|
||||
glade_file = os.path.join(fluents.DATADIR, 'pls_options.glade')
|
||||
glade_file = os.path.join(laydi.DATADIR, 'pls_options.glade')
|
||||
|
||||
notebook_name = "vbox1"
|
||||
page_name = "Options"
|
||||
|
||||
@@ -7,8 +7,8 @@ fixme:
|
||||
|
||||
from matplotlib import cm,patches
|
||||
import gtk
|
||||
import fluents
|
||||
from fluents import plots, main,logger
|
||||
import laydi
|
||||
from laydi import plots, main,logger
|
||||
import scipy
|
||||
from scipy import dot,sum,diag,arange,log,mean,newaxis,sqrt,apply_along_axis,empty
|
||||
from scipy.stats import corrcoef
|
||||
|
||||
@@ -2,7 +2,7 @@ import gtk
|
||||
import gobject
|
||||
import plots
|
||||
import time
|
||||
import fluents
|
||||
import laydi
|
||||
from logger import logger
|
||||
import dataset, plots, project, workflow, main
|
||||
import scipy
|
||||
@@ -278,11 +278,11 @@ class NavigatorMenu(gtk.Menu):
|
||||
ds = dataset.read_ftsv(filename)
|
||||
|
||||
if isinstance(ds, dataset.GraphDataset):
|
||||
icon = fluents.icon_factory.get("graph_dataset")
|
||||
icon = laydi.icon_factory.get("graph_dataset")
|
||||
elif isinstance(ds, dataset.CategoryDataset):
|
||||
icon = fluents.icon_factory.get("category_dataset")
|
||||
icon = laydi.icon_factory.get("category_dataset")
|
||||
else:
|
||||
icon = fluents.icon_factory.get("dataset")
|
||||
icon = laydi.icon_factory.get("dataset")
|
||||
|
||||
main.project.add_dataset(ds)
|
||||
main.project.data_tree_insert(None, ds.get_name(), ds, None, "black", icon)
|
||||
@@ -333,7 +333,7 @@ class NavigatorMenu(gtk.Menu):
|
||||
|
||||
def on_plot_image(self, item, navigator):
|
||||
plot = plots.ImagePlot(self.dataset, name='Image Plot')
|
||||
icon = fluents.icon_factory.get("line_plot")
|
||||
icon = laydi.icon_factory.get("line_plot")
|
||||
main.project.data_tree_insert(self.tree_iter, 'Image Plot', plot, None, "black", icon)
|
||||
# fixme: image plot selections are not well defined
|
||||
#plot.set_selection_listener(project.set_selection)
|
||||
@@ -342,7 +342,7 @@ class NavigatorMenu(gtk.Menu):
|
||||
def on_plot_hist(self, item, navigator):
|
||||
project = main.project
|
||||
plot = plots.HistogramPlot(self.dataset, name='Histogram')
|
||||
icon = fluents.icon_factory.get("line_plot")
|
||||
icon = laydi.icon_factory.get("line_plot")
|
||||
project.data_tree_insert(self.tree_iter, 'Histogram', plot, None, "black", icon)
|
||||
plot.set_selection_listener(project.set_selection)
|
||||
project._selection_observers.append(plot)
|
||||
@@ -369,7 +369,7 @@ class NavigatorMenu(gtk.Menu):
|
||||
ids_major[0], ids_major[1],
|
||||
name='Scatter (%s)' % ds_major.get_name())
|
||||
plot.add_axes_spin_buttons(len(ids_major), 0, 1)
|
||||
icon = fluents.icon_factory.get("line_plot")
|
||||
icon = laydi.icon_factory.get("line_plot")
|
||||
project.data_tree_insert(self.tree_iter, 'Scatter', plot, None, "black", icon)
|
||||
plot.set_selection_listener(project.set_selection)
|
||||
project._selection_observers.append(plot)
|
||||
@@ -380,7 +380,7 @@ class NavigatorMenu(gtk.Menu):
|
||||
dims = ds.get_dim_name()
|
||||
ids = ds.get_identifiers(dims[1])
|
||||
plot = plots.LineViewPlot(ds, name='Line (%s)' % ds.get_name())
|
||||
icon = fluents.icon_factory.get("line_plot")
|
||||
icon = laydi.icon_factory.get("line_plot")
|
||||
project.data_tree_insert(self.tree_iter, 'Line view', plot, None, "black", icon)
|
||||
plot.set_selection_listener(project.set_selection)
|
||||
project._selection_observers.append(plot)
|
||||
@@ -389,7 +389,7 @@ class NavigatorMenu(gtk.Menu):
|
||||
project = main.project
|
||||
ds = self.dataset.transpose()
|
||||
ds._name = ds._name + ".T"
|
||||
icon = fluents.icon_factory.get(ds)
|
||||
icon = laydi.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):
|
||||
@@ -398,7 +398,7 @@ class NavigatorMenu(gtk.Menu):
|
||||
ds._name = self.dataset._name + ".rsc"
|
||||
axis = 1
|
||||
ds._array = ds.asarray()/scipy.expand_dims(ds.asarray().std(axis), axis)
|
||||
icon = fluents.icon_factory.get(ds)
|
||||
icon = laydi.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):
|
||||
@@ -407,7 +407,7 @@ class NavigatorMenu(gtk.Menu):
|
||||
ds._name = self.dataset._name + ".csc"
|
||||
axis = 0
|
||||
ds._array = ds.asarray()/scipy.expand_dims(ds.asarray().std(axis), axis)
|
||||
icon = fluents.icon_factory.get(ds)
|
||||
icon = laydi.icon_factory.get(ds)
|
||||
project.data_tree_insert(self.tree_iter, ds.get_name(), ds, None, "black", icon)
|
||||
|
||||
def on_log(self, item, navigator):
|
||||
@@ -421,7 +421,7 @@ class NavigatorMenu(gtk.Menu):
|
||||
|
||||
ds = self.dataset.copy()
|
||||
ds._array = scipy.log(ds.asarray())
|
||||
icon = fluents.icon_factory.get(ds)
|
||||
icon = laydi.icon_factory.get(ds)
|
||||
ds._name = ds._name + ".log"
|
||||
project.data_tree_insert(self.tree_iter, ds.get_name(), ds, None, "black", icon)
|
||||
|
||||
@@ -439,6 +439,6 @@ class NavigatorMenu(gtk.Menu):
|
||||
unsel_ids = set(self.dataset.get_identifiers(dim)) - set(sel_ids)
|
||||
unsel_ds = self.dataset.subdata(dim, unsel_ids)
|
||||
|
||||
icon = fluents.icon_factory.get(self.dataset)
|
||||
icon = laydi.icon_factory.get(self.dataset)
|
||||
project.data_tree_insert(self.tree_iter, 'Selected', sel_ds, None, "black", icon)
|
||||
project.data_tree_insert(self.tree_iter, 'Unselected', unsel_ds, None, "black", icon)
|
||||
|
||||
@@ -15,7 +15,7 @@ import networkx
|
||||
import scipy
|
||||
from numpy import matlib
|
||||
|
||||
import fluents
|
||||
import laydi
|
||||
import logger
|
||||
import view
|
||||
|
||||
@@ -513,11 +513,11 @@ class ScatterPlot(Plot):
|
||||
def is_mappable_with(self, obj):
|
||||
"""Returns True if dataset/selection is mappable with this plot.
|
||||
"""
|
||||
if isinstance(obj, fluents.dataset.Dataset):
|
||||
if isinstance(obj, laydi.dataset.Dataset):
|
||||
if self.current_dim in obj.get_dim_name():
|
||||
return True
|
||||
|
||||
elif isinstance(obj, fluents.dataset.Selection):
|
||||
elif isinstance(obj, laydi.dataset.Selection):
|
||||
if self.current_dim in obj.get_dim_name():
|
||||
return True
|
||||
|
||||
@@ -537,7 +537,7 @@ class ScatterPlot(Plot):
|
||||
# is dataset a vector or matrix?
|
||||
if not n==1:
|
||||
# we have a category dataset
|
||||
if isinstance(data, fluents.dataset.CategoryDataset):
|
||||
if isinstance(data, laydi.dataset.CategoryDataset):
|
||||
vec = scipy.dot(array, scipy.diag(scipy.arange(n))).sum(1)
|
||||
else:
|
||||
vec = array.sum(1)
|
||||
|
||||
@@ -2,7 +2,7 @@ import os
|
||||
import scipy
|
||||
import gobject
|
||||
import gtk
|
||||
import fluents
|
||||
import laydi
|
||||
import logger, dataset, plots, main
|
||||
|
||||
class Project:
|
||||
@@ -83,7 +83,7 @@ class Project:
|
||||
parent_iter = None
|
||||
|
||||
# Add the function node to the tree
|
||||
icon = fluents.icon_factory.get("folder_grey")
|
||||
icon = laydi.icon_factory.get("folder_grey")
|
||||
it = self.data_tree_insert(parent_iter, fun, None, None, "black", icon)
|
||||
|
||||
# Add all returned datasets/plots/selections
|
||||
@@ -91,18 +91,18 @@ class Project:
|
||||
# Any kind of dataset
|
||||
if isinstance(d, dataset.Dataset):
|
||||
if isinstance(d, dataset.GraphDataset):
|
||||
icon = fluents.icon_factory.get("graph_dataset")
|
||||
icon = laydi.icon_factory.get("graph_dataset")
|
||||
elif isinstance(d, dataset.CategoryDataset):
|
||||
icon = fluents.icon_factory.get("category_dataset")
|
||||
icon = laydi.icon_factory.get("category_dataset")
|
||||
else:
|
||||
icon = fluents.icon_factory.get("dataset")
|
||||
icon = laydi.icon_factory.get("dataset")
|
||||
|
||||
self.add_dataset(d)
|
||||
self.data_tree_insert(it, d.get_name(), d, None, "black", icon)
|
||||
|
||||
# Any kind of plot
|
||||
elif isinstance(d, plots.Plot):
|
||||
icon = fluents.icon_factory.get("line_plot")
|
||||
icon = laydi.icon_factory.get("line_plot")
|
||||
self.data_tree_insert(it, d.get_title(), d, None, "black", icon)
|
||||
d.set_selection_listener(self.set_selection)
|
||||
self._selection_observers.append(d)
|
||||
|
||||
@@ -5,7 +5,7 @@ import gtk
|
||||
from matplotlib.patches import Polygon,Rectangle
|
||||
from matplotlib.lines import Line2D
|
||||
|
||||
import fluents
|
||||
import laydi
|
||||
import logger
|
||||
|
||||
|
||||
@@ -212,12 +212,12 @@ class ViewFrame (gtk.Frame):
|
||||
self.set_view(obj)
|
||||
self.focus()
|
||||
|
||||
elif isinstance(obj, fluents.dataset.Dataset):
|
||||
elif isinstance(obj, laydi.dataset.Dataset):
|
||||
view = self.get_view()
|
||||
if view != None and view.is_mappable_with(obj):
|
||||
view._update_color_from_dataset(obj)
|
||||
|
||||
elif isinstance(obj, fluents.dataset.Selection):
|
||||
elif isinstance(obj, laydi.dataset.Selection):
|
||||
view = self.get_view()
|
||||
if view.is_mappable_with(obj):
|
||||
view.selection_changed(self.current_dim, obj)
|
||||
@@ -225,7 +225,7 @@ class ViewFrame (gtk.Frame):
|
||||
|
||||
|
||||
class MainView (gtk.Notebook):
|
||||
"""The MainView class displays the Views in Fluents.
|
||||
"""The MainView class displays the Views in Laydi.
|
||||
|
||||
MainView, of which there is normally only one instance, contains a
|
||||
gtk.Table that holds all the visible Views, and a single ViewFrame
|
||||
@@ -416,7 +416,7 @@ class MainView (gtk.Notebook):
|
||||
|
||||
class View (gtk.Frame):
|
||||
"""The base class of everything that is shown in the center view of
|
||||
fluents.
|
||||
laydi.
|
||||
|
||||
Most views should rather subclass Plot, which automatically handles
|
||||
freezing, creates a toolbar, and sets up matplotlib Figure and Canvas
|
||||
@@ -467,7 +467,7 @@ class PlotMode:
|
||||
def get_icon(self):
|
||||
"""Returns the icon for the PlotMode"""
|
||||
image = gtk.Image()
|
||||
image.set_from_pixbuf(fluents.icon_factory.get(self.image_file))
|
||||
image.set_from_pixbuf(laydi.icon_factory.get(self.image_file))
|
||||
return image
|
||||
|
||||
def activate(self):
|
||||
@@ -764,7 +764,7 @@ class PlotToolbar(gtk.Toolbar):
|
||||
btn = gtk.ToggleToolButton()
|
||||
|
||||
image = gtk.Image()
|
||||
image.set_from_pixbuf(fluents.icon_factory.get('freeze'))
|
||||
image.set_from_pixbuf(laydi.icon_factory.get('freeze'))
|
||||
|
||||
btn.set_icon_widget(image)
|
||||
btn.connect('toggled', self._on_freeze_toggle)
|
||||
@@ -850,7 +850,7 @@ class PlotToolbar(gtk.Toolbar):
|
||||
dialog = gtk.FileChooserDialog('Save plot')
|
||||
dialog.set_action(gtk.FILE_CHOOSER_ACTION_SAVE)
|
||||
dialog.add_buttons(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_SAVE, gtk.RESPONSE_OK)
|
||||
default_name = "fluents_image"
|
||||
default_name = "laydi_image"
|
||||
dialog.set_current_name("%s.png" % default_name)
|
||||
retval = dialog.run()
|
||||
if retval in [gtk.RESPONSE_CANCEL, gtk.RESPONSE_DELETE_EVENT]:
|
||||
|
||||
@@ -3,7 +3,7 @@ import sys
|
||||
import os
|
||||
import inspect
|
||||
import logger
|
||||
import fluents
|
||||
import laydi
|
||||
import main
|
||||
|
||||
def _workflow_classes(dir, modname):
|
||||
@@ -272,12 +272,12 @@ class OptionsDialog(gtk.Dialog):
|
||||
plot_treeview = gtk.TreeView(plot_list)
|
||||
|
||||
# Add plots
|
||||
plot_icon = fluents.icon_factory.get('line_plot')
|
||||
plot_icon = laydi.icon_factory.get('line_plot')
|
||||
for plt, name, use in self._options['all_plots']:
|
||||
plot_list.append((name, use, plot_icon))
|
||||
|
||||
# Renderer for icon
|
||||
plot_icon = fluents.icon_factory.get('line_plot')
|
||||
plot_icon = laydi.icon_factory.get('line_plot')
|
||||
icon_renderer = gtk.CellRendererPixbuf()
|
||||
icon_renderer.set_property('pixbuf', plot_icon)
|
||||
|
||||
@@ -302,7 +302,7 @@ class OptionsDialog(gtk.Dialog):
|
||||
dataset_treeview = gtk.TreeView(dataset_list)
|
||||
|
||||
# Add datasets
|
||||
data_icon = fluents.icon_factory.get('dataset')
|
||||
data_icon = laydi.icon_factory.get('dataset')
|
||||
for dat, name, use in self._options['all_data']:
|
||||
dataset_list.append((name, use, data_icon))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user