Unfolding.coordinate_matrixMethod
coordinate_matrix(X; columns=nothing)

Reshape and filter dataframe or matrix and return the matrix in right format for unfolding.

Parameters:

  • X - the input Dataframe or matrix with the coordinates.
  • columns - if the input is a Dataframe with more than 3 columns, the column names of the three coordinates must be informed here (e.g. ["X","Y","Z"]).
Unfolding.data_to_csvMethod
data_to_csv(input_matrix, outname, colnames)

Export the input_matrix as CSV table file named outname.csv. The column names are passed in colnames array.

Unfolding.data_to_vtkFunction
data_to_vtk(coords, outname, extra_props)

Export the input_matrix as VTK points named outname.vtu. Optionally, extra properties are passed via an array of tuples extra_props, where the first item of the tuple is the column name and the second is an array with the property values.

Unfolding.landmark_isomapMethod
landmark_isomap(input_coords; isomap_search="knn", isomap_neigh=16, anchors=1500)

This function runs Landmark Isomap at 3-D points and returns a coordinate matrix of shape (3,:) with the unfolded points (Z=0 for all points).

Parameters:

  • input_coords - coordinate matrix of shape (3,:) of the reference points.
  • isomap_search - search type to build neighbors graph for Isomap ("knn" for k-nearest neighbor or "inrange" for radius search)
  • isomap_neigh - number of neighbors (for isomap_search="knn") or radius distance (for isomap_search="inrange") to build neighbors graph for Isomap.
  • anchors - number of anchors/landmark points for the dimensionality reduction.
Unfolding.ref_surface_from_blocksMethod
ref_surface_from_blocks(blocks; axis=["X","Y","Z"])

Extract the mid-surface points that split the informed block model in two. Returns a coordinate matrix (3,:) with the reference points for unfolding.

Parameters:

  • blocks - coordinate matrix (3,:) of the regular blocks centroids.
  • axis - a string or list of strings informing the axes that will be scanned to extract reference points. Defaults to ["X","Y","Z"].
Unfolding.unfoldFunction
unfold(ref_pts, input_domain, input_samps=nothing;
isomap_search="knn",isomap_neigh=16, seed=1234567890,
max_error=5, neighs_to_valid=16, nb_chunks=4, reftol=0.01)

Unfold the input points based on the reference points informed. Returns a coordinate matrix (3,:) with the unfolded domain points. Or a tuple of two matrices (unfolded domain and unfolded samples points).

Parameters:

  • ref_pts - coordinate matrix of shape (3,:) with the reference points for unfolding
  • input_domain - coordinate matrix of shape (3,:) with domain points for unfolding (blocks or mesh points)
  • input_samps - coordinate matrix of shape (3,:) of the sample points (optional)
  • isomap_search - search type to build neighbors graph for Isomap ("knn" for k-nearest neighbor or "inrange" for radius search).
  • isomap_neigh - number of neighbors (for isomap_search="knn") or radius distance (for isomap_search="inrange") to build neighbors graph for Isomap.
  • seed - seed for random values used during the process.
  • neighs_to_valid - number of nearest neighbors to use for validations during the process.
  • max_error - the maximum accepted absolute difference of the distances for the closest neighbors after deformation.
  • nb_chunks - number of rounds of optimization.
Unfolding.unfold_error_distsMethod
unfold_error_dists(true_coords, transf_coords; nneigh=16)

Unfolding distorts the original distances between neighbor points. This function output the difference of the expected distance for each pair analyzed. Can be used as input to boxplot to verify distortions.

Parameters:

  • true_coords - coordinate matrix of shape (3,:) of the points before unfolding.
  • transf_coords - coordinate matrix of shape (3,:) of the points after unfolding.
  • nneigh - number of nearest neighbors used to make the validations.
Unfolding.unfold_error_idsMethod
unfold_error_ids(true_coords, transf_coords; nneigh=16, max_error=5)

Unfolding distorts the original distances between neighbor points. This function give the IDs of the points above and below the max_error threshold. Returns a tuple of two arrays. The first array with the ID of points that passed the tests. The second array with the ID of points that failed during the tests.

Parameters:

  • true_coords - coordinate matrix of shape (3,:) of the points before unfolding.
  • transf_coords - coordinate matrix of shape (3,:) of the points after unfolding.
  • nneigh - number of nearest neighbors used to make the validations.
  • max_error - the maximum accepted absolute difference of the distances for the closest neighbors after unfolding.