Source code for pyImagingMSpec.smoothing
__author__ = 'palmer'
# every method in smoothing should accept (im,**args)
[docs]def median(im, **kwargs):
from scipy import ndimage
im = ndimage.filters.median_filter(im,**kwargs)
return im
[docs]def hot_spot_removal(im, q=99.):
import numpy as np
xic_q = np.percentile(im, q)
im[im > xic_q] = xic_q
return im