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

Migrate detect.cwt to use gammapy.maps #1576

Merged
merged 5 commits into from Jul 30, 2018

Conversation

2 participants
@hsiejkowski
Contributor

hsiejkowski commented Jul 27, 2018

Not ready to merge, still some tests are failing.

@cdeil cdeil self-assigned this Jul 27, 2018

@cdeil cdeil added the cleanup label Jul 27, 2018

@cdeil cdeil added this to To do in Map analysis via automation Jul 27, 2018

@cdeil cdeil added this to the 0.8 milestone Jul 27, 2018

@cdeil cdeil changed the title from Migrate detect.cwt to WcsNDMaps #1530 to Migrate detect.cwt to WcsNDMaps Jul 27, 2018

@registerrier registerrier moved this from To do to In progress in Map analysis Jul 28, 2018

@hsiejkowski

This comment has been minimized.

Show comment
Hide comment
@hsiejkowski

hsiejkowski Jul 30, 2018

Contributor

This is the final version and is ready to review.

I will do the cleanup by storing the data members in Map objects in separate PR, since this requires many changes and it is not directly related to migration to gammapy.maps.

Contributor

hsiejkowski commented Jul 30, 2018

This is the final version and is ready to review.

I will do the cleanup by storing the data members in Map objects in separate PR, since this requires many changes and it is not directly related to migration to gammapy.maps.

@@ -742,6 +742,10 @@ def get_region_mask_array(self, region):
pixcoord = PixCoord(idx[0], idx[1])
return region.contains(pixcoord)
def copy(self):

This comment has been minimized.

@cdeil

cdeil Jul 30, 2018

Member

@hsiejkowski - This copy method should be removed. It was already added on the base class.
To see it you have to rebase this branch against the latest upstream master.
Then you can remove this copy again, in a new commit (or squash your commits so that we don't go back and forth in the version history).

Could you please do that?

@cdeil

cdeil Jul 30, 2018

Member

@hsiejkowski - This copy method should be removed. It was already added on the base class.
To see it you have to rebase this branch against the latest upstream master.
Then you can remove this copy again, in a new commit (or squash your commits so that we don't go back and forth in the version history).

Could you please do that?

This comment has been minimized.

@hsiejkowski

hsiejkowski Jul 30, 2018

Contributor

I did the rebase, and the WcsGeom class still does not have copy()method, therefore I implemented it by myself. Should I move it to the parent class MapGeom?

@hsiejkowski

hsiejkowski Jul 30, 2018

Contributor

I did the rebase, and the WcsGeom class still does not have copy()method, therefore I implemented it by myself. Should I move it to the parent class MapGeom?

This comment has been minimized.

@cdeil

cdeil Jul 30, 2018

Member

The method is in mastter:
https://github.com/gammapy/gammapy/blame/master/gammapy/maps/geom.py#L890

It was added in this commit 10 days ago:
b13cf3f

maybe you forgot to fetch the latest upstream master before doing rebase?

@cdeil

cdeil Jul 30, 2018

Member

The method is in mastter:
https://github.com/gammapy/gammapy/blame/master/gammapy/maps/geom.py#L890

It was added in this commit 10 days ago:
b13cf3f

maybe you forgot to fetch the latest upstream master before doing rebase?

This comment has been minimized.

@hsiejkowski

hsiejkowski Jul 30, 2018

Contributor

I double checked and I have a fresh master. The commit you mention introduces a copy() method for MapCoord class, but self._geom2d/3d are instances of WcsGeom(MapGeom) class, which does not have copy().

@hsiejkowski

hsiejkowski Jul 30, 2018

Contributor

I double checked and I have a fresh master. The commit you mention introduces a copy() method for MapCoord class, but self._geom2d/3d are instances of WcsGeom(MapGeom) class, which does not have copy().

This comment has been minimized.

@cdeil

cdeil Jul 30, 2018

Member

You're right. This branch is rebased against latest upstream master, and there is no geom copy.

Apologies!

I will merge this PR now, and then move your geom copy to the base class via a follow-up commit in master.

@cdeil

cdeil Jul 30, 2018

Member

You're right. This branch is rebased against latest upstream master, and there is no geom copy.

Apologies!

I will merge this PR now, and then move your geom copy to the base class via a follow-up commit in master.

@cdeil cdeil merged commit 08e9ccc into gammapy:master Jul 30, 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 In progress to Done Jul 30, 2018

@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Jul 30, 2018

Member

@hsiejkowski - Thank you!

Member

cdeil commented Jul 30, 2018

@hsiejkowski - Thank you!

@cdeil cdeil changed the title from Migrate detect.cwt to WcsNDMaps to Migrate detect.cwt to use gammapy.maps Aug 15, 2018

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