I appended 2 images, which illustrate my issue.
After cross correlating some of my data I receive such images. The left image has a reasonable maximum, which is useful. However, the uncertainty of the maximum in the right image is too large and yields undesired results sometimes.
I don't necessarily need code to fix this problem. Maybe anyone has a clever method to filter out images such as the right one above. I tried counting the pixels where the intensity is greater than 90% of the maximum value, for example, and discarding images with a relatively high number. However, this did not work well.
I have also tried to find the standard deviation, mean, etc., but so far I have not found the ultimate way to solve my problem

