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


Python TimeSeries.units方法代码示例

本文整理汇总了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],)
开发者ID:wafels,项目名称:rednoise,代码行数:32,代码来源:get_real_data.py

示例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
开发者ID:wafels,项目名称:rednoise,代码行数:33,代码来源:example_wavelet_analysis2.py


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