• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python baseio.BaseIO类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python nestio.NestIO类代码示例发布时间:2022-05-27
下一篇:
Python event.Event类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap