pencil.read.timeseries

Contains the classes and methods to read the time series file.

Classes

TimeSeries

TimeSeries -- holds Pencil Code time series data.

Functions

ts(*args, **kwargs)

Wrapper for TimeSeries.read()

Module Contents

class pencil.read.timeseries.TimeSeries

Bases: object

TimeSeries – holds Pencil Code time series data.

Fill members with default values.

t = []
keys = []
read(file_name='time_series.dat', datadir='data', quiet=False, comment_char='#', sim=None, unique_clean=False, time_range=None, precision='f')
read(file_name=’time_series.dat’, datadir=’data’,

quiet=False, comment_char=’#’, sim=None, unique_clean=False)

Read Pencil Code time series data.

Parameters:
  • file_name (string) – Name of the time series file. For supernova data change file_name to ‘sn_series.dat’.

  • datadir (string) – Directory where the data is stored.

  • quiet (bool) – Flag for switching off output.

  • comment_char (string) – Comment character in the time series file.

  • sim (obj) – Simulation object from which to take the datadir.

  • unique_clean (bool) – Set True, np.unique is used to clean up the ts, e.g. remove errors at the end of crashed runs.

  • time_range (bool) – List of length 2, start and end time, of float with end time.

  • precision (str) – “f” (single,default) or “d” (double) or “h” (half).

pencil.read.timeseries.ts(*args, **kwargs)

Wrapper for TimeSeries.read()