本文整理汇总了Python中pySPACE.resources.data_types.time_series.TimeSeries.specs['sampling_frequency']方法的典型用法代码示例。如果您正苦于以下问题:Python TimeSeries.specs['sampling_frequency']方法的具体用法?Python TimeSeries.specs['sampling_frequency']怎么用?Python TimeSeries.specs['sampling_frequency']使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pySPACE.resources.data_types.time_series.TimeSeries
的用法示例。
在下文中一共展示了TimeSeries.specs['sampling_frequency']方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: next
# 需要导入模块: from pySPACE.resources.data_types.time_series import TimeSeries [as 别名]
# 或者: from pySPACE.resources.data_types.time_series.TimeSeries import specs['sampling_frequency'] [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_)