I didn't add this at the curve level, since it seems reasonable that
someone might develop a curve format where the 'file' is a directory.
from ..config import Setting
from ..util.pluggable import IsSubclass, construct_graph
from ..config import Setting
from ..util.pluggable import IsSubclass, construct_graph
"""Driver for text-exported HDF5 files from Igor pro
"""
"""Driver for text-exported HDF5 files from Igor pro
"""
from .. import curve as lhc
from .. import libhooke as lh
from .. import curve as lhc
from .. import libhooke as lh
self.filedata.close()
def is_me(self):
self.filedata.close()
def is_me(self):
+ if os.path.isdir(path):
+ return False
self.raw_header=self.lines[0]
if 'IGP-HDF5-Hooke' in self.raw_header:
self.raw_header=self.lines[0]
if 'IGP-HDF5-Hooke' in self.raw_header:
"""Library for interpreting Hemingway force spectroscopy files.
"""
"""Library for interpreting Hemingway force spectroscopy files.
"""
import numpy
from .. import curve as curve
import numpy
from .. import curve as curve
super(HemingwayDriver, self).__init__(name='hemingway')
def is_me(self, path):
super(HemingwayDriver, self).__init__(name='hemingway')
def is_me(self, path):
+ if os.path.isdir(path):
+ return False
headlines = []
with Closing(file(path, 'r')) as f:
for i in range(2):
headlines = []
with Closing(file(path, 'r')) as f:
for i in range(2):
super(JPKDriver, self).__init__(name='jpk')
def is_me(self, path):
super(JPKDriver, self).__init__(name='jpk')
def is_me(self, path):
+ if os.path.isdir(path):
+ return False
if zipfile.is_zipfile(path): # JPK file versions since at least 0.5
with Closing(zipfile.ZipFile(path, 'r')) as f:
if 'header.properties' not in f.namelist():
if zipfile.is_zipfile(path): # JPK file versions since at least 0.5
with Closing(zipfile.ZipFile(path, 'r')) as f:
if 'header.properties' not in f.namelist():
return plot
def is_me(self):
return plot
def is_me(self):
+ if os.path.isdir(path):
+ return False
if self.filename[-3:].lower()=='mcs':
return True
else:
if self.filename[-3:].lower()=='mcs':
return True
else:
self.filedata.close()
def is_me(self):
self.filedata.close()
def is_me(self):
+ if os.path.isdir(path):
+ return False
if len(self.lines) < 34:
return False
if len(self.lines) < 34:
return False
from .. import libhooke as lh
from .. import curve as lhc
from .. import libhooke as lh
from .. import curve as lhc
self.filedata.close()
def is_me(self):
self.filedata.close()
def is_me(self):
+ if os.path.isdir(path):
+ return False
try:
self.raw_header = self.lines[0:38]
except:
try:
self.raw_header = self.lines[0:38]
except:
import pprint
import numpy
import pprint
import numpy
def is_me(self, path):
"""Look for identifying fields in the IBW note.
"""
def is_me(self, path):
"""Look for identifying fields in the IBW note.
"""
+ if os.path.isdir(path):
+ return False
if not path.endswith('.ibw'):
return False
targets = ['Version:', 'XOPVersion:', 'ForceNote:']
if not path.endswith('.ibw'):
return False
targets = ['Version:', 'XOPVersion:', 'ForceNote:']
"""Driver for Veeco PicoForce force spectroscopy files.
"""
"""Driver for Veeco PicoForce force spectroscopy files.
"""
import pprint
import re
import time
import pprint
import re
import time
super(PicoForceDriver, self).__init__(name='picoforce')
def is_me(self, path):
super(PicoForceDriver, self).__init__(name='picoforce')
def is_me(self, path):
+ if os.path.isdir(path):
+ return False
f = file(path, 'r')
header = f.read(30)
f.close()
f = file(path, 'r')
header = f.read(30)
f.close()
that is, two plots with two datasets each.
"""
that is, two plots with two datasets each.
"""
# The following are relative imports. See PEP 328 for details
# http://www.python.org/dev/peps/pep-0328/
from .. import curve as curve # this module defines data containers.
# The following are relative imports. See PEP 328 for details
# http://www.python.org/dev/peps/pep-0328/
from .. import curve as curve # this module defines data containers.
Hooke to understand what kind of files we're looking at
automatically.
"""
Hooke to understand what kind of files we're looking at
automatically.
"""
+ if os.path.isdir(path):
+ return False
f = open(path, 'r')
header = f.readline() # we only need the first line
f = open(path, 'r')
header = f.readline() # we only need the first line
+ if os.path.isdir(path):
+ return False
if not path.endswith('_unfold'):
return False
for p in self._paths(path):
if not path.endswith('_unfold'):
return False
for p in self._paths(path):