-'''
-libpicoforce.py
-
-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.
-'''
-
-import re, struct
+# Copyright (C) 2006-2010 Alberto Gomez-Casado
+# Massimo Sandal <devicerandom@gmail.com>
+# W. Trevor King <wking@drexel.edu>
+#
+# This file is part of Hooke.
+#
+# Hooke is free software: you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation, either
+# version 3 of the License, or (at your option) any later version.
+#
+# Hooke is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Hooke. If not, see
+# <http://www.gnu.org/licenses/>.
+
+"""Library for interpreting Picoforce force spectroscopy files.
+"""
+
+import re
+import struct
from scipy import arange
-import libhookecurve as lhc
+#from .. import libhooke as lh
+from .. import curve as lhc
-__version__='0.0.0.20080404'
+
+__version__='0.0.0.20090923'
class DataChunk(list):
'''
constructor method
'''
-
+ filename = lh.get_file_path(filename)
self.textfile=file(filename)
self.binfile=file(filename,'rb')
main_plot=lhc.PlotObject()
- main_plot.vectors=[[zdomain.ext()[0:samples], force.ext()[0:samples]],[zdomain.ret()[0:samples], force.ret()[0:samples]]]
+ main_plot.vectors = [[zdomain.ext()[0:samples], force.ext()[0:samples]],[zdomain.ret()[0:samples], force.ret()[0:samples]]]
main_plot.normalize_vectors()
- main_plot.units=['meters','newton']
- main_plot.destination=0
- main_plot.title=self.filepath
-
+ main_plot.units = ['meters','newton']
+ main_plot.destination = 0
+ main_plit.filename = self.filepath
+ main_plot.title = self.filepath
+ main_plot.colors = ['red', 'blue']
+ main_plit.styles = ['plot', 'plot']
return [main_plot]