예제 #1
0
def read_post(filename = 'post_evaluation.dat', datadir = 'data',
                double = 0, quiet = 1, comment_char = '#'):
    """
    Read the post processed diagnostic variables.

    call signature::
    
      read_post(filename = 'post_evaluation.dat', datadir = 'data', double = 0, quiet = 0, comment_char = '#')
    
    Read the post processed diagnostic variables from 'data/post_evaluation.dat.
    Return an object with the variables.
    
    Keyword arguments:
      
      *filename*:
        Name of the post evaluation file.
        
      *datadir*:
        Name of the data directory.
        
      *double*:
        Not used yet (see the read_ts options).
        
      *quiet*:
        If True do not show how many lines are being read.
        
      *comment_char*:
        The comment character.
        
    """

    return pc.read_ts(filename = filename, datadir = datadir,
                 double = double, quiet = quiet, print_std = 0, plot_data = False, comment_char = comment_char)
예제 #2
0
import pencil_old as pc
import math
import os
import sys
import traceback

cos = np.cos
sin = np.sin

run_number = 1850

# quick set up for intervals of time
# use Orbit_Len to properly get the length of the interval
# for Orbits from the time series

ts = pc.read_ts()
t = ts.t
time = t / 2 * math.pi
len_t = len(ts.t)

Max_Orbits = np.round((time[len(time) - 1]))

n = 1
dn = 1

i = 0
di = 1

Orbit_Len = []

while i <= len(time) - 1: