Skip to content
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

Change map smooth widths to match Astropy #1807

Merged
merged 5 commits into from Sep 20, 2018
Merged

Conversation

@AtreyeeS
Copy link
Member

@AtreyeeS AtreyeeS commented Sep 18, 2018

This PR addresses #1803

@adonath adonath self-assigned this Sep 19, 2018
@adonath adonath added this to To do in gammapy.maps via automation Sep 19, 2018
@adonath adonath added this to the 0.9 milestone Sep 19, 2018
Copy link
Member

@adonath adonath left a comment

Thanks @AtreyeeS! I only have one comment, once this is addressed we can merge...

Loading


smoothed_data = np.empty_like(self.data)

for img, idx in self.iter_by_image():
if kernel == "gauss":
width = radius / 2.
data = gaussian_filter(img, width, **kwargs)
data = gaussian_filter(img, width/2.0, **kwargs)
Copy link
Member

@adonath adonath Sep 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this should be rather gaussian_filter(img, width, **kwargs). The gaussian_filter method takes sigma as an argument. With this change you probably have to adapt the test as well...

Loading

Copy link
Member Author

@AtreyeeS AtreyeeS Sep 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right! I had misunderstood!
Have changed the argument now

Loading

@adonath adonath merged commit 43e4d52 into gammapy:master Sep 20, 2018
1 of 4 checks passed
Loading
gammapy.maps automation moved this from To do to Done Sep 20, 2018
@adonath
Copy link
Member

@adonath adonath commented Sep 20, 2018

Thanks @AtreyeeS! I made a follow-up commit fixing one docs example that still used .smooth(radius=). Please also run the docs build locally next time and check if it passes.

Loading

@cdeil cdeil changed the title Change smoothing kernel definitions to match that of astropy Change map smooth widths to match Astropy Nov 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
gammapy.maps
  
Done
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants