pyvale.strain.strainimport module

import_2d(data, binary=False, layout='matrix', delimiter=',')[source]

Import 2D strain result data from text or binary files.

The importer accepts the legacy 20-column strain format and the 3D-aware 23-column format that appends x_mm, y_mm and z_mm after the strain-window pixel coordinates.

import_3d(data, binary=False, layout='matrix', delimiter=',')[source]

Import 3D-aware strain result data from text or binary files.

Returned StrainResults include x_mm, y_mm and z_mm arrays for the strain-window centre in the cam0 coordinate system.

read_binary(file, delimiter, require_coords=None)[source]

Read a binary strain result file.

Supports legacy rows with window_x, window_y and 18 doubles, plus new 3D-aware rows with x_mm, y_mm and z_mm before the 18 tensor values.

read_text(file, delimiter)[source]

Read a text strain result file.

Expected formats are either 20 columns:

window_x, window_y, def_grad_00..def_grad_22, eps_00..eps_22

or 23 columns with x_mm, y_mm and z_mm inserted after window_y.