gammapy / enrico

Enrico helps you with your Fermi data analysis
http://enrico.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
22 stars 26 forks source link

Problem to make a model map #150

Closed phvergara closed 3 years ago

phvergara commented 4 years ago

Hi, I'm having problems to run enrico_sed. When I run the task the terminal show me:

****

*** 15 gtmodel --- Make model map

****

Traceback (most recent call last): File "/home/philipe/enrico/bin/enrico_sed", line 55, in sed(config,infile) File "/home/philipe/enrico/bin/enrico_sed", line 13, in sed run(infile) File "/home/philipe/enrico/enrico/RunGTlike.py", line 253, in run AnalysisComponent.ModelMap(outXml) File "/home/philipe/enrico/enrico/fitmaker.py", line 504, in ModelMap self.obs.ModelMaps(xml)

I think that can avoid the problem when in config file [Spectrum]/ResultPlots=no. However, if this option is "no" then I can't check the quality of my results.

davidsanchez commented 4 years ago

Hi could you give the end of the message? thanks

phvergara commented 3 years ago

Oh sorry, it missed the last line of error, it was an atributeError due 'ModelMaps'. I changed the line 504 of "fitmaker.py" with "self.obs.ModelMap(xml)" and it worked. Now I can reproduce the model map of tutorial. Can you correct if the change is wrong, please ?. Thanks

****

*** 15 gtmodel --- Make model map

****

/home/philipe/Escritorio/pruebaenrico/prueba2/results2/pg15_PowerLaw2_spec_out.xml Traceback (most recent call last): File "/home/philipe/enrico/bin/enrico_sed", line 55, in sed(config,infile) File "/home/philipe/enrico/bin/enrico_sed", line 13, in sed run(infile) File "/home/philipe/enrico/enrico/RunGTlike.py", line 253, in run AnalysisComponent.ModelMap(outXml) File "/home/philipe/enrico/enrico/fitmaker.py", line 504, in ModelMap self.obs.ModelMaps(xml) AttributeError: Observation instance has no attribute 'ModelMaps'

davidsanchez commented 3 years ago

Thanks . I will have a look

davidsanchez commented 3 years ago

the fix is easy. I will push it soon but if you are in a rush you can opent fitmaker.py and go to line 504 self.obs.ModelMaps(xml) -> self.obs.ModelMap(xml)

(no S)

davidsanchez commented 3 years ago

I made the fix. reopen if this is not working. thanks