本文整理汇总了Python中timeseries.TimeSeries.units方法的典型用法代码示例。如果您正苦于以下问题:Python TimeSeries.units方法的具体用法?Python TimeSeries.units怎么用?Python TimeSeries.units使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类timeseries.TimeSeries
的用法示例。
在下文中一共展示了TimeSeries.units方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: print
# 需要导入模块: from timeseries import TimeSeries [as 别名]
# 或者: from timeseries.TimeSeries import units [as 别名]
print('Loading data from ' + directory)
dc = get_datacube(directory)
ny = dc.shape[0]
nx = dc.shape[1]
nt = dc.shape[2]
# Create a time series object
dt = 12.0
t = dt * np.arange(0, nt)
tsdummy = TimeSeries(t, t)
iobs = np.zeros(tsdummy.PowerSpectrum.Npower.shape)
# Result # 1 - add up all the emission and do the analysis on the full FOV
full_ts = np.zeros((nt))
for i in range(0, nx):
for j in range(0, ny):
d = dc[j, i, :].flatten()
# Fix the data for any non-finite entries
d = tsutils.fix_nonfinite(d)
d = d - np.mean(d)
d = d / np.std(d)
ts = TimeSeries(t, d)
iobs = iobs + ts.PowerSpectrum.Npower
iobs = iobs / (1.0 * nx * ny)
ts.label = 'emission (AIA ' + wave + ')'
ts.units = 'counts'
# Get the normalized power and the positive frequencies
iobs = ts.PowerSpectrum.Npower
this = ([ts.PowerSpectrum.frequencies.positive, iobs],)
示例2: TimeSeries
# 需要导入模块: from timeseries import TimeSeries [as 别名]
# 或者: from timeseries.TimeSeries import units [as 别名]
tsoriginal = TimeSeries(t, data)
plt.figure(10)
tsoriginal.peek()
meandata = np.mean(data)
# relative
data = (data - meandata) / meandata
#data = data - smooth(data, window_len=84)
# Create a time series object
ts = TimeSeries(t, data)
ts.label = 'emission'
ts.units = 'arb. units'
ts.name = 'simulated data [n=%4.2f]' % (model_param[1])
# Get the normalized power and the positive frequencies
iobs = ts.PowerSpectrum.ppower
this = ([ts.PowerSpectrum.frequencies.positive, iobs],)
# _____________________________________________________________________________
# -----------------------------------------------------------------------------
# Wavelet transform using a white noise background
# -----------------------------------------------------------------------------
var = ts.data
# Range of periods to average
avg1, avg2 = (150.0, 400.0)
# Significance level