本文整理汇总了Python中neo.io.baseio.BaseIO类的典型用法代码示例。如果您正苦于以下问题:Python BaseIO类的具体用法?Python BaseIO怎么用?Python BaseIO使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BaseIO类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, filename, mode="rw"):
"""
Initialise IO instance and NIX file.
:param filename: Full path to the file
"""
if not HAVE_NIX:
raise Exception("Failed to import NIX. "
"The NixIO requires the Python bindings for NIX "
"(nixio on PyPi). Try `pip install nixio`.")
BaseIO.__init__(self, filename)
self.filename = filename
if mode == "ro":
filemode = nix.FileMode.ReadOnly
elif mode == "rw":
filemode = nix.FileMode.ReadWrite
elif mode == "ow":
filemode = nix.FileMode.Overwrite
else:
raise ValueError("Invalid mode specified '{}'. "
"Valid modes: 'ro' (ReadOnly)', 'rw' (ReadWrite),"
" 'ow' (Overwrite).".format(mode))
self.nix_file = nix.File.open(self.filename, filemode, backend="h5py")
self._neo_map = dict()
self._nix_map = dict()
self._lazy_loaded = list()
self._object_hashes = dict()
self._block_read_counter = 0
self._path_map = dict()
开发者ID:MartinHeroux,项目名称:ScientificallySound_files,代码行数:31,代码来源:nixio.py
示例2: __init__
def __init__(self, filename, dataset=0):
"""
Arguments:
filename : the filename
dataset: points to a specific dataset in the .kwik and .raw.kwd file,
however this can be an issue to change in e.g. OpenElectrophy or Spykeviewer
"""
BaseIO.__init__(self)
self._filename = filename
self._path, file = os.path.split(filename)
self._kwik = h5py.File(filename, "r")
self._dataset = dataset
try:
rawfile = self._kwik["recordings"][str(self._dataset)]["raw"].attrs[
"hdf5_path"
] # klustakwik/phy and newest version of open ephys
rawfile = rawfile.split("/")[0]
except:
rawfile = file.split(".")[0] + "_100.raw.kwd" # first version of open ephys files
self._kwd = h5py.File(self._path + os.sep + rawfile, "r")
self._attrs = {}
self._attrs["kwik"] = self._kwik["recordings"][str(self._dataset)].attrs
self._attrs["kwd"] = self._kwd["recordings"][str(self._dataset)].attrs
self._attrs["shape"] = self._kwd["recordings"][str(self._dataset)]["data"].shape
try:
self._attrs["app_data"] = self._kwd["recordings"][str(self._dataset)][
"application_data"
].attrs # TODO: find bitvolt conversion in phy generated data
except:
self._attrs["app_data"] = False
开发者ID:jakirkham,项目名称:python-neo,代码行数:30,代码来源:kwikio.py
示例3: __init__
def __init__(self, filename=None):
"""
Arguments:
filename : the filename
"""
BaseIO.__init__(self, filename)
开发者ID:bal47,项目名称:python-neo,代码行数:7,代码来源:plexonio.py
示例4: __init__
def __init__(self, filename):
if not HAVE_H5PY:
raise ImportError("h5py is not available")
BaseIO.__init__(self, filename=filename)
self._data = h5py.File(filename, 'r')
self.object_refs = {}
self._lazy = False
开发者ID:CINPLA,项目名称:python-neo,代码行数:7,代码来源:hdf5io.py
示例5: __init__
def __init__(self, filename, dataset=0) :
"""
Arguments:
filename : the filename
dataset: points to a specific dataset in the .kwik and .raw.kwd file,
however this can be an issue to change in e.g. OpenElectrophy or Spykeviewer
"""
BaseIO.__init__(self)
self._filename = filename
self._path, file = os.path.split(filename)
self._kwik = h5py.File(filename, 'r')
self._dataset = dataset
try:
rawfile = self._kwik['recordings'][str(self._dataset)]['raw'].attrs['hdf5_path'] # klustakwik/phy and newest version of open ephys
rawfile = rawfile.split('/')[0]
except:
rawfile = file.split('.')[0] + '_100.raw.kwd' # first version of open ephys files
self._kwd = h5py.File(self._path + os.sep + rawfile, 'r')
self._attrs = {}
self._attrs['kwik'] = self._kwik['recordings'][str(self._dataset)].attrs
self._attrs['kwd'] = self._kwd['recordings'][str(self._dataset)].attrs
self._attrs['shape'] = self._kwd['recordings'][str(self._dataset)]['data'].shape
try:
self._attrs['app_data'] = self._kwd['recordings'][str(self._dataset)]['application_data'].attrs # TODO: find bitvolt conversion in phy generated data
except:
self._attrs['app_data'] = False
开发者ID:bal47,项目名称:python-neo,代码行数:26,代码来源:kwikio.py
示例6: __init__
def __init__(self, filename=None):
"""
Parameters
----------
filename: string, default=None
The filename.
"""
BaseIO.__init__(self, filename=filename)
开发者ID:BerndSchuller,项目名称:UP-Tasks,代码行数:8,代码来源:gdfio.py
示例7: __init__
def __init__(self, filename=None):
"""
This class read a abf file.
Arguments:
filename : the filename to read
"""
BaseIO.__init__(self)
self.filename = filename
开发者ID:catubc,项目名称:neuron,代码行数:8,代码来源:axonio.py
示例8: __init__
def __init__(self, filename=None):
"""
This class read/write a elan based file.
**Arguments**
filename : the filename to read or write
"""
BaseIO.__init__(self)
self.filename = filename
开发者ID:CINPLA,项目名称:python-neo,代码行数:9,代码来源:elanio.py
示例9: __init__
def __init__(self , filename = '', dllname = '') :
"""
Arguments:
filename: the file to read
ddlname: the name of neuroshare dll to be used for this file
"""
BaseIO.__init__(self)
self.dllname = dllname
self.filename = filename
开发者ID:CINPLA,项目名称:python-neo,代码行数:9,代码来源:neurosharectypesio.py
示例10: __init__
def __init__(self , filename = None) :
"""
Arguments:
filename : the .map Alpha Omega file name
"""
BaseIO.__init__(self)
self.filename = filename
开发者ID:CINPLA,项目名称:python-neo,代码行数:9,代码来源:alphaomegaio.py
示例11: __init__
def __init__(self, filename=None):
"""
Arguments:
filename: the filename
"""
BaseIO.__init__(self)
self._path = filename
self._filename = os.path.basename(filename)
self._fsrc = None
开发者ID:NeuroArchive,项目名称:python-neo,代码行数:9,代码来源:brainwaredamio.py
示例12: __init__
def __init__(self, filename) :
"""
"""
BaseIO.__init__(self)
# remove extension because there is bunch of files : nev, ns1, ..., ns5, nsf
for ext in self.extensions:
if filename.endswith('.'+ext):
filename = filename.strip('.'+ext)
self.filename = filename
开发者ID:guangxingli,项目名称:python-neo,代码行数:10,代码来源:blackrockio.py
示例13: __init__
def __init__(self, filename):
"""
Arguments:
filename : the filename
"""
BaseIO.__init__(self)
self.filename = os.path.abspath(filename)
model = kwik.KwikModel(self.filename) # TODO this group is loaded twice
self.models = [kwik.KwikModel(self.filename, channel_group=grp)
for grp in model.channel_groups]
开发者ID:CINPLA,项目名称:python-neo,代码行数:10,代码来源:kwikio.py
示例14: __init__
def __init__(self , filename = None) :
"""
This class read a WinEDR file.
Arguments:
filename : the filename
"""
BaseIO.__init__(self)
self.filename = filename
开发者ID:CINPLA,项目名称:python-neo,代码行数:10,代码来源:winedrio.py
示例15: __init__
def __init__(self, filename=None, **kwargs):
if not HAVE_TABLES:
raise TABLES_ERR
BaseIO.__init__(self, filename=filename)
self.connected = False
self.objects_by_ref = {} # Loaded objects by reference id
self.parent_paths = {} # Tuples of (Segment, other parent) paths
self.name_indices = {}
if filename:
self.connect(filename=filename)
开发者ID:leaandre,项目名称:python-neo,代码行数:10,代码来源:hdf5io.py
示例16: __init__
def __init__(self, filename=None):
"""
This class read/write neo objects in matlab 5 to 7.2 format.
Arguments:
filename : the filename to read
"""
if not HAVE_SCIPY:
raise SCIPY_ERR
BaseIO.__init__(self)
self.filename = filename
开发者ID:CINPLA,项目名称:python-neo,代码行数:11,代码来源:neomatlabio.py
示例17: __init__
def __init__(self, filename=None):
"""
This class read/write AnalogSignal in a text file.
Each signal is a column.
One of the column can be the time vector
Arguments:
filename : the filename to read/write
"""
BaseIO.__init__(self)
self.filename = filename
开发者ID:INM-6,项目名称:python-neo,代码行数:11,代码来源:asciisignalio.py
示例18: __init__
def __init__(self, filename) :
"""
Arguments:
filename : the filename
"""
BaseIO.__init__(self, filename)
self._extension_dir = tempfile.mkdtemp()
extension_file = join(self._extension_dir, "nwb_neo_extension.py")
with open(extension_file, "w") as fp:
fp.write(str(neo_extension))
self.extensions = [extension_file]
开发者ID:MartinHeroux,项目名称:ScientificallySound_files,代码行数:11,代码来源:nwbio_REMOTE_4246.py
示例19: __init__
def __init__(self, filename=None):
"""
This class read a plx file.
Arguments:
filename : the filename
load_spike_waveform : load or not waveform of spikes (default True)
"""
BaseIO.__init__(self)
self.filename = filename
开发者ID:toddrjen,项目名称:python-neo,代码行数:11,代码来源:plexonio.py
示例20: __init__
def __init__(self , filename = None) :
"""
This class read a nex file.
Arguments:
filename : the filename to read you can pu what ever it do not read anythings
"""
BaseIO.__init__(self)
self.filename = filename
开发者ID:guangxingli,项目名称:python-neo,代码行数:11,代码来源:neuroexplorerio.py
注:本文中的neo.io.baseio.BaseIO类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论