pencil.read.allslices ===================== .. py:module:: pencil.read.allslices .. autoapi-nested-parse:: Contains the classes and methods to read slice files. Classes ------- .. autoapisummary:: pencil.read.allslices.SliceSeries Functions --------- .. autoapisummary:: pencil.read.allslices.slices Module Contents --------------- .. py:class:: SliceSeries Bases: :py:obj:`object` SliceSeries -- holds Pencil Code slices data and methods. Fill members with default values. .. py:attribute:: t .. py:method:: keys() .. py:method:: read(field='', extension='', datadir='data', proc=-1, old_file=False, precision='f', iter_list=list(), quiet=True, tstart=0, tend=None, downsample=1) read(field='', extension='', datadir='data', proc=-1, old_file=False, precision='f', iter_list=list(), quiet=True, tstart=0, tend=None, downsample=1) Read Pencil Code slice data. :param field: Name of the field(s) to be read. :type field: string or list of strings :param extension: Specifies the plane slice(s). :type extension: string or list of strings :param datadir: Directory where the data is stored. :type datadir: string :param proc: Processor to be read. If -1 read all and assemble to one array. :type proc: int :param old_file: Flag for reading old file format. :type old_file: bool :param precision: Precision of the data. Either float 'f' or double 'd'. :type precision: string :param iter_list: Iteration indices for which to sample the slices. :type iter_list: list :param quiet: Flag for switching off output. :type quiet: bool :param tstart: Start time interval from which to sample slices. :type tstart: float :param tend: End time interval from which to sample slices. :type tend: float :param downsample: Sample rate to reduce slice array size. :type downsample: integer :rtype: Class containing the fields and slices as attributes. .. rubric:: Notes - Use the attribute keys to get a list of attributes - self.coordinate is the 1-based index of the slice including ghost zones at each output time - self.position is the coordinate value of the slice at each output time .. rubric:: Examples >>> vsl = pc.read.slices() >>> vsl.keys() t xy xy2 xz yz position coordinate .. py:function:: slices(*args, **kwargs) Wrapper for :py:meth:`SliceSeries.read`