pytc.df.pivots.grad_columns

pytc.df.pivots.grad_columns(phi_weighted, grad_phi_weighted, indices)[source]

Exact requested columns of the weighted density-gradient metric.

The metric convention is K_rs = (phi_r.T phi_s) * sum_c(grad_phi_r,c.T grad_phi_s,c). There is no normalization beyond the weights already included in the two factors. The component-wise sum order matches the historical selector.