Unfolding.coordsMethod
coords(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.error_distsMethod
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 the points before unfolding.
  • transf_coords - coordinate matrix of the points after unfolding.
  • nneigh - number of nearest neighbors used to make the validations.
Unfolding.error_idsMethod
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 the points before unfolding.
  • transf_coords - coordinate matrix 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.
Unfolding.getreferenceMethod
getreference(blocks; axis=["X","Y","Z"])

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

Parameters:

  • blocks - coordinate matrix of the regular blocks centroids.
  • axis - axis or list of axis that will be scanned to extract reference points. Defaults to ["X","Y","Z"]. Accepts strings and symbols.
Unfolding.landmark_isomapMethod
landmark_isomap(coords; search="knn", neighval=16, anchors=1500)

This function runs Landmark Isomap at 3-D points and returns a coordinate matrix with the unfolded points.

Parameters:

  • coords - coordinate matrix of the reference points.
  • search - search type to build neighbors graph for Isomap ("knn" for k-nearest neighbor or "inrange" for radius search)
  • neighval - number of neighbors (for search="knn") or radius distance (for search="inrange") to build neighbors graph for Isomap.
  • anchors - number of anchors/landmark points for the dimensionality reduction.
Unfolding.to_csvMethod
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.to_vtkFunction
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.unfoldFunction
unfold(ref_pts, domain, samps=nothing; search="knn", neighval=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 with the unfolded domain points. Or a tuple of two matrices (unfolded domain and unfolded samples points).

Parameters:

  • ref_pts - coordinate matrix with the reference points for unfolding
  • domain - coordinate matrix with domain points for unfolding (blocks or mesh points)
  • samps - coordinate matrix of the sample points (optional)
  • search - search type to build neighbors graph for Isomap ("knn" for k-nearest neighbor or "inrange" for radius search).
  • neighval - number of neighbors (for search="knn") or radius distance (for 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.