本文整理汇总了Python中Pgplot.nextplotpage方法的典型用法代码示例。如果您正苦于以下问题:Python Pgplot.nextplotpage方法的具体用法?Python Pgplot.nextplotpage怎么用?Python Pgplot.nextplotpage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pgplot
的用法示例。
在下文中一共展示了Pgplot.nextplotpage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: estimate_rz
# 需要导入模块: import Pgplot [as 别名]
# 或者: from Pgplot import nextplotpage [as 别名]
def estimate_rz(psr, T, show=0, device='/XWIN'):
"""
estimate_rz(psr, T, show=0, device='/XWIN'):
Return estimates of a pulsar's average Fourier freq ('r')
relative to its nominal Fourier freq as well as its
Fourier f-dot ('z') in bins, of a pulsar.
'psr' is a psrparams structure describing the pulsar.
'T' is the length of the observation in sec.
'show' if true, displays plots of 'r' and 'z'.
'device' if the device to plot to if 'show' is true.
"""
startE = keplers_eqn(psr.orb.t, psr.orb.p, psr.orb.e, 1.0E-15)
numorbpts = int(T / psr.orb.p + 1.0) * 1024 + 1
dt = T / (numorbpts - 1)
E = dorbint(startE, numorbpts, dt, psr.orb)
z = z_from_e(E, psr, T)
r = T/p_from_e(E, psr) - T/psr.p
if show:
times = np.arange(numorbpts) * dt
Pgplot.plotxy(r, times, labx = 'Time', \
laby = 'Fourier Frequency (r)', device=device)
if device=='/XWIN':
print 'Press enter to continue:'
i = raw_input()
Pgplot.nextplotpage()
Pgplot.plotxy(z, times, labx = 'Time',
laby = 'Fourier Frequency Derivative (z)', device=device)
Pgplot.closeplot()
return r.mean(), z.mean()
示例2: len
# 需要导入模块: import Pgplot [as 别名]
# 或者: from Pgplot import nextplotpage [as 别名]
# Create the data set
cand = presto.orbitparams()
m = 0
comb = presto.gen_bin_response(0.0, 1, psr.p, T, psr.orb ,
presto.LOWACC, m)
ind = len(comb)
# The follwoing is performed automatically in gen_bin_resp() now
# m = (ind / 2 + 10) * numbetween
data = Numeric.zeros(3 * ind, 'F')
data[ind:2*ind] = comb
if showplots and not parallel:
Pgplot.plotxy(presto.spectralpower(data), color='red',
title='Data', labx='Fourier Frequency',
laby='Relative Power')
a = raw_input("Press enter to continue...")
Pgplot.nextplotpage(1)
# Perform the loops over the Keplerian parameters
for job in range(numjobs):
if parallel:
myjob = work[myid]
else:
myjob = work[job]
if myjob=='p':
Dd = Dp
psrref = psr.orb.p
if myjob=='x':
Dd = Dx
psrref = psr.orb.x
if myjob=='t':
Dd = Dt