Thanks for posting this Adam. I've been meening to add to this thread but just keep running out of time.
I just want to clarify, there are some reasons why I haven't promoted this script more or posted it here the PI forums. While it is deterministic it is not as stable as the LinearFit process. If the mean is smaller than the median of the image it can result in, well, garbage. Still, like Adam said, I have found it very useful for mosaics, since it only uses the overlapping area for determining the fit and keeps black pixels as black so that GMM is not affected. I also have it report the number of pixels clipped (low and high are separated) so you can check if something is going wrong and make adjustments (like use a different image as reference).
If you are having issues like this it's not going to hurt to try the script between the panels and see if it helps.
Regards,
David