本文整理汇总了Python中mvpa2.datasets.Dataset.from_channeltimeseries方法的典型用法代码示例。如果您正苦于以下问题:Python Dataset.from_channeltimeseries方法的具体用法?Python Dataset.from_channeltimeseries怎么用?Python Dataset.from_channeltimeseries使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mvpa2.datasets.Dataset
的用法示例。
在下文中一共展示了Dataset.from_channeltimeseries方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: eep_dataset
# 需要导入模块: from mvpa2.datasets import Dataset [as 别名]
# 或者: from mvpa2.datasets.Dataset import from_channeltimeseries [as 别名]
def eep_dataset(samples, targets=None, chunks=None):
"""Create a dataset using an EEP binary file as source.
EEP files are used by *eeprobe* a software for analysing even-related
potentials (ERP), which was developed at the Max-Planck Institute for
Cognitive Neuroscience in Leipzig, Germany.
http://www.ant-neuro.com/products/eeprobe
"""
if isinstance(samples, str):
# open the eep file
eb = EEPBin(samples)
elif isinstance(samples, EEPBin):
# nothing special
eb = samples
else:
raise ValueError("eep_dataset takes the filename of an "
"EEP file or a EEPBin object as 'samples' argument.")
# init dataset
ds = Dataset.from_channeltimeseries(
eb.data, targets=targets, chunks=chunks, t0=eb.t0, dt=eb.dt,
channelids=eb.channels)
return ds
示例2: eep_dataset
# 需要导入模块: from mvpa2.datasets import Dataset [as 别名]
# 或者: from mvpa2.datasets.Dataset import from_channeltimeseries [as 别名]
def eep_dataset(samples, targets=None, chunks=None):
"""Create a dataset using an EEP binary file as source.
EEP files are used by *eeprobe* a software for analysing even-related
potentials (ERP), which was developed at the Max-Planck Institute for
Cognitive Neuroscience in Leipzig, Germany.
http://www.ant-neuro.com/products/eeprobe
Parameters
----------
samples : str or EEPBin instance
This is either a filename of an EEP file, or an EEPBin instance, providing
the samples data in EEP format.
targets, chunks : sequence or scalar or None
Values are pass through to `Dataset.from_wizard()`. See its documentation
for more information.
"""
if isinstance(samples, str):
# open the eep file
eb = EEPBin(samples)
elif isinstance(samples, EEPBin):
# nothing special
eb = samples
else:
raise ValueError("eep_dataset takes the filename of an "
"EEP file or a EEPBin object as 'samples' argument.")
# init dataset
ds = Dataset.from_channeltimeseries(
eb.data, targets=targets, chunks=chunks, t0=eb.t0, dt=eb.dt,
channelids=eb.channels)
return ds