ElementData(value, name='', mesh=None)¶
Data (scalar, vector or tensor) defined in mesh elements.
value (ndarray) –
- Value of field in elements. Should have the shape
(n_elm,) or (n_elm, 1) for scalar fields
(n_elm, 3) for vector fields
(n_elm, 9) for tensors
field_name (str (optional)) – name of field. Default: ‘’
mesh (simnibs.msh.Msh (optional)) – Mesh structure where the field is defined. Required for many methods
Value of field in elements
name of field
index of elements
number of data points
number of dimensions per data point (1 for scalars, 3 for vectors)
__init__(value, name='', mesh=None)¶
Initialize self. See help(type(self)) for accurate signature.
__init__(value[, name, mesh])
Appends this ElementData fields to a file
Converts the current ElementData instance to NodaData For more information see the elm_data2node_data method
In-place Assigns field value at triangle as the same as the one of the tetrahedra with a similar tag to it.
Calculates the flux of a vectorial field
Transforms an ElementData field into a NodeData field using Superconvergent patch recovery For volumetric data.
from_data_grid(mesh, data_grid, affine[, …])
Defines an ElementData field form a mesh and gridded data
Caluclates field focality as the area/volume of the mesh experiencing a field norm of above (cut_off% of the field peak).
Get percentiles of field (or field norm, if a vector field)
interpolate_scattered(points[, out_fill, …])
Interpolates the ElementData into the points by finding the element containing the point and assigning the value in it
interpolate_to_grid(n_voxels, affine[, …])
Interpolates the ElementData into a grid.
interpolate_to_surface(surface[, out_fill, …])
Interpolates the field in the nodes of a given surface The interpolation occurs in the tetrahedra!
Calculates V*w/sum(w) Where V is the norm of the field, and w is the volume or area of the mesh where the field is defined.
Calculate the norm of the field
Reads a row of an hdf5 data matrix and store it as Data
summary([percentiles, focality_cutoffs, units])
Creates a text summaty of the field
to_deformed_grid(warp, reference[, out, …])
Interpolates field to a grid and apply non-linear interpolation
to_nifti(n_voxels, affine[, fn, units, …])
Transforms the data in a nifti file
view_options([v_range, percentile, visible, …])
Generates a View object with visualization opions
Writes this ElementData fields to a file with field information only This file needs to be merged with a mesh for visualization
Writes the field to an hdf5 file
Element numbers (1, …, nr)
Same as elm_number
Number of data entries
Number of field components
NodeData of ElementData