alignment.alignment_metrics
alignment.alignment_metrics(
true_xyz,
est_xyz,
brain_atlas,
*,
p_good=None,
valid=None,
threshold=CONFIDENCE_THRESHOLD,
)Per-probe scores of estimated channel positions against the reference positions.
Channels count when both positions are finite and non-zero (and valid when given). The region accuracies are over channels whose reference position is inside the brain; an estimate outside the brain counts as wrong. Distances are Euclidean, per channel. With p_good the same scores are also given for the high-confidence (p_good >= threshold) and low-confidence channels, with the high-confidence fraction.
Returns: dict: cosmos_acc, beryl_acc, mean_distance_um, median_distance_um, n_channels, and the *_high_conf / *_low_conf variants and high_conf_fraction when p_good is given.