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 morphology models as Astropy models #122

Merged
merged 4 commits into from Jul 15, 2014

Conversation

Projects
None yet
2 participants
@adonath
Member

adonath commented Jun 5, 2014

Implementation of morphology models as astropy models and testing.

Show outdated Hide outdated gammapy/morphology/shapes.py Outdated
Show outdated Hide outdated gammapy/morphology/shapes.py Outdated
Show outdated Hide outdated gammapy/morphology/shapes.py Outdated
Show outdated Hide outdated gammapy/morphology/shapes.py Outdated
Show outdated Hide outdated gammapy/morphology/shapes.py Outdated
Show outdated Hide outdated gammapy/morphology/shapes.py Outdated
Show outdated Hide outdated gammapy/morphology/shapes.py Outdated
Show outdated Hide outdated gammapy/morphology/shapes.py Outdated
@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Jun 5, 2014

Member

Well, this should probably all be in astropy.modeling, but let's merge it in gammapy to have it available now.

I'm not sure this is a good way to implement the Delta2D model ... I once looked at how Sherpa does it, but don't remember any more now.

Somehow GammaLib manages to fit point source locations with sub-pixel precision and the flux correctly using this model which can be used with any PSF:
https://github.com/gammalib/gammalib/blob/devel/src/model/GModelSpatialPointSource.cpp#L260
But I never looked at how it's implemented.

Member

cdeil commented Jun 5, 2014

Well, this should probably all be in astropy.modeling, but let's merge it in gammapy to have it available now.

I'm not sure this is a good way to implement the Delta2D model ... I once looked at how Sherpa does it, but don't remember any more now.

Somehow GammaLib manages to fit point source locations with sub-pixel precision and the flux correctly using this model which can be used with any PSF:
https://github.com/gammalib/gammalib/blob/devel/src/model/GModelSpatialPointSource.cpp#L260
But I never looked at how it's implemented.

@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Jun 5, 2014

Member

The travis-ci build is broken in gammapy master at the moment: #123
Let's wait until tomorrow to merge this.

Member

cdeil commented Jun 5, 2014

The travis-ci build is broken in gammapy master at the moment: #123
Let's wait until tomorrow to merge this.

@adonath

This comment has been minimized.

Show comment
Hide comment
@adonath

adonath Jun 10, 2014

Member

There is still an issue with the external link to astropy.modeling.functional_models.Gaussian2D in the docs, that I can't resolve. @cdeil Any ideas?

Member

adonath commented Jun 10, 2014

There is still an issue with the external link to astropy.modeling.functional_models.Gaussian2D in the docs, that I can't resolve. @cdeil Any ideas?

@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Jun 10, 2014

Member

This was changed in the Astropy sphinx setup ... you should now always put links to the user-facing location (not the actual file / module location) ... in this case astropy.modeling.models.Gaussian2D.

Member

cdeil commented Jun 10, 2014

This was changed in the Astropy sphinx setup ... you should now always put links to the user-facing location (not the actual file / module location) ... in this case astropy.modeling.models.Gaussian2D.

@cdeil cdeil added feature labels Jun 10, 2014

@cdeil cdeil added this to the 0.1 milestone Jun 10, 2014

@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Jul 4, 2014

Member

@adonath Can you please finish this pull request (at the moment there's e.g. a tmp/test.py file attached)?
I think it makes sense to get this into gammapy now and maybe try to get it into Astropy before the 1.0 release.

Member

cdeil commented Jul 4, 2014

@adonath Can you please finish this pull request (at the moment there's e.g. a tmp/test.py file attached)?
I think it makes sense to get this into gammapy now and maybe try to get it into Astropy before the 1.0 release.

@adonath

This comment has been minimized.

Show comment
Hide comment
@adonath

adonath Jul 14, 2014

Member

I've updated this PR, but it seems like the Travis builds are broken (not failing, but broken...). @cdeil could you take a look at this?

Member

adonath commented Jul 14, 2014

I've updated this PR, but it seems like the Travis builds are broken (not failing, but broken...). @cdeil could you take a look at this?

@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Jul 14, 2014

Member

Yes, our travis-ci build is broken and will be until we update to use astropy-helpers (see #126), which I plan to do when Astropy 0.4 is released later this week.

I'll try this on my Macbook now.

Member

cdeil commented Jul 14, 2014

Yes, our travis-ci build is broken and will be until we update to use astropy-helpers (see #126), which I plan to do when Astropy 0.4 is released later this week.

I'll try this on my Macbook now.

Show outdated Hide outdated gammapy/morphology/shapes.py Outdated
Show outdated Hide outdated gammapy/morphology/shapes.py Outdated
@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Jul 14, 2014

Member

Looks like currently the eval method of Sphere2D and Shell2D is not tested:

$ python setup.py test -V -t  gammapy/morphology/tests/test_shapes.py --coverage
$ open htmlcov/index.html 

Can you please add a test?

Member

cdeil commented Jul 14, 2014

Looks like currently the eval method of Sphere2D and Shell2D is not tested:

$ python setup.py test -V -t  gammapy/morphology/tests/test_shapes.py --coverage
$ open htmlcov/index.html 

Can you please add a test?

@adonath

This comment has been minimized.

Show comment
Hide comment
@adonath

adonath Jul 15, 2014

Member

I've adressed your comments and added a test for the eval method. Is it now ready to merge?

Member

adonath commented Jul 15, 2014

I've adressed your comments and added a test for the eval method. Is it now ready to merge?

@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Jul 15, 2014

Member

Thanks!

Member

cdeil commented Jul 15, 2014

Thanks!

cdeil added a commit that referenced this pull request Jul 15, 2014

Merge pull request #122 from adonath/shell2d_model_#115
Implementation of morphology models as astropy models and testing

@cdeil cdeil merged commit 8933045 into gammapy:master Jul 15, 2014

1 check failed

continuous-integration/travis-ci The Travis CI build could not complete due to an error
Details

@adonath adonath referenced this pull request Jul 16, 2014

Closed

Implement Shell2D model #115

@cdeil cdeil changed the title from Implementation of morphology models as astropy models and testing to Add morphology models as Astropy models Apr 8, 2015

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