upxo.jpops.jpops module
Junction-point detection on grain-boundary segment maps.
findJP collects coordinates shared by two or more boundary segments
per grain; separate_junctions_by_order bins them by junction order
(T-junction, quadruple point, …). Used with 2D MC GB pipelines
(upxo.gbops.mcgb2dops).
Import:
import upxo.jpops.jpops as jpOps
-
upxo.jpops.jpops.findJP(segments)[source]
Find multi-segment junction points for each central grain.
- Parameters:
segments (dict) – cg → {neighbour_gid: Nx2 coordinate array} of shared boundary
points between central grain cg and each neighbour.
- Returns:
cg → array of [x, y, order] where order is how many segments
meet at that point (plus bookkeeping offset used historically).
- Return type:
dict
-
upxo.jpops.jpops.separate_junctions_by_order(junctions, include_empty=True)[source]
Partition junction points by order (2, 3, 4, …).
- Parameters:
junctions (dict) – Output of findJP() (or same shape).
include_empty (bool, optional) – If True, include empty order keys between min and max order.
- Returns:
order → {gid: Mx2 coordinates for junctions of that order}.
- Return type:
dict