Get a mapping between ico surfaces.
(fro, to)
| 497 | |
| 498 | |
| 499 | def _get_ico_map(fro, to): |
| 500 | """Get a mapping between ico surfaces.""" |
| 501 | nearest, dists = _compute_nearest(fro["rr"], to["rr"], return_dists=True) |
| 502 | n_bads = (dists > 5e-3).sum() |
| 503 | if n_bads > 0: |
| 504 | raise RuntimeError(f"No matching vertex for {n_bads} destination vertices") |
| 505 | return nearest |
| 506 | |
| 507 | |
| 508 | def _order_surfaces(surfs): |