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

Add SED from Cube function #166

Merged
merged 5 commits into from Aug 22, 2014

Conversation

Projects
None yet
2 participants
@ellisowen
Contributor

ellisowen commented Aug 15, 2014

Made a pull request while I work on this in case you have comments.

@ellisowen

This comment has been minimized.

Show comment
Hide comment
@ellisowen

ellisowen Aug 17, 2014

Contributor

Ok, this is now ready - please review.
The Travis CI failures don't appear to be related to anything I've changed here.

Contributor

ellisowen commented Aug 17, 2014

Ok, this is now ready - please review.
The Travis CI failures don't appear to be related to anything I've changed here.

@cdeil cdeil referenced this pull request Aug 20, 2014

Merged

Add image profile function #167

Show outdated Hide outdated gammapy/spectrum/sed.py Outdated
Show outdated Hide outdated gammapy/spectrum/sed.py Outdated
Show outdated Hide outdated gammapy/spectrum/sed.py Outdated
@ellisowen

This comment has been minimized.

Show comment
Hide comment
@ellisowen

ellisowen Aug 20, 2014

Contributor

OK, this should address your comments

Contributor

ellisowen commented Aug 20, 2014

OK, this should address your comments

Show outdated Hide outdated gammapy/spectrum/sed.py Outdated
Show outdated Hide outdated gammapy/spectrum/sed.py Outdated
Show outdated Hide outdated gammapy/spectrum/sed.py Outdated
Show outdated Hide outdated gammapy/spectrum/sed.py Outdated
Show outdated Hide outdated gammapy/spectrum/sed.py Outdated
Show outdated Hide outdated gammapy/spectrum/sed.py Outdated
@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Aug 21, 2014

Member

Can you please add a tutorial where you make a GLON, GLAT profile and SED for the Fermi Galactic center example?
(maybe in a new PR if you prefer)

Member

cdeil commented Aug 21, 2014

Can you please add a tutorial where you make a GLON, GLAT profile and SED for the Fermi Galactic center example?
(maybe in a new PR if you prefer)

@ellisowen

This comment has been minimized.

Show comment
Hide comment
@ellisowen

ellisowen Aug 21, 2014

Contributor
  • Can you please add a tutorial where you make a GLON, GLAT profile and SED for the Fermi Galactic center example?
    (maybe in a new PR if you prefer)

Sure, I will add this in a new PR (when I am producing the plots for the report anyway so can just copy my code across when it's ready).

Contributor

ellisowen commented Aug 21, 2014

  • Can you please add a tutorial where you make a GLON, GLAT profile and SED for the Fermi Galactic center example?
    (maybe in a new PR if you prefer)

Sure, I will add this in a new PR (when I am producing the plots for the report anyway so can just copy my code across when it's ready).

@ellisowen

This comment has been minimized.

Show comment
Hide comment
@ellisowen

ellisowen Aug 21, 2014

Contributor

OK, this should now address your comments.

Contributor

ellisowen commented Aug 21, 2014

OK, this should now address your comments.

Show outdated Hide outdated gammapy/spectrum/__init__.py Outdated
Show outdated Hide outdated gammapy/spectrum/sed.py Outdated
Show outdated Hide outdated gammapy/spectrum/sed.py Outdated
Show outdated Hide outdated gammapy/spectrum/sed.py Outdated
Show outdated Hide outdated gammapy/spectrum/tests/test_sed.py Outdated
Show outdated Hide outdated gammapy/spectrum/tests/test_sed.py Outdated
Show outdated Hide outdated gammapy/spectrum/tests/test_sed.py Outdated
Show outdated Hide outdated gammapy/spectrum/tests/test_sed.py Outdated
@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Aug 21, 2014

Member

I've left another bunch of inline comments, the most important ones are that lons and lats should be dropped as arguments to this function (all you need is a mask) and that you switched lon and lat in the unit test, possibly making the reference results incorrect (unless you were selecting all pixels in the image all the time, which wouldn't be a good test).

Member

cdeil commented Aug 21, 2014

I've left another bunch of inline comments, the most important ones are that lons and lats should be dropped as arguments to this function (all you need is a mask) and that you switched lon and lat in the unit test, possibly making the reference results incorrect (unless you were selecting all pixels in the image all the time, which wouldn't be a good test).

@ellisowen

This comment has been minimized.

Show comment
Hide comment
@ellisowen

ellisowen Aug 22, 2014

Contributor

OK, how is this?

Contributor

ellisowen commented Aug 22, 2014

OK, how is this?

Show outdated Hide outdated gammapy/image/utils.py Outdated
Show outdated Hide outdated gammapy/image/utils.py Outdated
@@ -195,3 +196,11 @@ def test_wcs_histogram2d():
assert measure.lookup(image, 0, 0, world=False) == 1 + 3
assert measure.lookup(image, 1, 0, world=False) == 2
def test_lon_lat_rectangle_mask():

This comment has been minimized.

@cdeil

cdeil Aug 22, 2014

Member

Add tests for the default None cases for the limits also.
You can use this command to make sure every line in your function is tested:

python setup.py test -V --coverage -t gammapy/image/tests/test_utils.py
@cdeil

cdeil Aug 22, 2014

Member

Add tests for the default None cases for the limits also.
You can use this command to make sure every line in your function is tested:

python setup.py test -V --coverage -t gammapy/image/tests/test_utils.py
Show outdated Hide outdated gammapy/image/utils.py Outdated
Show outdated Hide outdated gammapy/image/utils.py Outdated
@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Aug 22, 2014

Member

This is mostly OK ... I left some more inline comments.

Member

cdeil commented Aug 22, 2014

This is mostly OK ... I left some more inline comments.

@ellisowen

This comment has been minimized.

Show comment
Hide comment
@ellisowen

ellisowen Aug 22, 2014

Contributor

I think this addresses your comments

Contributor

ellisowen commented Aug 22, 2014

I think this addresses your comments

@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Aug 22, 2014

Member

Thanks!

Member

cdeil commented Aug 22, 2014

Thanks!

cdeil added a commit that referenced this pull request Aug 22, 2014

@cdeil cdeil merged commit 5022770 into gammapy:master Aug 22, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@cdeil cdeil changed the title from SED from Cube code to Add SED from Cube function Apr 8, 2015

@cdeil cdeil added the feature label Apr 8, 2015

@cdeil cdeil added this to the 0.1 milestone Apr 8, 2015

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