gammapy/enrico

enrico with ScienceTools v11r5p3 and ROOT

Closed this issue · 5 comments

Hi everyone!

I installed the latest ScienceTools on my computer, that works with anaconda python 3.6.

I am having some problems with enrico, since it won't work: I had to install a python 2.7 environment because it was not working with 3.6. Then, as it is said in the Fermi website, the new version of the ST does not come with ROOT, so I had to install it manually in my computer. I followed the instructions from the ROOT website in order to install it from source (enabling python) but I have errors while running enrico_sed, such as:

root/lib/libPyROOT.so: undefined symbol: PyUnicodeUCS4_FromString

The error pops up when the process is in the step

************************************************************

*** 12 PlotSED --- Generate SED plot

************************************************************

How can I fix this?

Is there any possibility to disable the plotting of the SED, in order to continue with the task? I really don't need the plot.

Thanks a lot!!!

Pere

Hi
I am not sure this is due to enrico but much more due to root
cheers
david

Hello, you could try installing an older version of science tools with root pre-installed if you don't want to manually fix the issue. I would recommend starting a virtual machine running Scientific Linux 6.9 and the associated science tools version with it. Good luck!

I can confirm this issue ...

raceback (most recent call last):
  File "/lustre/fs19/group/cta/users/mnievas/lat/enrico/enrico/RunGTlike.py", line 243, in <module>
    run(infile)
  File "/lustre/fs19/group/cta/users/mnievas/lat/enrico/enrico/RunGTlike.py", line 189, in run
    sedresult = FitRunner.ComputeSED(Fit,dump=True)
  File "/lustre/fs19/group/cta/users/mnievas/lat/enrico/enrico/fitmaker.py", line 451, in ComputeSED
    import plotting #plotting is the dedicated library
  File "/lustre/fs19/group/cta/users/mnievas/lat/enrico/enrico/plotting.py", line 4, in <module>
    import ROOT
  File "/afs/ifh.de/group/cta/cta/software/root/root_v5.34.32/lib/ROOT.py", line 103, in <module>
    import libPyROOT as _root
ImportError: libCore.so: cannot open shared object file: No such file or directory

davidsanchez, well, it has to do with enrico as it uses ROOT to make the plots, which probably shouldn't anymore since the Fermi-LAT does not come with ROOT (at least by default) anymore ... anyway, being written in python, I am not sure why enrico uses ROOT, sounds a bit counter-intuitive having much nicer plots (and much neater code for them) by default with matplotlib ...

As a workaround, either use an old version of ScienceTools or just compile them with
the --with-root flag. I will try this now.

Mireia

I will remove root and use matplotlib

first version without root.
need test of course