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

error enrico_plot_lc #161

Open Marcas98 opened 3 years ago

Marcas98 commented 3 years ago

Hi,

I have a problem when I try plot lc with enrico_plot_lc mrk421.config

^[[34m# **** ^[[34m# * 8 gtsrcmap --- Make a source map ^[[34m# **^[[0m Traceback (most recent call last): File "/home/marisol/enrico/bin/enrico_sed", line 48, in liste = np.genfromtxt(sys.argv[1],dtype="str",unpack=True) File "/home/marisol/anaconda2/envs/fermi/lib/python3.7/site-packages/numpy/lib/npyio.py", line 2124, in genfromtxt raise ValueError(errmsg) ValueError: Some errors were detected ! Line #6 (got 1 columns instead of 3) Line #15 (got 1 columns instead of 3) Line #24 (got 1 columns instead of 3) Line #31 (got 1 columns instead of 3) Line #37 (got 1 columns instead of 3) Line #43 (got 1 columns instead of 3) Line #48 (got 1 columns instead of 3) Line #59 (got 1 columns instead of 3) Line #66 (got 1 columns instead of 3) Line #71 (got 1 columns instead of 3) Line #82 (got 1 columns instead of 3) Line #88 (got 1 columns instead of 3) Line #95 (got 1 columns instead of 3) Line #106 (got 1 columns instead of 3) Line #116 (got 1 columns instead of 3) Line #121 (got 1 columns instead of 3) Line #130 (got 1 columns instead of 3) Line #136 (got 1 columns instead of 3) Line #142 (got 1 columns instead of 3) Line #146 (got 1 columns instead of 3) Line #152 (got 1 columns instead of 3) Line #156 (got 1 columns instead of 3)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/marisol/enrico/bin/enrico_sed", line 55, in sed(config,infile) File "/home/marisol/enrico/bin/enrico_sed", line 13, in sed run(infile) File "/home/marisol/enrico/enrico/RunGTlike.py", line 200, in run FitRunner,Fit,ListOfAnalysisObjects = GenAnalysisObjects(config) File "/home/marisol/enrico/enrico/RunGTlike.py", line 173, in GenAnalysisObjects tag=typeirfs[evt], verbose = verbose) File "/home/marisol/enrico/enrico/RunGTlike.py", line 32, in Analysis FitRunner.GenerateFits() #Generates fits files for the rest of the products File "/home/marisol/enrico/enrico/fitmaker.py", line 86, in GenerateFits self.obs.SrcMap() File "/home/marisol/enrico/enrico/gtfunction.py", line 515, in SrcMap srcMaps['scfile'] = self.ft2 File "/home/marisol/anaconda2/envs/fermi/lib/python3.7/site-packages/fermitools/GtApp.py", line 43, in setitem self.pars[key] = value File "/home/marisol/anaconda2/envs/fermi/lib/python3.7/site-packages/fermitools/pil.py", line 74, in setitem raise KeyError(name) KeyError: 'scfile' ^[[34m# **** ^[[34m# SUMMARY: FRONTBACK ^[[34m# ****^[[0m Source = Mrk421 ('RA\t=\t', 166.113808, ' degrees') ('Dec\t=\t', 38.20883287, ' degrees') ('Start\t=\t', 240074400.8149508, ' MET (s)') ('Stop\t=\t', 240332892.6264262, ' MET (s)') ('ROI\t=\t', 10.0, ' degrees') ('E min\t=\t', 2000.0, ' MeV') ('E max\t=\t', 300000.0, ' MeV') ('E min ext\t=\t', 1002.3744672545452, ' MeV') ('E max ext\t=\t', 598578.6944906638, ' MeV') ('IRFs\t=\t', 'P8R3_SOURCE_V2') ('evclass\t=\t', 128) ('evtype\t=\t', 3)

^[[34m# **** ^[[34m# * 1 gtselect --- Select data from library, coarse cut ^[[34m# **^[[0m time -p gtselect infile=fotones.dat outfile=/home/marisol/lc-mrk421/datos/LightCurve_122bins//Mrk421_LAT_Analysis_LC_2_EvtCoarse.fits ra=166.113808 dec=38.20883287 rad=10.0 tmin=240074400.8149508 tmax=2> Done. real 0.12 user 0.12 sys 0.00

^[[34m# **** ^[[34m# * 2 gtselect --- Select data from library, fine cut ^[[34m# **^[[0m time -p gtselect infile=/home/marisol/lc-mrk421/datos/LightCurve_122bins//Mrk421_LAT_Analysis_LC_2_EvtCoarse.fits outfile=/home/marisol/lc-mrk421/datos/LightCurve_122bins//Mrk421_LAT_Analysis_LC_2_FRONT> Done. real 0.07 user 0.05 sys 0.01

davidsanchez commented 2 years ago

we had the same in issue https://github.com/gammapy/enrico/issues/157 did you use the code after the fix?