pencil.tool_kit.field_skeleton
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
Contains the position of the null points and the finding routine. |
|
Contains the separatrix layers and methods to find them. |
|
Contains the spines of the null points and their finding routines. |
Module Contents
- class pencil.tool_kit.field_skeleton.NullPoint
Bases:
objectContains the position of the null points and the finding routine.
Fill members with default values.
- nulls = None
- eigen_values = None
- eigen_vectors = None
- sign_trace = None
- fan_vectors = None
- normals = None
- find_nullpoints(var, field)
find_nullpoints(var, field)
Find the null points to the field ‘field’ with information from ‘var’.
- Parameters:
var (obj) – The var object from the read.var routine.
field (string) – The vector field name.
- 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.
- Parameters:
datadir (string) – Target data directory.
file_name (string) – Target file name.
binary (bool) – Write file in binary or ASCII format.
- read_vtk(datadir='data', file_name='nulls.vtk')
read_vtk(datadir=’data’, file_name=’nulls.vtk’)
Read the null point from a vtk file.
- Parameters:
datadir (string) – Origin data directory.
file_name (string) – Origin file name.
- class pencil.tool_kit.field_skeleton.Separatrix
Bases:
objectContains the separatrix layers and methods to find them.
Fill members with default values.
- lines = []
- eigen_values = []
- eigen_vectors = []
- sign_trace = []
- fan_vectors = []
- normals = []
- separatrices = []
- connectivity = []
- 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’.
- Parameters:
var (obj) – The var object from the read_var routine.
field (string) – The vector field.
null_point (obj) – NullPoint object containing the magnetic null points.
delta (float) – Step length for the field line tracing.
iter_max (int) – Maximum iteration steps for the fiel line tracing.
ring_density (float) – Density of the tracer rings.
- 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.
- Parameters:
datadir (string) – Target data directory.
file_name (string) – Target file name.
binary (bool) – Write file in binary or ASCII format.
- read_vtk(datadir='data', file_name='separatrices.vtk')
read_vtk(datadir=’data’, file_name=’separatrices.vtk’)
Read the separatrices from a vtk file.
- Parameters:
datadir (string) – Origin data directory.
file_name (string) – Origin file name.
- class pencil.tool_kit.field_skeleton.Spine
Bases:
objectContains the spines of the null points and their finding routines.
Fill members with default values.
- spines = []
- 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’.
- 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.
- Parameters:
datadir (string) – Target data directory.
file_name (string) – Target file name.
binary (bool) – Write file in binary or ASCII format.
- read_vtk(datadir='data', file_name='spines.vtk')
read_vtk(datadir=’data’, file_name=’spines.vtk’)
Read the spines from a vtk file.
- Parameters:
datadir (string) – Target data directory.
file_name (string) – Target file name.