当前位置: 首页>>代码示例>>Python>>正文


Python TimeSeries.specs["wdef_name"]方法代码示例

本文整理汇总了Python中pySPACE.resources.data_types.time_series.TimeSeries.specs["wdef_name"]方法的典型用法代码示例。如果您正苦于以下问题:Python TimeSeries.specs["wdef_name"]方法的具体用法?Python TimeSeries.specs["wdef_name"]怎么用?Python TimeSeries.specs["wdef_name"]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pySPACE.resources.data_types.time_series.TimeSeries的用法示例。


在下文中一共展示了TimeSeries.specs["wdef_name"]方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: next

# 需要导入模块: from pySPACE.resources.data_types.time_series import TimeSeries [as 别名]
# 或者: from pySPACE.resources.data_types.time_series.TimeSeries import specs["wdef_name"] [as 别名]
    def next(self, debug=False):
        """Return next labeled window when used in iterator context."""
        while len(self.cur_extract_windows) == 0:
            # fetch the next block from data_client
            if debug:
                print "reading next block"
            self._readnextblock()
            self._extract_windows_cur_block()
            if debug:
                print "  buffermarkers", self.buffermarkers
                print "  current block", self.samplebuf.get()[self.prebuflen][1, :]
                # print "  current extracted windows ", self.cur_extract_windows

        (windef_name, current_window, class_, start_time, end_time, markers_cur_win) = self.cur_extract_windows.pop(0)

        # TODO: Replace this by a decorator or something similar
        current_window = numpy.atleast_2d(current_window.transpose())
        current_window = TimeSeries(
            input_array=current_window,
            channel_names=self.data_client.channelNames,
            sampling_frequency=self.data_client.dSamplingInterval,
            start_time=start_time,
            end_time=end_time,
            name="Window extracted @ %d ms, length %d ms, class %s" % (start_time, end_time - start_time, class_),
            marker_name=markers_cur_win,
        )

        current_window.generate_meta()
        current_window.specs["sampling_frequency"] = self.data_client.dSamplingInterval
        current_window.specs["wdef_name"] = windef_name
        self.nwindow += 1

        # return (ndsamplewin, ndmarkerwin)
        return (current_window, class_)
开发者ID:Crespo911,项目名称:pyspace,代码行数:36,代码来源:windower.py


注:本文中的pySPACE.resources.data_types.time_series.TimeSeries.specs["wdef_name"]方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。