本文整理汇总了Python中pyview.lib.datacube.Datacube.structure方法的典型用法代码示例。如果您正苦于以下问题:Python Datacube.structure方法的具体用法?Python Datacube.structure怎么用?Python Datacube.structure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyview.lib.datacube.Datacube
的用法示例。
在下文中一共展示了Datacube.structure方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from pyview.lib.datacube import Datacube [as 别名]
# 或者: from pyview.lib.datacube.Datacube import structure [as 别名]
for j in range(0,4):
if j!=0:
string+=","
value = gv.spins.parameters()["densityMatrix"][i][j]
string+=str(real(value))+"+I*"+str(imag(value))
string+="}"
string+="}"
print string
##
from matplotlib.pyplot import *
from numpy import *
from pyview.lib.datacube import Datacube
cube = Datacube()
cube.loadtxt("State Tomography of Swap vs Swap Duration.txt")
##
print cube.structure()
##
def smooth(x,window_len=11,window='hanning'):
"""smooth the data using a window with requested size.
This method is based on the convolution of a scaled window with the signal.
The signal is prepared by introducing reflected copies of the signal
(with the window size) in both ends so that transient parts are minimized
in the begining and end part of the output signal.
input:
x: the input signal
window_len: the dimension of the smoothing window; should be an odd integer
window: the type of window from 'flat', 'hanning', 'hamming', 'bartlett', 'blackman'
flat window will produce a moving average smoothing.