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

Improve 3D simulation / analysis example #1051

Merged
merged 9 commits into from Jun 2, 2017

Conversation

Projects
None yet
2 participants
@robertazanin
Contributor

robertazanin commented May 24, 2017

I have started the fitting example.
I have created a new file in the directory example called configuration where I group all the functions related to the yaml conf file.
the example_3d_simulator.py is still working
the example_3D_fit.py uses only gammapy functions to define the spectral model, instead of the sherpa ones as in Lea's example.
It fails when I call the sherpa Fit function
File "example_3D_fit.py", line 101, in
main()
File "example_3D_fit.py", line 84, in main
estmethod=Covariance(),
File "/Users/roberta/anaconda2/envs/newcta/lib/python3.6/site-packages/sherpa/fit.py", line 918, in init
for current_par in self.model.pars:
AttributeError: 'SkyCube' object has no attribute 'pars'

now I do not have time to look at it. If you have any suggestion is still welcome.

Please review the few lines of code of the fitting example.

robertazanin added some commits May 24, 2017

@robertazanin

This comment has been minimized.

Show comment
Hide comment
@robertazanin

robertazanin May 24, 2017

Contributor

the problem is thhat the Fitting function of sherpa requires a cube-model object, whereas our get_model method return a SkyCube. Is there a way to transform a SkyCube into a cube-model sherpa readable?

Contributor

robertazanin commented May 24, 2017

the problem is thhat the Fitting function of sherpa requires a cube-model object, whereas our get_model method return a SkyCube. Is there a way to transform a SkyCube into a cube-model sherpa readable?

@cdeil cdeil self-assigned this Jun 2, 2017

@cdeil cdeil added the feature label Jun 2, 2017

@cdeil cdeil added this to the 0.7 milestone Jun 2, 2017

@cdeil cdeil changed the title from started the 3D fitting example to Improve 3D simulation / analysis example Jun 2, 2017

@cdeil cdeil merged commit eff2365 into gammapy:master Jun 2, 2017

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
@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Jun 2, 2017

Member

@robertazanin - Thanks!

Member

cdeil commented Jun 2, 2017

@robertazanin - Thanks!

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