-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gaussian smooth: expose spatial smoothing in API #1699
Conversation
f7776d4
to
ced1443
Compare
Codecov ReportBase: 87.17% // Head: 87.20% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1699 +/- ##
==========================================
+ Coverage 87.17% 87.20% +0.02%
==========================================
Files 95 95
Lines 9936 9939 +3
==========================================
+ Hits 8662 8667 +5
+ Misses 1274 1272 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
If I understand correctly
and
do the same thing, but the first updates the entries in the GUI and shows the result, while the second is more compact but does not update the GUI or shows the result there. |
Ok, it is easier to re-introduce later than to hide later, so I removed the I'm also not sure I love the name of the So..... how would everyone feel about the following additional changes:
|
Can we instead make this implicit in the API: |
I am not sure collapse.function is any less ambiguous than collapse.method |
Code wise, LGTM, but looks like POs have concerns about the API, so I'll withhold technical review until that is settled. |
@pllim - I think the API discussion is settled, at least for now (please anyone correct me if I'm wrong, but I think the general suggestion was to stick with |
the output label now exists and shows "overwrite" on the button
* to be more consistent with other plugins (especially collapse)
* and to have description change depending on whether spatial smoothing is available
a0b7484
to
83a3e73
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code-wise LGTM. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good from PO perspective.
Description
This pull request exposes spatial (in addition to spectral) smoothing in the user API for the gaussian smooth plugin, introduced in #1401, for cubeviz.
This PR renames the
apply_spectral_smooth
tospectral_smooth
, and exposes two new methods:apply_smooth(add_data=True)
smooth(add_data=True)
(which listens to themode
and the results label component)spatial_smooth()
(only exposed for cubeviz, just returns a spectrum1D object)spectral_smooth()
(just returns a spectrum1D object)In doing so, this also renames the previous (non-public)
apply_spatial_convolution
tospatial_smooth
.I decided to expose the individual methods separately so that it isn't necessary to set all the plugin options for the mode if you just want to access the results in the plugin, but if anyone thinks that is too redundant, I'm also happy to hidespatial_smooth
andspectral_smooth
and instead require the user to setplugin.mode
and then callplugin.apply_smooth(add_data=False)
.Since #1401 has not been included in a release, this does not need to be considered breaking changes (as long as we get this in before the next release).
Updated plugin API docs
Change log entry
CHANGES.rst
? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rst
before merge. If no, maintainershould add a
no-changelog-entry-needed
label.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.