astropy / specutils

An Astropy coordinated package for astronomical spectroscopy. Maintainers: @nmearl @rosteen @keflavich @eteq
http://specutils.readthedocs.io/en/latest/
161 stars 124 forks source link

smoothing functions do not use **kwargs for the astropy smoothing work #1147

Open teuben opened 1 week ago

teuben commented 1 week ago

I'd like to use specutils.manipulation.gaussian_smooth, which calls astropy's smoothing functions, but specutils has a fixed API, does not pass on any possible **kwargs. Is this by design?

My reason is I'd like to get the boundary='expand' behavior on the edge, instead of the default boundary='fill'.

This particular case I was able to hack myself, but perhaps there are unintended consequences by opening this API up.

I can otherwise submit a PR.

teuben commented 1 week ago

In the upstream code (dysh) where we encountered this problem, we have switched to calls astropy's functions with boundary='expand' and so this issue has gone away for us. Yet, one could argue this is a problem here, unless there was a (design) reason not to pass anything ikn **kwargs.