Skip to content
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
Merged

Conversation

@robertazanin
Copy link
Contributor

@robertazanin 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 2 commits May 24, 2017
@robertazanin
Copy link
Contributor Author

@robertazanin 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 started the 3D fitting example Improve 3D simulation / analysis example Jun 2, 2017
@cdeil cdeil merged commit eff2365 into gammapy:master Jun 2, 2017
0 of 2 checks passed
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
Copy link
Member

@cdeil 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
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants