A reasonable approach for the hindex is to pre-quantify the profiles somehow.
the profiles could be abstractly densified, so that the image becomes a classification and there's only a handful of actual profiles, then findInterval will be run in a vectorized way for more particles