torx.analysis#

Functionality to perform advanced analysis such as tracing and statistics.

Modules

fourier

Fourier based analysis methods and signal processing.

lineouts

Lineouts for analysis of quantities not on a grid.

Classes

CriticalPoint

A located and classified critical point of a 2D scalar field.

CriticalPointType

Enumeration of critical point types based on Hessian character.

FastTracer

Fast tracing class using numbalsoda package.

MagneticFieldTracer

Allows to trace along a magnetic fieldline.

SplineInterpolator2D

Spline interpolation in 2D for structured or unstructured grids.

VectorFieldTracer

Allows to trace a given vector field.

Functions

avg

Calculate average/mean with parallelized algorithm.

bidirectional_toroidal_trace

Trace magnetic field lines in both toroidal directions.

bspline_basis_and_deriv1

Return (N, dN) of length k+1: B-spline basis and 1st derivatives at u.

drift_flux

Return the drift flux of a given 3D field through a lineout array [1]_.

eich_profile

Fit an Eich profile to heat flux data.

excess_kurtosis

Calculate excess/Fisher kurtosis with parallelized algorithm.

find_contours

Find the contours of an array at a given level.

find_critical_point

Find a critical point of $psi(R, Z)$ and classify it.

find_extremum

Find a local extremum of a 2D spline field.

fit_eich_profile

Use non-linear least-squares to fit an Eich profile to heat flux data.

flare_fieldline_trace

Trace a magnetic field line using the FLARE field-line tracer.

flux_surf_avg_3D

Return the flux-surface average of a given field on a 3D grid.

kurtosis

Calculate kurtosis with parallelized algorithm.

make_matrix_interp

Return a CSR matrix for interpolation.

polar_to_cart_chord

Convert from polar to cartesian coordinates.

rms

Calculate root-mean-square (rms) with parallelized algorithm.

skew

Calculate skew with parallelized algorithm.

smooth_1d_block

Smooth a 1D array by averaging over non-overlapping blocks.

smooth_1d_window

Smooth a 1D array with a sliding, overlapping averaging window.

smooth_2d_butterworth

Apply a low-pass 2D Butterworth Fourier filter.

smooth_2d_ellipsoid

Apply an ellipsoid filter in the Fourier domain to a 2D array.

smooth_2d_gaussian

Apply a Gaussian filter in the Fourier domain to a 2D array.

smooth_2d_uniform

Apply a uniform (box) filter in the Fourier domain to a 2D array.

smoothstep

Return a hermite smoothstep of a specific order.

statistics_ufunc

Apply xarray ufunc for a statistics function given by name.

std

Calculate standard deviation with parallelized algorithm.