gstools.tools

GStools subpackage providing miscellaneous tools.

Export

vtk_export(filename, pos, fields[, mesh_type])

Export a field to vtk.

vtk_export_structured(filename, pos, fields)

Export a field to vtk structured rectilinear grid file.

vtk_export_unstructured(filename, pos, fields)

Export a field to vtk unstructured grid file.

to_vtk(pos, fields[, mesh_type])

Create a VTK/PyVista grid.

to_vtk_structured(pos, fields)

Create a vtk structured rectilinear grid from a field.

to_vtk_unstructured(pos, fields)

Export a field to vtk structured rectilinear grid file.

Special functions

confidence_scaling([per])

Scaling of standard deviation to get the desired confidence interval.

inc_gamma(s, x)

Calculate the (upper) incomplete gamma function.

inc_gamma_low(s, x)

Calculate the lower incomplete gamma function.

exp_int(s, x)

Calculate the exponential integral \(E_s(x)\).

inc_beta(a, b, x)

Calculate the incomplete Beta function.

tplstable_cor(r, len_scale, hurst, alpha)

Calculate the correlation function of the TPLStable model.

tpl_exp_spec_dens(k, dim, len_scale, hurst)

Spectral density of the TPLExponential covariance model.

tpl_gau_spec_dens(k, dim, len_scale, hurst)

Spectral density of the TPLGaussian covariance model.

Geometric

rotated_main_axes(dim, angles)

Create list of the main axis defined by the given system rotations.

set_angles(dim, angles)

Set the angles for the given dimension.

set_anis(dim, anis)

Set the anisotropy ratios for the given dimension.

no_of_angles(dim)

Calculate number of rotation angles depending on the dimension.

rotation_planes(dim)

Get all 2D sub-planes for rotation.

givens_rotation(dim, plane, angle)

Givens rotation matrix in arbitrary dimensions.

matrix_rotate(dim, angles)

Create a matrix to rotate points to the target coordinate-system.

matrix_derotate(dim, angles)

Create a matrix to derotate points to the initial coordinate-system.

matrix_isotropify(dim, anis)

Create a stretching matrix to make things isotrope.

matrix_anisotropify(dim, anis)

Create a stretching matrix to make things anisotrope.

matrix_isometrize(dim, angles, anis)

Create a matrix to derotate points and make them isotrope.

matrix_anisometrize(dim, angles, anis)

Create a matrix to rotate points and make them anisotrope.

ang2dir(angles[, dtype, dim])

Convert n-D spherical coordinates to Euclidean direction vectors.

generate_grid(pos)

Generate grid from a structured position tuple.

generate_st_grid(pos, time[, mesh_type])

Generate spatio-temporal grid from a position tuple and time array.

Misc

EARTH_RADIUS

earth radius for WGS84 ellipsoid in km

KM_SCALE

earth radius for WGS84 ellipsoid in km

DEGREE_SCALE

radius for unit sphere in degree

RADIAN_SCALE

radius for unit sphere


gstools.tools.EARTH_RADIUS = 6371.0

earth radius for WGS84 ellipsoid in km

Type

float

gstools.tools.KM_SCALE = 6371.0

earth radius for WGS84 ellipsoid in km

Type

float

gstools.tools.DEGREE_SCALE = 57.29577951308232

radius for unit sphere in degree

Type

float

gstools.tools.RADIAN_SCALE = 1.0

radius for unit sphere

Type

float