diff --git a/Makefile.m4 b/Makefile.m4 index b2b9f04..76c013a 100644 --- a/Makefile.m4 +++ b/Makefile.m4 @@ -10,12 +10,12 @@ install: install_laydi install_doc install_laydi: ## Install binary files - install -m 755 -D bin/fluents ${BIN_DIR}/fluents + install -m 755 -D bin/laydi ${BIN_DIR}/laydi install -m 755 -D bin/dataset ${BIN_DIR}/dataset ## Install library files - find fluents/ -type f -name '*.py' -exec install -m 644 -D {} ${PY_DIR}/{} \; - find fluents/ -type f -name '*.glade' -exec install -m 644 -D {} ${PY_DIR}/{} \; + find laydi/ -type f -name '*.py' -exec install -m 644 -D {} ${PY_DIR}/{} \; + find laydi/ -type f -name '*.glade' -exec install -m 644 -D {} ${PY_DIR}/{} \; ## Install icons find icons/ -type f -name '*.png' -exec install -m 644 -D {} ${DATA_DIR}/{} \; diff --git a/README b/README index ddaf0ac..a96c65a 100644 --- a/README +++ b/README @@ -1,8 +1,8 @@ -Fluents Data Analysis Software +Laydi Data Analysis Software LICENSE ------- -Fluents is relased under the terms of the GNU GPL, included in the LICENSE file +Laydi is relased under the terms of the GNU GPL, included in the LICENSE file in this directory. DOCUMENTATION @@ -12,18 +12,18 @@ keyboard shortcut is listed on the wiki but it does not work in the program, the program is right, and the wiki is wrong. That said, the next best place to look for documentation is the project wiki, -located at https://dev.pvv.ntnu.no/projects/fluents/help +located at https://dev.pvv.ntnu.no/projects/laydi/help Class documentation is in HTML form in the doc/ directory. BUILDING -------- -Fluents is a python program, and as such, python will build compiled versions +Laydi is a python program, and as such, python will build compiled versions of each .py file as it loads them. You do not need to explicitly compile the program. TODO ---- The current TODO list can be found on -https://dev.pvv.ntnu.no/projects/fluents/report/1 +https://dev.pvv.ntnu.no/projects/laydi/report/1 diff --git a/bin/dataset b/bin/dataset index 5c7bb83..ef4f89f 100755 --- a/bin/dataset +++ b/bin/dataset @@ -1,7 +1,7 @@ #!/usr/bin/python import os,sys -from fluents import dataset +from laydi import dataset import cfgparse, optparse import re @@ -61,8 +61,8 @@ def list_dimension_ids(input, dimname): print id def parse_options(): - conf_files = ['/etc/fluentsrc', - os.path.join(os.environ['HOME'], '.fluents')] + conf_files = ['/etc/laydirc', + os.path.join(os.environ['HOME'], '.laydi')] cp = cfgparse.ConfigParser() op = optparse.OptionParser() diff --git a/bin/laydi b/bin/laydi index 137bc8c..ee35c7b 100755 --- a/bin/laydi +++ b/bin/laydi @@ -3,16 +3,16 @@ from getopt import getopt import os import sys -from fluents import fluents, project, workflow, main +from laydi import laydi, project, workflow, main #import workflows -from fluents import cfgparse +from laydi import cfgparse import optparse PROGRAM_NAME = 'laydi' VERSION = '0.1.0' def list_workflows(): - print 'fluents %s' % VERSION + print 'laydi %s' % VERSION print print 'Available workflows:' @@ -22,8 +22,8 @@ def list_workflows(): print def parse_options(): - conf_files = ['/etc/fluentsrc', - os.path.join(os.environ['HOME'], '.fluents')] + conf_files = ['/etc/laydirc', + os.path.join(os.environ['HOME'], '.laydi')] cp = cfgparse.ConfigParser() @@ -81,7 +81,7 @@ if __name__ == '__main__': main.set_workflow(selected_wf()) main.set_options(options) - app = fluents.FluentApp() + app = laydi.LaydiApp() main.set_application(app) main.set_project(project.Project()) diff --git a/bin/mat2ftsv b/bin/mat2ftsv index 3f9933e..9aa3512 100755 --- a/bin/mat2ftsv +++ b/bin/mat2ftsv @@ -4,7 +4,7 @@ import sys from getopt import getopt def show_help(): - print "mat2ftsv - Matlab matrix to fluents dataset converter." + print "mat2ftsv - Matlab matrix to laydi dataset converter." print print "Usage: mat2ftsv [ ...]" print @@ -26,7 +26,7 @@ if len(params) == 0: from scipy import io from numpy import ndarray -from fluents import dataset +from laydi import dataset fn_in = params[0] data = io.loadmat(fn_in) diff --git a/configure b/configure index dc346bd..9bedebf 100755 --- a/configure +++ b/configure @@ -34,5 +34,5 @@ m4 -D M4_PREFIX=$ROOT/$PREFIX -D M4_BINDIR=$ROOT/$BINDIR \ m4 -D M4_PREFIX=$PREFIX -D M4_BINDIR=$BINDIR \ -D M4_DATADIR=$DATADIR -D M4_DOCDIR=$DOCDIR \ - -D M4_PYDIR=$PYDIR fluents/paths.py.m4 > fluents/paths.py + -D M4_PYDIR=$PYDIR laydi/paths.py.m4 > laydi/paths.py diff --git a/debian/changelog b/debian/changelog index 53ecc4d..ceb9d32 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -fluents (0.1.0) unstable; urgency=low +laydi (0.1.0) unstable; urgency=low * Initial packaging diff --git a/debian/control b/debian/control index f318051..7269bf5 100644 --- a/debian/control +++ b/debian/control @@ -1,22 +1,22 @@ -Source: fluents +Source: laydi Section: science Priority: optional Maintainer: Einar Ryeng Build-Depends: debhelper (>= 5.0.37.2), python-dateutil, python-all-dev (>= 2.3.5-7), python-central (>= 0.5), python-numpy-dev (>= 1:1.0b5), python-epydoc, python-setuptools (>=0.6b3-1) Standards-Version: 3.7.2 -Package: fluents +Package: laydi Architecture: any Depends: ${python:Depends}, python-numpy (>= 1:1.0.1), python-dev Provides: ${python:Provides} Description: Python library of bilinear modeling algorithms. Bilinear modeling algorithms. -Package: fluents-doc +Package: laydi-doc Architecture: all -Enhances: fluents -Description: Fluents API documentation. +Enhances: laydi +Description: Laydi API documentation. Bilinear modeling algorithms. . - This package contains documentation for Fluents + This package contains documentation for Laydi diff --git a/debian/copyright b/debian/copyright index f420e42..034638a 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,7 +1,7 @@ This package was debianized by Einar Ryeng on 2007-09-11. -It was downloaded from https://dev.pvv.org/projects/fluents/downloads +It was downloaded from https://dev.pvv.org/projects/laydi/downloads Upstream Author: Arnar Flatberg diff --git a/debian/rules b/debian/rules index db76a7b..4be0166 100755 --- a/debian/rules +++ b/debian/rules @@ -36,9 +36,9 @@ install-python%: dh_testroot dh_clean -k dh_installdirs - ./configure --root ${CURDIR}/debian/fluents/ --prefix /usr + ./configure --root ${CURDIR}/debian/laydi/ --prefix /usr make install -# python$* setup.py install --root=$(CURDIR)/debian/fluents --install-data=/usr/share/fluents +# python$* setup.py install --root=$(CURDIR)/debian/laydi --install-data=/usr/share/laydi # Remove all *.pyc files, created in the postinst # find $(CURDIR)/debian/python-networkx -name "*.pyc" -exec rm {} ';' @@ -47,8 +47,8 @@ install-python%: # Build architecture-independent files here. binary-indep: build install make -C doc install -# mkdir -p $(CURDIR)/debian/fluents-doc/usr/share/doc/fluents-doc/html -# epydoc --html -o $(CURDIR)/debian/fluents-doc/usr/share/doc/fluents-doc/html fluents +# mkdir -p $(CURDIR)/debian/laydi-doc/usr/share/doc/laydi-doc/html +# epydoc --html -o $(CURDIR)/debian/laydi-doc/usr/share/doc/laydi-doc/html laydi # Build architecture-dependent files here. binary-arch: build install diff --git a/doc/Makefile.m4 b/doc/Makefile.m4 index 6946e8d..b571dc7 100644 --- a/doc/Makefile.m4 +++ b/doc/Makefile.m4 @@ -8,7 +8,7 @@ html: @echo Generating epydoc html code documentation. @echo See epydoc-html.log for epydoc log. @echo ---------------- - epydoc --html --inheritance listed -o html/ ../fluents 2> epydoc-html.log + epydoc --html --inheritance listed -o html/ ../laydi 2> epydoc-html.log install: find html/ -type f -exec install -m 644 -D '{}' ${DOC_DIR}/'{}' \; diff --git a/icons/category_dataset.svg b/icons/category_dataset.svg index 67e5f50..ab48f52 100644 --- a/icons/category_dataset.svg +++ b/icons/category_dataset.svg @@ -14,9 +14,9 @@ id="svg8468" sodipodi:version="0.32" inkscape:version="0.43" - sodipodi:docbase="/home/flatberg/fluent/icons" + sodipodi:docbase="/home/flatberg/laydi/icons" sodipodi:docname="category_dataset.svg" - inkscape:export-filename="/home/flatberg/fluent/icons/category_dataset.png" + inkscape:export-filename="/home/flatberg/laydi/icons/category_dataset.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90"> diff --git a/icons/table_size.svg b/icons/table_size.svg index 80b3f3f..232c891 100644 --- a/icons/table_size.svg +++ b/icons/table_size.svg @@ -14,7 +14,7 @@ id="svg2" sodipodi:version="0.32" inkscape:version="0.43" - sodipodi:docbase="/home/einarr/src/fluents/icons" + sodipodi:docbase="/home/einarr/src/laydi/icons" sodipodi:docname="table_size.svg"> @@ -250,7 +250,7 @@ height="517.14288" x="125.71429" y="235.21933" - inkscape:export-filename="/home/einarr/src/fluents/icons/rect2233.png" + inkscape:export-filename="/home/einarr/src/laydi/icons/rect2233.png" inkscape:export-xdpi="3.4739451" inkscape:export-ydpi="3.4739451" /> True - Open the fluents documentation. + Open the laydi documentation. _Index True @@ -899,13 +899,13 @@ The functions of the workflow you select will be available on the right part of 5 True True - Fluents - Copyright (C) 2006 the Fluents Team + Laydi + Copyright (C) 2006 the Laydi Team Released under the GNU General Public Licence - From WordNet (r) 2.0 [wn]: fluent (adj) + 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. +1: laydi software for lightweight data analysis. GNU GENERAL PUBLIC LICENSE @@ -1212,8 +1212,8 @@ NO WARRANTY END OF TERMS AND CONDITIONS False - https://dev.pvv.ntnu.no/projects/fluent - The Fluent project website + https://dev.pvv.ntnu.no/projects/laydi + The Laydi project website Arnar Flatberg Einar Ryeng Truls A. Tangstad diff --git a/laydi/laydi.py b/laydi/laydi.py index 9de319c..42610b6 100644 --- a/laydi/laydi.py +++ b/laydi/laydi.py @@ -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: diff --git a/laydi/lib/blmfuncs.py b/laydi/lib/blmfuncs.py index 49188d0..7795469 100644 --- a/laydi/lib/blmfuncs.py +++ b/laydi/lib/blmfuncs.py @@ -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" diff --git a/laydi/lib/blmplots.py b/laydi/lib/blmplots.py index 7a7e5ce..3403ece 100644 --- a/laydi/lib/blmplots.py +++ b/laydi/lib/blmplots.py @@ -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 diff --git a/laydi/navigator.py b/laydi/navigator.py index a754e84..f0235be 100644 --- a/laydi/navigator.py +++ b/laydi/navigator.py @@ -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) diff --git a/laydi/plots.py b/laydi/plots.py index 29bcbfe..1c9b09f 100644 --- a/laydi/plots.py +++ b/laydi/plots.py @@ -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) diff --git a/laydi/project.py b/laydi/project.py index 56c8161..e21a416 100644 --- a/laydi/project.py +++ b/laydi/project.py @@ -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) diff --git a/laydi/view.py b/laydi/view.py index 2b83062..0f27663 100644 --- a/laydi/view.py +++ b/laydi/view.py @@ -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]: diff --git a/laydi/workflow.py b/laydi/workflow.py index 6777fcb..374b731 100644 --- a/laydi/workflow.py +++ b/laydi/workflow.py @@ -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)) diff --git a/run-laydi b/run-laydi index ad4e0db..c8a0c19 100755 --- a/run-laydi +++ b/run-laydi @@ -1,8 +1,8 @@ #!/bin/sh -## To be able to run fluents without installing it, we have to set +## To be able to run laydi without installing it, we have to set ## PYTHONPATH. export PYTHONPATH=$PYTHONPATH:.:./workflows -./bin/fluents $@ +./bin/laydi $@ diff --git a/scripts/README b/scripts/README index c5a5c1c..b2aca93 100644 --- a/scripts/README +++ b/scripts/README @@ -1,6 +1,6 @@ This directory and its subdirectories are intended for small scripts that are -not considered parts of fluents proper. They are included because they do +not considered parts of laydi proper. They are included because they do useful tings in preprocessing data, often for a specific use (e.g. microarray analysis with gene ontology background information). diff --git a/scripts/geneontology/entrez-go-mapping b/scripts/geneontology/entrez-go-mapping index 2d2fe41..0a01dc7 100755 --- a/scripts/geneontology/entrez-go-mapping +++ b/scripts/geneontology/entrez-go-mapping @@ -52,7 +52,7 @@ def parse_options(): help="Output annotations in the cellular component tree.", action="store_true", default=False) op.add_option('-d', '--output-dataset', - help="Export as ftsv (Fluents dataset) file.") + help="Export as ftsv (Laydi dataset) file.") op.add_option('-m', '--molecular-function', dest="mf", help="Output annotations in the molecular function tree.", action="store_true", default=False) diff --git a/scripts/geneontology/go-gene-matrix b/scripts/geneontology/go-gene-matrix index 2aa7a17..8878cac 100755 --- a/scripts/geneontology/go-gene-matrix +++ b/scripts/geneontology/go-gene-matrix @@ -3,7 +3,7 @@ import os, sys import getopt sys.path.append('../..') -from fluents import dataset +from laydi import dataset import numpy max_val = numpy.inf diff --git a/scripts/lpls/lpls.py b/scripts/lpls/lpls.py index 7522226..d98c95d 100644 --- a/scripts/lpls/lpls.py +++ b/scripts/lpls/lpls.py @@ -4,7 +4,7 @@ import matplotlib from scipy import * from scipy.linalg import inv,norm -sys.path.append("../../fluents/lib") +sys.path.append("../../laydi/lib") import select_generators def nipals_lpls(X, Y, Z, a_max, alpha=.7, mean_ctr=[2, 0, 1], scale='scores', verbose=True): diff --git a/scripts/lpls/run_smoker.py b/scripts/lpls/run_smoker.py index 67d4dae..412e726 100644 --- a/scripts/lpls/run_smoker.py +++ b/scripts/lpls/run_smoker.py @@ -6,9 +6,9 @@ from scipy.linalg import norm from lpls import correlation_loadings import rpy_go -sys.path.append("../../fluents") # home of dataset -sys.path.append("../../fluents/lib") # home of cx_stats -sys.path.append("/home/flatberg/fluents/scripts/lpls") +sys.path.append("../../laydi") # home of dataset +sys.path.append("../../laydi/lib") # home of cx_stats +sys.path.append("/home/flatberg/laydi/scripts/lpls") sys.path.append("/home/flatberg/pyblm/") import dataset import cx_stats diff --git a/setup.py b/setup.py index 1da9c16..2949893 100644 --- a/setup.py +++ b/setup.py @@ -21,15 +21,15 @@ Programming Language :: Python Topic :: Scientific/Engineering """ -from fluents.fluents import VERSION +from laydi.laydi import VERSION def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('', parent_package, top_path) config.add_data_dir('tests') - config.add_scripts(['bin/fluents', 'bin/dataset']) + config.add_scripts(['bin/laydi', 'bin/dataset']) config.add_data_dir('icons') - config.add_subpackage('fluents') + config.add_subpackage('laydi') return config if __name__ == "__main__": @@ -39,7 +39,7 @@ if __name__ == "__main__": config['author_email'] = 'einarr@pvv.org' # config['short_description'] = short_description config['long_description'] = long_description - config['url'] = 'https://dev.pvv.org/projects/fluents' + config['url'] = 'https://dev.pvv.org/projects/laydi' config['version'] = VERSION config['license'] = 'GPL' config['platforms'] = ['Linux'] diff --git a/test/laydi/annotationtest.py b/test/laydi/annotationtest.py index 7a438b1..b07ffcd 100644 --- a/test/laydi/annotationtest.py +++ b/test/laydi/annotationtest.py @@ -2,7 +2,7 @@ import unittest import sys sys.path.append('../../') -from fluents import annotations +from laydi import annotations class AnnotationsTest(unittest.TestCase): diff --git a/workflows/demo.py b/workflows/demo.py index 10ae818..6871dfa 100644 --- a/workflows/demo.py +++ b/workflows/demo.py @@ -6,8 +6,8 @@ import cPickle import scipy import networkx as nx -from fluents import logger,plots,workflow,dataset,main -from fluents.lib import blmfuncs,nx_utils,cx_utils +from laydi import logger,plots,workflow,dataset,main +from laydi.lib import blmfuncs,nx_utils,cx_utils import gobrowser @@ -363,7 +363,7 @@ class MapGene2GO(workflow.Function): workflow.Function.__init__(self, 'gene2go', 'gene->GO') # load data at init try: - fname = "/home/flatberg/fluents/data/gene2go.pcl" + fname = "/home/flatberg/laydi/data/gene2go.pcl" self._gene2go = cPickle.load(open(fname)) except: logger.log("notice", "could not load mapping") @@ -395,7 +395,7 @@ class MapGO2Gene(workflow.Function): workflow.Function.__init__(self, 'go2gene', 'GO->gene') # load data at init try: - fname = "/home/flatberg/fluents/data/go2gene.pcl" + fname = "/home/flatberg/laydi/data/go2gene.pcl" self._go2gene = cPickle.load(open(fname)) except: logger.log("notice", "could not load mapping") diff --git a/workflows/go_workflow.py b/workflows/go_workflow.py index 9276c16..3b2cf74 100644 --- a/workflows/go_workflow.py +++ b/workflows/go_workflow.py @@ -1,6 +1,6 @@ import gtk -from fluents import dataset, logger, plots, workflow, fluents, project -from fluents.lib import blmfuncs +from laydi import dataset, logger, plots, workflow, laydi, project +from laydi.lib import blmfuncs import geneontology #import gostat from scipy import array, randn, log, ones, zeros @@ -245,7 +245,7 @@ class LoadGOFunction(workflow.Function): browser = GeneOntologyTree(go) label = gtk.Label('_Gene Ontology') label.set_use_underline(True) - fluents.app['bottom_notebook'].append_page(browser, label) + laydi.app['bottom_notebook'].append_page(browser, label) class LoadTextDatasetFunction(workflow.Function): diff --git a/workflows/gobrowser.py b/workflows/gobrowser.py index 4530da1..6624398 100644 --- a/workflows/gobrowser.py +++ b/workflows/gobrowser.py @@ -1,6 +1,6 @@ import gtk -from fluents import dataset, logger, plots, workflow, fluents, project, view, main +from laydi import dataset, logger, plots, workflow, laydi, project, view, main import geneontology from matplotlib.nxutils import points_inside_poly import matplotlib @@ -243,7 +243,7 @@ class LoadGOFunction(workflow.Function): browser = GeneOntologyTree(go) label = gtk.Label('_Gene Ontology') label.set_use_underline(True) - fluents.app['bottom_notebook'].append_page(browser, label) + laydi.app['bottom_notebook'].append_page(browser, label) class LoadAnnotationsFunction(workflow.Function): @@ -699,7 +699,7 @@ class DagPlot(plots.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 return False @@ -718,7 +718,7 @@ class DagPlot(plots.Plot): # is dataset a vector or matrix? if not n==1: # we have a category dataset - if isinstance(ds, fluents.dataset.CategoryDataset): + if isinstance(ds, laydi.dataset.CategoryDataset): vec = dot(array, diag(arange(n))).sum(1) else: vec = array.sum(1) diff --git a/workflows/smokers.py b/workflows/smokers.py index 62c2564..c3b5ae0 100644 --- a/workflows/smokers.py +++ b/workflows/smokers.py @@ -3,8 +3,8 @@ import os.path import webbrowser import cPickle -from fluents import logger, plots,workflow,dataset,main -from fluents.lib import blmfuncs,nx_utils,validation,engines,cx_stats,cx_utils +from laydi import logger, plots,workflow,dataset,main +from laydi.lib import blmfuncs,nx_utils,validation,engines,cx_stats,cx_utils import gobrowser, geneontology import scipy import networkx as nx @@ -103,7 +103,7 @@ class DatasetLoadFunctionCYCLE(workflow.Function): workflow.Function.__init__(self, 'load_data', 'Cycle') def run(self): - filename='fluents/data/CYCLE' + filename='laydi/data/CYCLE' if filename: return dataset.from_file(filename) @@ -419,7 +419,7 @@ class MapGene2GO(workflow.Function): workflow.Function.__init__(self, 'gene2go', 'gene->GO') # load data at init try: - fname = "/home/flatberg/fluents/data/gene2go.pcl" + fname = "/home/flatberg/laydi/data/gene2go.pcl" self._gene2go = cPickle.load(open(fname)) except: logger.log("notice", "could not load mapping") @@ -451,7 +451,7 @@ class MapGO2Gene(workflow.Function): workflow.Function.__init__(self, 'go2gene', 'GO->gene') # load data at init try: - fname = "/home/flatberg/fluents/data/go2gene.pcl" + fname = "/home/flatberg/laydi/data/go2gene.pcl" self._go2gene = cPickle.load(open(fname)) except: logger.log("notice", "could not load mapping") diff --git a/workflows/test_workflow.py b/workflows/test_workflow.py index d085ba0..df99231 100644 --- a/workflows/test_workflow.py +++ b/workflows/test_workflow.py @@ -1,5 +1,5 @@ import gtk -from fluents import dataset, logger, plots, workflow +from laydi import dataset, logger, plots, workflow #import geneontology #import gostat from scipy import array, randn, log, ones