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 quantity support to map coordinates #1685

Merged
merged 7 commits into from Aug 9, 2018

Conversation

2 participants
@adonath
Member

adonath commented Aug 9, 2018

This PR adds quantity support to the MapAxis.coord_to_idx(), MapAxis.idx_to_coord() as well as the MapCoord object. This will fix issue #1646 in a general way. This PR also contains a few unrelated changes, as I cleaned up and simplified some code "on the fly". I decided to remove the copy option of MapCoord, as we do not have this in any other class init and the MapCoord object as a .copy() anyway.

@adonath adonath added this to the 0.8 milestone Aug 9, 2018

@adonath adonath self-assigned this Aug 9, 2018

@adonath adonath added this to To do in Map analysis via automation Aug 9, 2018

@adonath adonath merged commit a58e939 into gammapy:master Aug 9, 2018

0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

Map analysis automation moved this from To do to Done Aug 9, 2018

@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Aug 9, 2018

Member

I'll change back to OrderedDict here in this one case: if we assert on coord order, it has to be passed in by OrderedDict for now.

See https://ci.appveyor.com/project/cdeil/gammapy/build/1.0.4188/job/x78c82dy8mhgvtc5

Member

cdeil commented on gammapy/maps/tests/test_geom.py in a02e0dc Aug 9, 2018

I'll change back to OrderedDict here in this one case: if we assert on coord order, it has to be passed in by OrderedDict for now.

See https://ci.appveyor.com/project/cdeil/gammapy/build/1.0.4188/job/x78c82dy8mhgvtc5

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Aug 9, 2018

Member

Should be fixed by 19bb755

Member

cdeil replied Aug 9, 2018

Should be fixed by 19bb755

@cdeil cdeil changed the title from Add quantity support to MapCoord and MapCoord based methods to Add quantity support to map coordinates Aug 15, 2018

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