nanshe/advanced_image_processing.py: Hacky solution to avoid small regions of zeros.