-#!/usr/bin/env python
+# Copyright
'''
FMjoin.py
Usage:
python FMjoin.py origindir destdir
-
-
-Alberto Gomez-Casado (c) 2010, University of Twente (The Netherlands)
-This program is released under the GNU General Public License version 2.
'''
import os
+# Copyright
+
import h5py
import numpy
import os
#!/usr/bin/python
#
-# COPYRIGHT
+# Copyright
"""Auto-generate reStructuredText of the hooke module tree for Sphinx.
-# COPYRIGHT
+# Copyright
"""The hooke module does all the legwork for Hooke_.
+# Copyright
+
"""The `command` module provides :class:`Command`\s and
:class:`Argument`\s for defining commands.
--- /dev/null
+# Copyright
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
+# Copyright
-'''
-config.py
-
-Configuration defaults, read/write, and template file creation for Hooke.
-
-COPYRIGHT
-'''
+"""Configuration defaults, read/write, and template file creation for
+Hooke.
+"""
import ConfigParser as configparser
import os.path
+# Copyright
+
"""The `curve` module provides :class:`Curve` and :class:`Data` for
storing force curves.
"""
+# Copyright
+
"""The driver module provides :class:`Driver`\s for identifying and
reading data files.
-'''
-csvdriver.py
+# Copyright
-Simple driver to read general comma-separated values in Hooke
+"""Simple driver to read general comma-separated values in Hooke
Columns are read this way:
X1 , Y1 , X2 , Y2 , X3 , Y3 ...
If the number of columns is odd, the last column is ignored.
-
-(c)Massimo Sandal, 2008
-'''
+"""
from .. import curve as lhc
from .. import libhooke as lh
-#!/usr/bin/env python
+# Copyright
-'''
-hdf5.py
-
-Driver for text-exported HDF5 files from Igor pro
-
-Alberto Gomez-Casado (c) 2010
-Massimo Sandal (c) 2009
-'''
+"""Driver for text-exported HDF5 files from Igor pro
+"""
from .. import curve as lhc
from .. import libhooke as lh
-'''
-libhemingclamp.py
-
-Library for interpreting Hemingway force spectroscopy files.
+# Copyright
-Copyright (C) 2008 Massimo Sandal, Marco Brucale (University of Bologna, Italy)
-
-This program is released under the GNU General Public License version 2.
-'''
+"""Library for interpreting Hemingway force spectroscopy files.
+"""
__version__='2007_02_15_devel'
__changelog__='''
+# Copyright
+
import string
from .. import curve as lhc
-'''
-mcs.py
+# Copyright
-driver for mcs fluorescence files
-
-Massimo Sandal, Allen Chen (c) 2009
-'''
+"""Driver for mcs fluorescence files
+"""
from .. import curve as lhc
from .. import libhooke as lh
-'''
-mfp1dexport.py
+# Copyright
-Driver for text-exported MFP 1D files
-
-Massimo Sandal (c) 2009
-'''
+"""Driver for text-exported MFP 1D files
+"""
import os
-#!/usr/bin/env python
+# Copyright
-'''
-mfp3d.py
+"""Driver for MFP-3D files.
-Driver for MFP-3D files.
+This driver reads Igor binary waves.
-Copyright 2010 by Dr. Rolf Schmidt (Concordia University, Canada)
-This driver is based on the work of R. Naud and A. Seeholzer (see below)
-to read Igor binary waves. Code used with permission.
-
-Modified for usage with Hooke CLI by Alberto Gomez-Casado (University of Twente, The Netherlands)
-
-This program is released under the GNU General Public License version 2.
-'''
+AUTHORS:
+Matlab version: Richard Naud August 2008 (http://lcn.epfl.ch/~naud/)
+Python port: A. Seeholzer October 2008
+Hooke submission: Rolf Schmidt, Alberto Gomez-Casado 2009
+"""
# DEFINITION:
# Reads Igor's (Wavemetric) binary wave format, .ibw, files.
# http://mirror.optus.net.au/pub/wavemetrics/IgorPro/Technical_Notes/) and data
# type 2 or 4 (non complex, single or double precision vector, real values).
#
-# AUTHORS:
-# Matlab version: R. Naud August 2008 (http://lcn.epfl.ch/~naud/Home.html)
-# Python port: A. Seeholzer October 2008
-#
# VERSION: 0.1
#
# COMMENTS:
-'''
-libpicoforce.py
+# Copyright
-Library for interpreting Picoforce force spectroscopy files.
-
-Copyright (C) 2006 Massimo Sandal (University of Bologna, Italy).
-
-This program is released under the GNU General Public License version 2.
-'''
+"""Library for interpreting Picoforce force spectroscopy files.
+"""
import re
import struct
-'''
-libpicoforce.py
+# Copyright
-Library for interpreting Picoforce force spectroscopy files. Alternate version
+"""Library for interpreting Picoforce force spectroscopy files.
-Copyright (C) 2006 Massimo Sandal (University of Bologna, Italy).
-Copyright (C) 2008 Alberto Gomez-Casado (University of Twente, Netherlands).
-
-This program is released under the GNU General Public License version 2.
-'''
+An alternave implementation of :mod:`hooke.driver.picoforce`.
+"""
import re, struct
from scipy import arange
-# Copyright (c) 2008 Massimo Sandal
-# 2010 W. Trevor King
+# Copyright
"""Tutorial driver for Hooke.
+# Copyright
+
"""The `engine` module provides :class:`CommandEngine` for executing
:class:`hooke.command.Command`\s.
"""
+# Copyright
+
"""Define :class:`Experiment` and assorted subclasses.
This allows :class:`hooke.plugin.Plugin`\s to specify the types of
-#!/usr/bin/env python
+# Copyright
-'''
-Hooke - A force spectroscopy review & analysis tool.
-
-A free, open source data analysis platform
-
-COPYRIGHT
-'''
+"""Hooke - A force spectroscopy review & analysis tool.
+"""
import multiprocessing
import optparse
+# Copyright
+
"""The `interaction` module provides :class:`Request`,
:class:`Response`, an related classes for handling user interaction
through the
+# Copyright
+
"""The `playlist` module provides a :class:`Playlist` and its subclass
:class:`FilePlaylist` for manipulating lists of
:class:`hooke.curve.Curve`\s.
+# Copyright
+
"""The `plugin` module provides optional submodules that add new Hooke
commands.
-# -*- coding: utf-8 -*-
-# COPYRIGHT
+# Copyright
"""The autopeak module provides :class:`Autopeak`, a
:class:`hooke.plugin.Plugin` for automatically extracting force peaks
+# Copyright
+
"""The `config` module provides :class:`ConfigPlugin` and several
associated :class:`hooke.command.Command`\s for handling
:mod:`hooke.config` classes.
-# -*- coding: utf-8 -*-
+# Copyright
+
from ..libhooke import WX_GOOD, ClickedPoint
import wxversion
+# Copyright
+
"""The `cut` module provides :class:`CutPlugin` and
:class:`CutCommand`.
"""
+# Copyright
+
"""The `debug` module provides :class:`DebugPlugin` and associated
:class:`hooke.command.Command`\s which provide useful debugging
information.
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
+# Copyright
-'''
-FIT
-
-Force spectroscopy curves basic fitting plugin.
-Licensed under the GNU GPL version 2
+"""Force spectroscopy curves basic fitting plugin.
Non-standard Dependencies:
procplots.py (plot processing plugin)
-'''
+"""
+
from ..libhooke import WX_GOOD, ClickedPoint
import wxversion
-#!/usr/bin/env python
+# Copyright
-'''
-FLATFILTS
-
-Force spectroscopy curves filtering of flat curves
-Licensed under the GNU LGPL version 2
+"""Force spectroscopy curves filtering of flat curves
Other plugin dependencies:
procplots.py (plot processing plugin)
-'''
+"""
import xml.dom.minidom
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
+# Copyright
-'''
-FLATFILTS
-
-Force spectroscopy curves filtering of flat curves
-Licensed under the GNU LGPL version 2
+"""Force spectroscopy curves filtering of flat curves
Other plugin dependencies:
procplots.py (plot processing plugin)
-'''
+"""
from hooke.libhooke import WX_GOOD
-'''
-GENERALCLAMP.py
+# Copyright
+
+"""Plugin regarding general force clamp measurements
+"""
-Plugin regarding general force clamp measurements
-'''
from hooke.libhooke import WX_GOOD, ClickedPoint
import wxversion
-'''
-generaltccd.py
+# Copyright
-General utilities for TCCD stuff
-'''
+"""General utilities for TCCD stuff
+"""
class generaltccdCommands(object):
-#!/usr/bin/env python
-# -*- coding: iso-8859-1 -*-
+# Copyright
-'''
-generalvclamp.py
-
-Plugin regarding general velocity clamp measurements
-'''
+"""Plugin regarding general velocity clamp measurements
+"""
from hooke.libhooke import WX_GOOD, ClickedPoint
import wxversion
-# -*- coding: utf-8 -*-
+# Copyright
+
from ..libhooke import WX_GOOD, ClickedPoint
import wxversion
wxversion.select(WX_GOOD)
-'''
-COMMAND MACRO PLUGIN FOR HOOKE
+# Copyright
-Records, saves and executes batches of commands
-(c)Alberto Gomez-Casado 2008
-'''
+"""Records, saves and executes batches of commands
+"""
import os.path
import string
-'''
-massanalysis.py
+# Copyright
-Global analysis of force curves with various parameters
+"""Global analysis of force curves with various parameters
Requires:
libpeakspot.py
flatfilts.py
-'''
+"""
import numpy as np
import csv
-# -*- coding: utf-8 -*-
+# Copyright
+
from hooke.libhooke import WX_GOOD, ClickedPoint
import wxversion
-#!/usr/bin/env python
-
-'''
-multifit.py
-
-Alberto Gomez-Casado, (c) 2010, University of Twente (The Netherlands)
-Licensed under GNU GPL v2
-'''
+# Copyright
#FIXME clean this, probably some dependencies are not needed
+# Copyright
+
"""The `note` module provides :class:`NotePlugin` the associated
:class:`hooke.command.Command`\s for annotating several Hooke classes
(:mod:`hooke.playlist.Playlist`, :mod:`hooke.curve.Curve`, ...).
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
+# Copyright
+
from ..libhooke import WX_GOOD, ClickedPoint, config_file_path
from mdp import pca
-'''
-a library of helping functions for spotting force spectroscopy peaks
+# Copyright
+
+"""a library of helping functions for spotting force spectroscopy peaks.
+"""
-(c)Fabrizio Benedetti and Massimo Sandal , 2007
-'''
import numpy as np
def conv_dx(data,vect):
+# Copyright
+
"""The `playlist` module provides :class:`PlaylistPlugin` several
associated :class:`hooke.command.Command`\s for handling
:mod:`hooke.playlist` classes.
-'''
-PROCPLOTS
-Processed plots plugin for force curves.
+# Copyright
+
+"""Processed plots plugin for force curves.
+"""
-Licensed under the GNU GPL version 2
-'''
from ..libhooke import WX_GOOD
import wxversion
wxversion.select(WX_GOOD)
-#!/usr/bin/env python
-
-'''review.py
-Alberto Gomez-Casado (c) 2010 University of Twente
-'''
+# Copyright
from ..libhooke import WX_GOOD
import wxversion
-#!/usr/bin/env python
+# Copyright
-'''
-SHOW CONVOLUTED CURVE PLUGIN FOR HOOKE
-
-This plugin contains a plotmanipulator to show the convoluted curve.
-(c) Dr. Rolf Schmidt, 2009
-'''
+"""This plugin contains a plotmanipulator to show the convoluted curve.
+"""
import libpeakspot
+# Copyright
+
from ..libhooke import WX_GOOD
import wxversion
wxversion.select(WX_GOOD)
+# Copyright
+
"""The `system` module provides :class:`SystemPlugin` and several
associated :class:`hooke.command.Command`\s for interacting with the
operating system and execution environment.
-'''
-TUTORIAL PLUGIN FOR HOOKE
+# Copyright
-This plugin contains example commands to teach how to write an Hooke plugin, including description of main Hooke
-internals.
-(c)Massimo Sandal 2007
-'''
+"""This plugin contains example commands to teach how to write an
+Hooke plugin, including description of main Hooke internals.
+"""
import numpy as np
+# Copyright
+
"""The `ui` module provides :class:`UserInterface` and various subclasses.
"""
+# Copyright
+
"""Defines :class:`CommandLine` for driving Hooke from the command
line.
"""
+# Copyright
+
def _generate_vectors(self):
"""
+# Copyright
+
#PLOT EXPORT AND MANIPULATION COMMANDS
def help_export(self):
print '''
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
+# Copyright
-'''
-formatter.py
-
-Number formatting utilities for Hooke.
-
-Copyright (C) 2006 Massimo Sandal (University of Bologna, Italy).
-With algorithms contributed by Francesco Musiani (University of Bologna, Italy)
-
-This program is released under the GNU General Public License version 2.
-'''
+"""A number formatting utilities for Hooke.
+"""
from matplotlib.ticker import ScalarFormatter
+# Copyright
+
#import os
#import os.path
import wx
+# Copyright
+
import sys
import time
import math
-#!/usr/bin/env python
+# Copyright
import sys
import wx
+# Copyright
+
class PlotObject(object):
def __init__(self):
+# Copyright
+
#PLOT INTERACTION COMMANDS
#-------------------------------
def help_plot(self):
+# Copyright
+
class ClickedPoint(object):
'''
this class defines what a clicked point on the curve plot is
-'''
-//
-// prettyformat.py - simple Python function to format values with nice prefixes
-// Version 1.0.1
-//
-// History
-// 2009 07 16: added negative number support
-// added decimal-formatted output
-//
-// Copyright (c) 2009 Rolf Schmidt, Montreal
-// rschmidt@alcor.concordia.ca
-//
-// This procedure is released under the GNU General Public License version 2
-//
-'''
+# Copyright
+
+"""Format values with nice prefixes.
+History:
+
+* 2009 07 16:
+
+ * added negative number support
+ * added decimal-formatted output
+"""
+__version__ = "1.0.1"
import math
from numpy import isnan
for aValue in scaleValues: print decimalFormat(aValue/iMultiplier, iDecimals),
#print the scale label using the value at iIndex
print '\n'+get_prefix(scaleValues[iIndex])+'N'
-'''
\ No newline at end of file
+'''
+# Copyright
+
import prettyformat
DEFAULT_COLOR = 'orange'
-# COPYRIGHT
+# Copyright
"""The util module contains assorted utilities not directly associated
with Hooke functionality.
-# COPYRIGHT
+# Copyright
"""Define :class:`Graph`, a directed, acyclic graph structure.
:class:`Graph`\s are composed of :class:`Node`\s, also defined by this
+# Copyright
+
"""`pluggable`
"""
+# Copyright
+
"""Hooke: tools for analyzing force spectroscopy data.
Mercurial repository:
+# Copyright
+
"""Hooke integration tests.
Besides the unittests embedded in the Hooke code, we also want to
+# Copyright
+
"""
>>> from hooke.hooke import Hooke
>>> h = Hooke()