geopyv.mesh¶
Module Contents¶
Classes¶
Mesh class for geopyv. |
|
Mesh base class to be used as a mixin. |
|
Initialisation of geopyv MeshResults class. |
- class geopyv.mesh.Mesh(*, f_img, g_img, target_nodes=1000, boundary=None, exclusions=[], size_lower_bound=1, size_upper_bound=1000)¶
Bases:
MeshBaseMesh class for geopyv.
- Parameters:
f_img (geopyv.image.Image, optional) – Reference image of geopyv.image.Image class, instantiated by
Image.g_img (geopyv.image.Image, optional) – Target image of geopyv.imageImage class, instantiated by
Image.target_nodes (int, optional) – Target number of nodes.
boundary (numpy.ndarray (Nx,Ny)) – Array of coordinates to define the mesh boundary.
exclusions (list, optional) – List of numpy.ndarray to define the mesh exclusions.
size_lower_bound (int, optional) – Lower bound on element size. Defaults to a value of 1.
upper_lower_bound (int, optional) – Lower bound on element size. Defaults to a value of 1000.
- solved¶
Boolean to indicate if the mesh has been solved.
- Type:
bool
- set_target_nodes(target_nodes)¶
Method to create a mesh with a target number of nodes.
- Parameters:
target_nodes (int) – Target number of nodes.
Note
This method can be used to update the number of target nodes.
It will generate a new initial mesh with the specified target number of nodes.
- solve(*, seed_coord=None, template=None, max_norm=0.001, max_iterations=15, order=1, tolerance=0.7, method='ICGN', adaptive_iterations=0, alpha=0.5, beta=2)¶
Method to solve for the mesh.
- Parameters:
max_norm (float, optional) – Exit criterion for norm of increment in warp function. Defaults to value of \(1 \cdot 10^{-3}\).
max_iterations (int, optional) – Exit criterion for number of Gauss-Newton iterations. Defaults to value of 50.
order (int) – Warp function order. Options are 1 and 2.
tolerance (float, optional) – Correlation coefficient tolerance. Defaults to a value of 0.7.
method (str) – Solution method. Options are FAGN and ICGN. Default is ICGN since it is faster.
adaptive_iterations (int, optional) – Number of mesh adaptivity iterations to perform. Defaults to a value of 0.
alpha (float, optional) – Mesh adaptivity control parameter. Defaults to a value of 0.5.
beta (float, optional) – Mesh adaptivity control parameter. Defaults to a value of 2.0.
- Returns:
solved – Boolean to indicate if the subset instance has been solved.
- Return type:
bool
- class geopyv.mesh.MeshBase¶
Mesh base class to be used as a mixin.
- contour(quantity='C_ZNCC', imshow=True, colorbar=True, ticks=None, mesh=False, alpha=0.75, levels=None, axis=None, xlim=None, ylim=None, show=True, block=True, save=None)¶
Method to plot the contours of a given measure.
- convergence(subset=None, quantity=None, show=True, block=True, save=None)¶
Method to plot the rate of convergence for the mesh.
- inspect(subset=None, show=True, block=True, save=None)¶
Method to show the mesh and associated subset quality metrics.
- quiver(scale=1, imshow=True, mesh=False, axis=None, xlim=None, ylim=None, show=True, block=True, save=None)¶
Method to plot a quiver plot of the displacements.