pencil.export.pc2vtk ==================== .. py:module:: pencil.export.pc2vtk .. autoapi-nested-parse:: Contains the routines for converting PencilCode data data into vtk format. Functions --------- .. autoapisummary:: pencil.export.pc2vtk.var2vtk pencil.export.pc2vtk.slices2vtk Module Contents --------------- .. py:function:: var2vtk(var_file='var.dat', datadir='data', proc=-1, variables=None, b_ext=False, magic=[], destination='work', quiet=True, trimall=True, ti=-1, tf=-1) Convert data from PencilCode format to vtk. call signature:: var2vtk(var_file='', datadir='data', proc=-1, variables='', b_ext=False, destination='work', quiet=True, trimall=True, ti=-1, tf=-1) Read *var_file* and convert its content into vtk format. Write the result in *destination*. :keyword \*var_file*: The original var_file. :keyword \*datadir*: Directory where the data is stored. :keyword \*proc*: Processor which should be read. Set to -1 for all processors. :keyword \*variables*: List of variables which should be written. If None all. :keyword \*b_ext*: Add the external magnetic field. :keyword \*destination*: Destination file. :keyword \*quiet*: Keep quiet when reading the var files. :keyword \*trimall*: Trim the data cube to exclude ghost zones. :keyword \*ti, tf*: Start and end index for animation. Leave negative for no animation. Overwrites variable var_file. .. py:function:: slices2vtk(field='', extension='', datadir='data', destination='slices', proc=-1) Convert slices from PencilCode format to vtk. call signature:: slices2vtk(field='', extension='', datadir='data', destination='slices', proc=-1) Read slice files specified by *variables* and convert them into vtk format for the specified extensions. Write the result in *destination*. NB: You need to have called src/read_videofiles.x before using this script. :keyword \*field*: All allowed fields which can be written as slice files, e.g. b2, uu1, lnrho, ... See the pencil code manual for more (chapter: "List of parameters for `video.in'"). :keyword \*extension*: List of slice positions. :keyword \*datadir*: Directory where the data is stored. :keyword \*destination*: Destination files. :keyword \*proc*: Processor which should be read. Set to -1 for all processors.