pencil.tool_kit.field_skeleton ============================== .. py:module:: pencil.tool_kit.field_skeleton .. autoapi-nested-parse:: Classes for determining the structure of the field's skeleton, i.e. null points, separatrix layers and separators using the trilinear method by Haynes-Parnell-2007-14-8-PhysPlasm (http://dx.doi.org/10.1063/1.2756751) and Haynes-Parnell-2010-17-9-PhysPlasm (http://dx.doi.org/10.1063/1.3467499). Classes ------- .. autoapisummary:: pencil.tool_kit.field_skeleton.NullPoint pencil.tool_kit.field_skeleton.Separatrix pencil.tool_kit.field_skeleton.Spine Module Contents --------------- .. py:class:: NullPoint Bases: :py:obj:`object` Contains the position of the null points and the finding routine. Fill members with default values. .. py:attribute:: nulls :value: None .. py:attribute:: eigen_values :value: None .. py:attribute:: eigen_vectors :value: None .. py:attribute:: sign_trace :value: None .. py:attribute:: fan_vectors :value: None .. py:attribute:: normals :value: None .. py:method:: find_nullpoints(var, field) find_nullpoints(var, field) Find the null points to the field 'field' with information from 'var'. :param var: The var object from the read.var routine. :type var: obj :param field: The vector field name. :type field: string .. py:method:: write_vtk(datadir='data', file_name='nulls.vtk', binary=False) write_vtk(datadir='data', file_name='nulls.vtk', binary=False) Write the null point into a vtk file. :param datadir: Target data directory. :type datadir: string :param file_name: Target file name. :type file_name: string :param binary: Write file in binary or ASCII format. :type binary: bool .. py:method:: read_vtk(datadir='data', file_name='nulls.vtk') read_vtk(datadir='data', file_name='nulls.vtk') Read the null point from a vtk file. :param datadir: Origin data directory. :type datadir: string :param file_name: Origin file name. :type file_name: string .. py:class:: Separatrix Bases: :py:obj:`object` Contains the separatrix layers and methods to find them. Fill members with default values. .. py:attribute:: lines :value: [] .. py:attribute:: eigen_values :value: [] .. py:attribute:: eigen_vectors :value: [] .. py:attribute:: sign_trace :value: [] .. py:attribute:: fan_vectors :value: [] .. py:attribute:: normals :value: [] .. py:attribute:: separatrices :value: [] .. py:attribute:: connectivity :value: [] .. py:method:: find_separatrices(var, field, null_point, delta=0.1, iter_max=100, ring_density=8) find_separatrices(var, field, null_point, delta=0.1, iter_max=100, ring_density=8) Find the separatrices to the field 'field' with information from 'var'. :param var: The var object from the read_var routine. :type var: obj :param field: The vector field. :type field: string :param null_point: NullPoint object containing the magnetic null points. :type null_point: obj :param delta: Step length for the field line tracing. :type delta: float :param iter_max: Maximum iteration steps for the fiel line tracing. :type iter_max: int :param ring_density: Density of the tracer rings. :type ring_density: float .. py:method:: write_vtk(datadir='data', file_name='separatrices.vtk', binary=False) write_vtk(datadir='data', file_name='separatrices.vtk', binary=False) Write the separatrices into a vtk file. :param datadir: Target data directory. :type datadir: string :param file_name: Target file name. :type file_name: string :param binary: Write file in binary or ASCII format. :type binary: bool .. py:method:: read_vtk(datadir='data', file_name='separatrices.vtk') read_vtk(datadir='data', file_name='separatrices.vtk') Read the separatrices from a vtk file. :param datadir: Origin data directory. :type datadir: string :param file_name: Origin file name. :type file_name: string .. py:class:: Spine Bases: :py:obj:`object` Contains the spines of the null points and their finding routines. Fill members with default values. .. py:attribute:: spines :value: [] .. py:method:: find_spines(var, field, null_point, delta=0.1, iter_max=100) find_spines(var, field, null_point, delta=0.1, iter_max=100) Find the spines to the field 'field' with information from 'var'. :param var: The var object from the read_var routine. :type var: obj :param field: The vector field. :type field: string :param null_point: NullPoint object containing the magnetic null points. :type null_point: obj :param delta: Step length for the field line tracing. :type delta: float :param iter_max: Maximum iteration steps for the fiel line tracing. :type iter_max: int .. py:method:: write_vtk(datadir='data', file_name='spines.vtk', binary=False) write_vtk(datadir='data', file_name='spines.vtk', binary=False) Write the spines into a vtk file. :param datadir: Target data directory. :type datadir: string :param file_name: Target file name. :type file_name: string :param binary: Write file in binary or ASCII format. :type binary: bool .. py:method:: read_vtk(datadir='data', file_name='spines.vtk') read_vtk(datadir='data', file_name='spines.vtk') Read the spines from a vtk file. :param datadir: Target data directory. :type datadir: string :param file_name: Target file name. :type file_name: string