Set DMT scalar field values as the Frobenius norm of the total derivative
Source:R/utils_dmt.R
dmt_set_f.RdSet DMT scalar field values as the Frobenius norm of the total derivative
Arguments
- dmt
A list containing the mesh data structures:
ptsis aNx2+Mdata table with columnsXandYcontaining the coordinates of cells and additional metadata.trisis aFx4data table containing the X,Y coordinates of each triangle's centroid in the first two columns, and area and largest height of each triangle in the last two columns.edgesis aEx14data table with columnsfrom_pt,to_pt,from_tri,to_tri,x0_pt,x1_pt,y0_pt,y1_pt,x0_tri,x1_tri,y0_tri,y1_tri,length_pt,length_tri. If only one triangle uses an edge, then thefrom_tri,x0_tri, andy0_trifields will contain NaN values.tri_to_ptis aFxNsparse matrix with value 1 at (i,j) if triangle i uses point j as a vertex.udv_cellscontains cell embeddings stored inembeddings(aNxDmatrix withD-dimensional embeddings for each cell) andloadings(aGxDmatrix with gene loadings for each latent variable).
- field
A gradient field with the compressed representations
pts_svd,tris_svd,edges_pts_svd, andedges_tris_svd. Each of these is aNx6matrix with the following columns for each location:dx_grad,dy_grad: x,y directions of unit vector in the direction of greatest change (first singular vector).dx_ortho,dy_ortho: x,y directions of unit vector orthogonal to the direction of greatest change (second singular vector).len_grad,len_ortho: Magnitude of directional derivative in the gradient and orthogonal directions (singular values).