Re: median filtering question -- masked arrays
Does anyone have a hint for applying a median filter to a masked 2D array in numarray?
I"ve been using the kludge of extracting a normal array with the masked data replaced by the overall median of the array and median filtering that (with the appropriate nd_image method). But this is a crude approximation and I"d like to do better -- preferably without coding my own median filter in C.
Masks are not supported by the filters in nd_image. It could be done, but that would be a considerable effort for a rather exotic feature, so that won't happen soon. In the near future I will however add support for generic filters where you can provide your own filter function to be executed at each point. That may make it easy enough to roll your own function. Cheers, Peter
participants (1)
-
Peter Verveer