當前位置: 首頁>>代碼示例>>Python>>正文


Python Pgplot.nextplotpage方法代碼示例

本文整理匯總了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()
開發者ID:kernsuite-debian,項目名稱:presto,代碼行數:31,代碼來源:__init__.py

示例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
開發者ID:MilesCranmer,項目名稱:presto,代碼行數:33,代碼來源:montebinopt.py


注:本文中的Pgplot.nextplotpage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。