ENH: ndimage: gaussian filter truncation #2767

Merged
merged 3 commits into from Sep 9, 2013

4 participants

@WarrenWeckesser

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.

@rgommers
SciPy member
  • 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 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).
19eff1c
@thouis 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().
f6c8d9d
@WarrenWeckesser WarrenWeckesser TST: ndimage: add more tests in test_gaussian_truncate() cf3aa17
@WarrenWeckesser

Rebased.

@WarrenWeckesser

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

@pv pv referenced this pull request Sep 1, 2013
Closed

Gaussian filter truncation #239

@thouis

Looks good to me.

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

1 check passed

Details default The Travis CI build passed
@pv
SciPy member
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