[Scipy-tickets] [SciPy] #1155: ndimage.filters and ndimage.interpolation is incompatible with masked_array

SciPy Trac scipy-tickets@scipy....
Mon Nov 26 04:26:21 CST 2012


#1155: ndimage.filters and ndimage.interpolation is incompatible with masked_array
-----------------------------------+----------------------------------------
 Reporter:  sam                    |       Owner:  somebody   
     Type:  defect                 |      Status:  new        
 Priority:  high                   |   Milestone:  Unscheduled
Component:  scipy.ndimage          |     Version:  0.11.0     
 Keywords:  ndimage, masked_array  |  
-----------------------------------+----------------------------------------

Comment(by dshean):

 Looks like the astropy nddata convolve has support for NaN.  I would think
 this functionality could be integrated into scipy.ndimage without too much
 trouble.

 http://astropy.readthedocs.org/en/latest/nddata/convolution.html

 http://astropy.readthedocs.org/en/latest/_modules/astropy/nddata/convolution/convolve.html

     This routine differs from `scipy.ndimage.filters.convolve` because
     it includes a special treatment for `NaN` values. Rather than
     including `NaNs` in the convolution calculation, which causes large
     `NaN` holes in the convolved image, `NaN` values are replaced with
     interpolated values using the kernel as an interpolation function.

     interpolate_nan : bool
         The convolution will be re-weighted assuming NAN values are meant
 to be
         ignored, not treated as zero.  If this is off, all NaN values will
 be
         treated as zero.

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1155#comment:3>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list