Module: gridutil¶
7 Functions¶
- hexrd.gridutil.cellIndices(edges, points_1d)[source]¶
get indices in a 1-d regular grid.
edges are just that:
above the deltas are + and the index for the point is 1
here the deltas are - and the index for the point is 2
- can handle grids with +/- deltas
- be careful when using with a cyclical angular array! edges and points must be mapped to the same branch cut, and abs(edges[0] - edges[-1]) = 2*pi
- hexrd.gridutil.cellConnectivity(m, n, p=1, origin='ul')[source]¶
p x m x n (layers x rows x cols)
origin can be upper left – ‘ul’ <default> or lower left – ‘ll’
choice will affect handedness (cw or ccw)
- hexrd.gridutil.cellCentroids(crd, con)[source]¶
con.shape = (nele, 4) crd.shape = (ncrd, 2)
con.shape = (nele, 8) crd.shape = (ncrd, 3)