本文整理汇总了Python中neo.core.baseneo.BaseNeo类的典型用法代码示例。如果您正苦于以下问题:Python BaseNeo类的具体用法?Python BaseNeo怎么用?Python BaseNeo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BaseNeo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, channel_names=None, channel_indexes=None, name=None,
description=None, file_origin=None, **annotations):
"""Initialize a new RecordingChannelGroup."""
# Inherited initialization
# Sets universally recommended attributes, and places all others
# in annotations
BaseNeo.__init__(self, name=name, file_origin=file_origin,
description=description, **annotations)
# Defaults
if channel_indexes is None:
channel_indexes = np.array([])
if channel_names is None:
channel_names = np.array([])
# Store recommended attributes
self.channel_names = channel_names
self.channel_indexes = channel_indexes
# Initialize containers for child objects
self.analogsignalarrays = []
self.units = []
# Many to many relationship
self.recordingchannels = []
self.block = None
示例2: __init__
def __init__(self, times=None, durations=None, labels=None, units=None,
name=None, description=None, file_origin=None, **annotations):
'''
Initialize a new :class:`Epoch` instance.
'''
BaseNeo.__init__(self, name=name, file_origin=file_origin,
description=description, **annotations)
示例3: __init__
def __init__(self, signal, units=None, dtype=None, copy=True,
t_start=0 * pq.s, sampling_rate=None, sampling_period=None,
name=None, file_origin=None, description=None,
channel_index=None, **annotations):
'''
Initializes a newly constructed :class:`AnalogSignalArray` instance.
'''
BaseNeo.__init__(self, name=name, file_origin=file_origin,
description=description, **annotations)
示例4: __init__
def __init__(self, time, label, name=None, description=None,
file_origin=None, **annotations):
"""Initialize a new Event."""
BaseNeo.__init__(self, name=name, file_origin=file_origin,
description=description, **annotations)
self.time = time
self.label = label
self.segment =None
示例5: __init__
def __init__(self, times, signal, units=None, time_units=None, dtype=None,
copy=True, name=None, file_origin=None, description=None,
**annotations):
'''
Initializes a newly constructed :class:`IrregularlySampledSignal`
instance.
'''
BaseNeo.__init__(self, name=name, file_origin=file_origin,
description=description, **annotations)
示例6: __init__
def __init__(self, times=np.array([]) * pq.s,
labels=np.array([], dtype='S'), name=None, description=None,
file_origin=None, **annotations):
"""Initialize a new EventArray."""
BaseNeo.__init__(self, name=name, file_origin=file_origin,
description=description, **annotations)
self.times = times
self.labels = labels
self.segment = None
示例7: __init__
def __init__(self, time, label, name=None, description=None,
file_origin=None, **annotations):
'''
Initialize a new :class:`Event` instance.
'''
BaseNeo.__init__(self, name=name, file_origin=file_origin,
description=description, **annotations)
self.time = time
self.label = label
self.segment = None
示例8: __init__
def __init__(self, name=None, description=None, file_origin=None,
channel_indexes = None, **annotations):
"""Initialize a new neuronal Unit (spike source)"""
BaseNeo.__init__(self, name=name, file_origin=file_origin,
description=description, **annotations)
self.channel_indexes = channel_indexes
self.spiketrains = [ ]
self.spikes = [ ]
self.recordingchannelgroup = None
示例9: __init__
def __init__(self, times, values,
name=None, description=None,
file_origin=None, **annotations):
"""Initalize a new IrregularlySampledSignal."""
BaseNeo.__init__(self, name=name, file_origin=file_origin,
description=description, **annotations)
self.times = times
self.values = values
self.segment = None
self.recordingchannel = None
示例10: __init__
def __init__(self, name=None, description=None, file_origin=None,
file_datetime=None, rec_datetime=None, index=None,
**annotations):
"""Initalize a new Block."""
BaseNeo.__init__(self, name=name, file_origin=file_origin,
description=description, **annotations)
self.file_datetime = file_datetime
self.rec_datetime = rec_datetime
self.index = index
self.segments = []
self.recordingchannelgroups = []
示例11: __init__
def __init__(self, times, t_stop, units=None, dtype=np.float,
copy=True, sampling_rate=1.0 * pq.Hz, t_start=0.0 * pq.s,
waveforms=None, left_sweep=None, name=None, file_origin=None,
description=None, **annotations):
"""Initializes newly constructed SpikeTrain."""
# This method is only called when constructing a new SpikeTrain,
# not when slicing or viewing. We use the same call signature
# as __new__ for documentation purposes. Anything not in the call
# signature is stored in annotations.
# Calls parent __init__, which grabs universally recommended
# attributes and sets up self.annotations
BaseNeo.__init__(self, name=name, file_origin=file_origin,
description=description, **annotations)
示例12: __init__
def __init__(self, times=None, labels=None, name=None, description=None, file_origin=None, **annotations):
"""
Initialize a new :class:`EventArray` instance.
"""
BaseNeo.__init__(self, name=name, file_origin=file_origin, description=description, **annotations)
if times is None:
times = np.array([]) * pq.s
if labels is None:
labels = np.array([], dtype="S")
self.times = times
self.labels = labels
self.segment = None
示例13: __init__
def __init__(self, array_annotations=None, **annotations):
# this for py27 str vs py3 str in neo attributes ompatibility
annotations = check_annotations(annotations)
if 'file_origin' not in annotations:
# the str is to make compatible with neo_py27 where attribute
# used to be str so raw bytes
annotations['file_origin'] = str(self._rawio.source_name())
# this mock the array annotaions to avoid inherits DataObject
self.array_annotations = ArrayDict(self.shape[-1])
if array_annotations is not None:
self.array_annotations.update(array_annotations)
BaseNeo.__init__(self, **annotations)
示例14: __init__
def __init__(self, name=None, description=None, file_origin=None,
channel_indexes=None, **annotations):
'''
Initialize a new :clas:`Unit` instance (spike source)
'''
BaseNeo.__init__(self, name=name, file_origin=file_origin,
description=description, **annotations)
self.channel_indexes = channel_indexes
self.spiketrains = []
self.spikes = []
self.recordingchannelgroup = None
示例15: __init__
def __init__(self, time=0*pq.s, waveform=None, sampling_rate=None,
left_sweep=None, name=None, description=None,
file_origin=None, **annotations):
"""Initialize a new Spike."""
BaseNeo.__init__(self, name=name, file_origin=file_origin,
description=description, **annotations)
self.time = time
self.waveform = waveform
self.left_sweep = left_sweep
self.sampling_rate = sampling_rate
self.segment = None
self.unit = None