ENH: ndimage: gaussian filter truncation #2767

merged 3 commits into from Sep 9, 2013


None yet

4 participants


This is an extension of #239
I added a commit that strengthens the existing test, and adds tests for more of the affected functions.

There are two API enhancements in this PR:

  • Add the truncate argument to gaussian_filter and gaussian_filter1d. This controls the size of the filter, measured in terms of the standard deviations of the gaussian.
  • Add **kwargs to the signature of gaussian_gradient_magnitude and gaussian_laplace. Any additional keyword arguments passed to these functions are passed on to gaussian_filter. This allows these functions to use the truncate argument.

This API looks reasonable to me. If there are no objections, I'd like to get this into 0.13.

  • can you rebase?
  • a bit late for 0.13.x, I'd rather leave it till 0.14
  • @thouis can you review the last commit?
thouis and others added some commits Jun 5, 2012
@thouis @WarrenWeckesser thouis ENH: expose control truncation of ndimage.gaussian_filter().
This change gives the user control over the size at which the Gaussian filter is truncated,
with default behavior to truncate at 4 standard deviations (the previous fixed value).
@thouis @WarrenWeckesser thouis ENH: Pass extra keyword arguments to gaussian_laplace() and gaussian_…
…gradient_magnitude() to gaussian_filter()

This change allows control over the truncation radius of the gaussian filter used in
gaussian_laplace() and gaussian_gradient_magnitude().
@WarrenWeckesser WarrenWeckesser TST: ndimage: add more tests in test_gaussian_truncate() cf3aa17



@roderikk is probably interested in this too, since he created the original patch.

@pv pv referenced this pull request Sep 1, 2013

Gaussian filter truncation #239

thouis commented Sep 1, 2013

Looks good to me.

@pv pv merged commit 56db4ed into scipy:master Sep 9, 2013

1 check passed

default The Travis CI build passed
pv commented Sep 9, 2013

LGTM too, merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment