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

error with enrico_sed #168

Open
ajaykhoj opened this issue Apr 28, 2022 · 13 comments
Open

error with enrico_sed #168

ajaykhoj opened this issue Apr 28, 2022 · 13 comments

Comments

@ajaykhoj
Copy link

Hello

I am using enrico first time and I am getting error like

base) ajay@ajay-HP-Compaq-8200-Elite-SFF-PC:~/myanalysis$ enrico_sed myanalysis.conf
Traceback (most recent call last):
File "/home/ajay/Downloads/enrico/bin/enrico_sed", line 9, in
from enrico.RunGTlike import run
File "/home/ajay/Downloads/enrico/enrico/RunGTlike.py", line 4, in
from enrico.gtfunction import Observation
File "/home/ajay/Downloads/enrico/enrico/gtfunction.py", line 15, in
from gt_apps import evtbin, maketime, diffResps, expCube, expMap, srcMaps, model_map, filter, obsSim
File "/home/ajay/anaconda3/envs/fermi2/lib/python3.7/site-packages/fermitools/gt_apps.py", line 13, in
addCubes = GtApp('gtltsum', 'Likelihood')
File "/home/ajay/anaconda3/envs/fermi2/lib/python3.7/site-packages/fermitools/GtApp.py", line 40, in init
preserveQuotes)
File "/home/ajay/anaconda3/envs/fermi2/lib/python3.7/site-packages/fermitools/GtApp.py", line 33, in getApp
pars = Pil(appName + '.par', raiseKeyErrors, preserveQuotes)
File "/home/ajay/anaconda3/envs/fermi2/lib/python3.7/site-packages/fermitools/pil.py", line 40, in init
self.parfile = os.path.join(pfilesPath(pfile), pfile)
File "/home/ajay/anaconda3/envs/fermi2/lib/python3.7/site-packages/fermitools/pfilesPath.py", line 37, in pfilesPath
raise ValueError(ParFileError + ": .par file " + parfile + " not found.")
ValueError: ParFileError: .par file gtltsum.par not found

How can i resolve this.

Regards
Ajay

@davidsanchez
Copy link
Member

Hello
does not seem to be a enrico-related error
did you try to run gtltsum on command line?
cheers

@ajaykhoj
Copy link
Author

I tried but it shows command not found.

@davidsanchez
Copy link
Member

and other command such as gtlike?

@ajaykhoj
Copy link
Author

Now i am getting this error

###################################

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

*** SUMMARY: FRONTBACK ***

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

Source = PG155+113
RA = 238.92935 degrees
Dec = 11.190102 degrees
Start = 239557417.0 MET (s)
Stop = 256970880.0 MET (s)
ROI = 10.0 degrees
E min = 100.0 MeV
E max = 300000.0 MeV
E min ext = 50.11872336272722 MeV
E max ext = 598578.6944906638 MeV
IRFs = P8R3_SOURCE_V3
evclass = 128
evtype = 3

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

*** 1 gtselect --- Select data from library, coarse cut

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

time -p gtselect infile=~/myanalysis/data.list outfile=/home/ajay/myanalysis/PG155+113_Test0fPG1553_EvtCoarse.fits ra=238.92935 dec=11.190102 rad=10.0 tmin=239557417.0 tmax=256970880.0 emin=0.0 emax=10000000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"
Caught St13runtime_error at the top level: File not found: /myanalysis/data.list
[Message] Warning: An error ocurred, retrying ...
time -p gtselect infile=
/myanalysis/data.list outfile=/home/ajay/myanalysis/PG155+113_Test0fPG1553_EvtCoarse.fits ra=238.92935 dec=11.190102 rad=10.0 tmin=239557417.0 tmax=256970880.0 emin=0.0 emax=10000000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"
Caught St13runtime_error at the top level: File not found: /myanalysis/data.list
[Message] Warning: An error ocurred, retrying ...
time -p gtselect infile=
/myanalysis/data.list outfile=/home/ajay/myanalysis/PG155+113_Test0fPG1553_EvtCoarse.fits ra=238.92935 dec=11.190102 rad=10.0 tmin=239557417.0 tmax=256970880.0 emin=0.0 emax=10000000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"
Caught St13runtime_error at the top level: File not found: /myanalysis/data.list
[Message] Warning: An error ocurred, retrying ...
time -p gtselect infile=
/myanalysis/data.list outfile=/home/ajay/myanalysis/PG155+113_Test0fPG1553_EvtCoarse.fits ra=238.92935 dec=11.190102 rad=10.0 tmin=239557417.0 tmax=256970880.0 emin=0.0 emax=10000000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"
Caught St13runtime_error at the top level: File not found: /myanalysis/data.list
[Message] Warning: An error ocurred, retrying ...
time -p gtselect infile=
/myanalysis/data.list outfile=/home/ajay/myanalysis/PG155+113_Test0fPG1553_EvtCoarse.fits ra=238.92935 dec=11.190102 rad=10.0 tmin=239557417.0 tmax=256970880.0 emin=0.0 emax=10000000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"
Caught St13runtime_error at the top level: File not found: ~/myanalysis/data.list
[Message] Warning: An error ocurred, retrying ...

*** Error [Message]: An error ocurred and could not be recovered. Exiting! ***

##############################################

@davidsanchez
Copy link
Member

this file " ~/myanalysis/data.list" is not found. check your config file and change the path

@ajaykhoj
Copy link
Author

Thanks let me try it

@ajaykhoj
Copy link
Author

Hi @davidsanchez

I am getting error while doing light_curve analysis

#################################


*** 11 Re-optimize ---

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

Fit output with NEWMINUIT: 8705.488283850456 [quality: 3]
[FitMaker]: Fit with gtlike performed

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

*** 12 PlotSED --- Generate SED plot

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

Traceback (most recent call last):
File "./bin/enrico_sed", line 48, in
liste = np.genfromtxt(sys.argv[1],dtype="str",unpack=True)
File "/home/ajay/anaconda3/envs/fermi2/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 #90 (got 1 columns instead of 3)
Line #97 (got 1 columns instead of 3)
Line #108 (got 1 columns instead of 3)
Line #118 (got 1 columns instead of 3)
Line #123 (got 1 columns instead of 3)
Line #132 (got 1 columns instead of 3)
Line #138 (got 1 columns instead of 3)
Line #144 (got 1 columns instead of 3)
Line #148 (got 1 columns instead of 3)
Line #154 (got 1 columns instead of 3)
Line #158 (got 1 columns instead of 3)
Line #165 (got 1 columns instead of 3)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./bin/enrico_sed", line 55, in
sed(config,infile)
File "./bin/enrico_sed", line 13, in sed
run(infile)
File "/home/ajay/Downloads/enrico/enrico/RunGTlike.py", line 212, in run
sedresult = FitRunner.ComputeSED(Fit,dump=False)
File "/home/ajay/Downloads/enrico/enrico/fitmaker.py", line 550, in ComputeSED
result._WriteCovMatrix(Param)
File "/home/ajay/Downloads/enrico/enrico/plotting.py", line 66, in _WriteCovMatrix
np.savetxt(par.PlotName+'.cov.dat', self.covar, header=header, fmt='%.3e', comments='', delimiter=',')
File "<array_function internals>", line 6, in savetxt
File "/home/ajay/anaconda3/envs/fermi2/lib/python3.7/site-packages/numpy/lib/npyio.py", line 1368, in savetxt
open(fname, 'wt').close()
FileNotFoundError: [Errno 2] No such file or directory: '/home/ajay/myanalysis/LightCurve_20bins//Spectrum/SED_PG155+113_PowerLaw.cov.dat'

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

@ajaykhoj
Copy link
Author

ajaykhoj commented May 1, 2022

hello Sir,

At the end of the sed analysis, I am getting some warning messages. Whether these warnings will cause any problem in further analysis like LC analysis, upper bound etc. Can you comment on that?

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

*** 12 PlotSED --- Generate SED plot

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

[Result]: Decorrelation energy : 2.82e+03 MeV
[Result]: Diffential flux at the Decorrelation energy : 4.61e-13 +/- 2.41e-17 ph/cm2/s/MeV
[Result]: SED value at the Decorrelation energy : 5.89e-12 +/- 3.08e-16 erg/cm2/s
WARNING:matplotlib.font_manager:findfont: Font family ['serif'] not found. Falling back to DejaVu Sans.
WARNING:matplotlib.font_manager:findfont: Font family ['serif'] not found. Falling back to DejaVu Sans.
/home/ajay/Downloads/enrico/enrico/plotting.py:230: MatplotlibDeprecationWarning: savefig() got unexpected keyword argument "papertype" which is no longer supported as of 3.3 and will become an error two minor releases later
frameon=None)
/home/ajay/Downloads/enrico/enrico/plotting.py:230: MatplotlibDeprecationWarning: savefig() got unexpected keyword argument "frameon" which is no longer supported as of 3.3 and will become an error two minor releases later
frameon=None)
<class 'NameError'>
("name 'par' is not defined",)
name 'par' is not defined

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

*** 13 Results --- Print results of the fit

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

(4FGL J1531.6+0406
Spectrum: PowerLaw
0 Prefactor: 5.862e-01 0.000e+00 0.000e+00 1.000e+04 ( 1.000e-13) fixed
1 Index: -2.287e+00 0.000e+00 -6.000e+00 -5.000e-01 ( 1.000e+00) fixed
2 Scale: 1.662e+03 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

4FGL J1539.1+1008
Spectrum: PowerLaw
3 Prefactor: 1.394e+00 0.000e+00 0.000e+00 1.000e+04 ( 1.000e-13) fixed
4 Index: -2.425e+00 0.000e+00 -6.000e+00 -5.000e-01 ( 1.000e+00) fixed
5 Scale: 1.233e+03 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

4FGL J1541.7+1413
Spectrum: PowerLaw
6 Prefactor: 9.202e-01 0.000e+00 0.000e+00 1.000e+04 ( 1.000e-14) fixed
7 Index: -1.918e+00 0.000e+00 -6.000e+00 -5.000e-01 ( 1.000e+00) fixed
8 Scale: 4.847e+03 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

4FGL J1543.3+1026
Spectrum: PowerLaw
9 Prefactor: 3.181e-01 0.000e+00 0.000e+00 1.000e+04 ( 1.000e-12) fixed
10 Index: -2.581e+00 0.000e+00 -6.000e+00 -5.000e-01 ( 1.000e+00) fixed
11 Scale: 8.943e+02 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

4FGL J1543.6+0452
Spectrum: PowerLaw
12 Prefactor: 3.452e-01 0.000e+00 0.000e+00 1.000e+04 ( 1.000e-13) fixed
13 Index: -1.911e+00 0.000e+00 -6.000e+00 -5.000e-01 ( 1.000e+00) fixed
14 Scale: 3.654e+03 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

4FGL J1546.0+0819
Spectrum: LogParabola
15 norm: 1.185e+00 0.000e+00 0.000e+00 1.000e+04 ( 1.000e-13) fixed
16 alpha: 1.738e+00 0.000e+00 5.000e-01 3.000e+00 ( 1.000e+00) fixed
17 beta: 1.039e-01 0.000e+00 0.000e+00 1.000e+00 ( 1.000e+00) fixed
18 Eb: 2.327e+03 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

4FGL J1547.9+0445
Spectrum: PowerLaw
19 Prefactor: 2.101e+00 0.000e+00 0.000e+00 1.000e+04 ( 1.000e-14) fixed
20 Index: -2.230e+00 0.000e+00 -6.000e+00 -5.000e-01 ( 1.000e+00) fixed
21 Scale: 2.815e+03 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

4FGL J1548.3+1456
Spectrum: LogParabola
22 norm: 8.066e-01 2.446e-01 0.000e+00 1.000e+04 ( 1.000e-12)
23 alpha: 1.486e+00 3.403e-01 5.000e-01 3.000e+00 ( 1.000e+00)
24 beta: 2.956e-01 1.692e-01 0.000e+00 1.000e+00 ( 1.000e+00)
25 Eb: 1.179e+03 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

4FGL J1550.7+0528
Spectrum: LogParabola
26 norm: 1.183e+00 0.000e+00 0.000e+00 1.000e+04 ( 1.000e-12) fixed
27 alpha: 2.287e+00 0.000e+00 5.000e-01 3.000e+00 ( 1.000e+00) fixed
28 beta: 1.387e-01 0.000e+00 0.000e+00 1.000e+00 ( 1.000e+00) fixed
29 Eb: 9.512e+02 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

4FGL J1552.0+0850
Spectrum: LogParabola
30 norm: 1.079e+00 0.000e+00 0.000e+00 1.000e+04 ( 1.000e-13) fixed
31 alpha: 1.940e+00 0.000e+00 5.000e-01 3.000e+00 ( 1.000e+00) fixed
32 beta: 1.098e-01 0.000e+00 0.000e+00 1.000e+00 ( 1.000e+00) fixed
33 Eb: 1.886e+03 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

4FGL J1553.6+1257
Spectrum: LogParabola
34 norm: 2.410e+00 1.342e-01 0.000e+00 1.000e+04 ( 1.000e-11)
35 alpha: 2.155e+00 4.747e-02 5.000e-01 3.000e+00 ( 1.000e+00)
36 beta: 1.353e-01 3.352e-02 0.000e+00 1.000e+00 ( 1.000e+00)
37 Eb: 7.284e+02 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

4FGL J1556.5+1116
Spectrum: LogParabola
38 norm: 1.297e+00 0.000e+00 0.000e+00 1.000e+04 ( 1.000e-11) fixed
39 alpha: 2.094e+00 0.000e+00 5.000e-01 3.000e+00 ( 1.000e+00) fixed
40 beta: 7.144e-01 0.000e+00 0.000e+00 1.000e+00 ( 1.000e+00) fixed
41 Eb: 3.058e+02 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

4FGL J1600.4+0407
Spectrum: PowerLaw
42 Prefactor: 2.245e+00 0.000e+00 0.000e+00 1.000e+04 ( 1.000e-14) fixed
43 Index: -2.106e+00 0.000e+00 -6.000e+00 -5.000e-01 ( 1.000e+00) fixed
44 Scale: 2.672e+03 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

4FGL J1603.8+1104
Spectrum: PowerLaw
45 Prefactor: 1.643e+00 0.000e+00 0.000e+00 1.000e+04 ( 1.000e-14) fixed
46 Index: -2.117e+00 0.000e+00 -6.000e+00 -5.000e-01 ( 1.000e+00) fixed
47 Scale: 3.350e+03 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

4FGL J1606.2+1346
Spectrum: PowerLaw
48 Prefactor: 1.987e+00 0.000e+00 0.000e+00 1.000e+04 ( 1.000e-15) fixed
49 Index: -1.758e+00 0.000e+00 -6.000e+00 -5.000e-01 ( 1.000e+00) fixed
50 Scale: 9.069e+03 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

4FGL J1607.0+1550
Spectrum: LogParabola
51 norm: 5.769e-01 6.472e-02 0.000e+00 1.000e+04 ( 1.000e-11)
52 alpha: 2.146e+00 0.000e+00 5.000e-01 3.000e+00 ( 1.000e+00) fixed
53 beta: 1.080e-01 0.000e+00 0.000e+00 1.000e+00 ( 1.000e+00) fixed
54 Eb: 7.332e+02 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

4FGL J1608.7+1029
Spectrum: LogParabola
55 norm: 7.583e-01 1.681e-01 0.000e+00 1.000e+04 ( 1.000e-11)
56 alpha: 2.785e+00 1.983e-01 5.000e-01 3.000e+00 ( 1.000e+00)
57 beta: 1.537e-01 1.723e-01 0.000e+00 1.000e+00 ( 1.000e+00)
58 Eb: 5.413e+02 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

4FGL J1612.1+1407
Spectrum: LogParabola
59 norm: 1.932e+00 0.000e+00 0.000e+00 1.000e+04 ( 1.000e-13) fixed
60 alpha: 1.666e+00 0.000e+00 5.000e-01 3.000e+00 ( 1.000e+00) fixed
61 beta: 6.455e-01 0.000e+00 0.000e+00 1.000e+00 ( 1.000e+00) fixed
62 Eb: 1.674e+03 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

GalDiffModel
Spectrum: ConstantValue
63 Value: 1.061e+00 4.820e-02 1.000e-02 1.000e+01 ( 1.000e+00)

IsoDiffModel
Spectrum: FileFunction
64 Normalization: 1.219e+00 1.105e-01 1.000e-03 1.000e+03 ( 1.000e+00)

PG155+113
Spectrum: EblAtten::PowerLaw2
65 Integral: 1.000e+04 1.678e-01 0.000e+00 1.000e+04 ( 1.000e-12)
66 Index: -1.127e+00 2.542e-02 -5.000e+00 -5.000e-01 ( 1.000e+00)
67 LowerLimit: 1.000e+02 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed
68 UpperLimit: 3.000e+05 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed
69 tau_norm: 1.000e+00 0.000e+00 0.000e+00 2.500e+00 ( 1.000e+00) fixed
70 redshift: 4.900e-01 0.000e+00 0.000e+00 5.000e+00 ( 1.000e+00) fixed
71 ebl_model: 4.000e+00 0.000e+00 0.000e+00 2.000e+01 ( 1.000e+00) fixed
, '\n')
[FitMaker]: Results for the Fit
Source Name Npred TS
Values and (MINOS) errors for PG155+113
TS : 2165.52528596943
Integral : 10000.00 +/- 0.17 [ -24.64, + 0.00 ] 1e-12
Index : -1.13 +/- 0.03 [ -0.02, + 0.03 ] 1e+00
LowerLimit : 100.00 1e+00
UpperLimit : 300000.00 1e+00
tau_norm : 1.00 1e+00
redshift : 0.49 1e+00
ebl_model : 4.00 1e+00
('The covariance matrix is :\n', array([[2.81637566e-02, 9.08474938e-07],
[9.08474938e-07, 6.46158752e-04]]))

Source Flux [1.00e+02 MeV, 3.00e+05 MeV] :
4FGL J1531.6+0406 Integral Flux : 2.82e-09 +/- 0.00e+00 ph/cm2/s
4FGL J1539.1+1008 Integral Flux : 4.33e-09 +/- 0.00e+00 ph/cm2/s
4FGL J1541.7+1413 Integral Flux : 1.71e-09 +/- 0.00e+00 ph/cm2/s
4FGL J1543.3+1026 Integral Flux : 5.75e-09 +/- 0.00e+00 ph/cm2/s
4FGL J1543.6+0452 Integral Flux : 3.67e-09 +/- 0.00e+00 ph/cm2/s
4FGL J1546.0+0819 Integral Flux : 2.40e-09 +/- 0.00e+00 ph/cm2/s
4FGL J1547.9+0445 Integral Flux : 2.92e-09 +/- 0.00e+00 ph/cm2/s
4FGL J1548.3+1456 Integral Flux : 3.40e-09 +/- 1.75e-09 ph/cm2/s
4FGL J1550.7+0528 Integral Flux : 1.11e-08 +/- 0.00e+00 ph/cm2/s
4FGL J1552.0+0850 Integral Flux : 2.15e-09 +/- 0.00e+00 ph/cm2/s
4FGL J1553.6+1257 Integral Flux : 1.17e-07 +/- 8.42e-09 ph/cm2/s
4FGL J1556.5+1116 Integral Flux : 8.38e-09 +/- 0.00e+00 ph/cm2/s
4FGL J1600.4+0407 Integral Flux : 2.05e-09 +/- 0.00e+00 ph/cm2/s
4FGL J1603.8+1104 Integral Flux : 2.49e-09 +/- 0.00e+00 ph/cm2/s
4FGL J1606.2+1346 Integral Flux : 7.22e-10 +/- 0.00e+00 ph/cm2/s
4FGL J1607.0+1550 Integral Flux : 2.95e-08 +/- 3.31e-09 ph/cm2/s
4FGL J1608.7+1029 Integral Flux : 3.71e-08 +/- 8.19e-09 ph/cm2/s
4FGL J1612.1+1407 Integral Flux : 8.43e-10 +/- 0.00e+00 ph/cm2/s
GalDiffModel Integral Flux : 5.53e-04 +/- 2.51e-05 ph/cm2/s
IsoDiffModel Integral Flux : 1.50e-04 +/- 1.36e-05 ph/cm2/s
PG155+113 Integral Flux : 9.55e-09 +/- 4.70e-11 ph/cm2/s

time -p gtmodel srcmaps=/home/ajay/myanalysis/PG155+113_TestOfPG1553_FRONTBACK_PowerLaw2_srcMap.fits srcmdl=/home/ajay/myanalysis/PG155+113_PowerLaw2_TestOfPG1553_out.xml outfile=/home/ajay/myanalysis/PG155+113_TestOfPG1553_FRONTBACK_PowerLaw2_ModelMap.fits irfs="P8R3_SOURCE_V3" evtype="INDEF" expcube=/home/ajay/myanalysis/PG155+113_TestOfPG1553_FRONTBACK_ltCube.fits bexpmap=/home/ajay/myanalysis/PG155+113_TestOfPG1553_FRONTBACK_BinnedMap.fits convol=yes resample=yes rfactor=2 outtype="CMAP" psfcorr=yes phased_expmap=none edisp_bins=0 chatter=2 clobber=yes debug=no gui=no mode="ql"
real 25.48
user 21.26
sys 0.56
PrepareEbin /home/ajay/myanalysis/Spectrum/SED_PG155+113_PowerLaw2
WARNING:matplotlib.font_manager:findfont: Font family ['serif'] not found. Falling back to DejaVu Sans.
/home/ajay/Downloads/enrico/enrico/plotting.py:603: MatplotlibDeprecationWarning: savefig() got unexpected keyword argument "papertype" which is no longer supported as of 3.3 and will become an error two minor releases later
frameon=None)
/home/ajay/Downloads/enrico/enrico/plotting.py:603: MatplotlibDeprecationWarning: savefig() got unexpected keyword argument "bbox_inch" which is no longer supported as of 3.3 and will become an error two minor releases later
frameon=None)
/home/ajay/Downloads/enrico/enrico/plotting.py:603: MatplotlibDeprecationWarning: savefig() got unexpected keyword argument "frameon" which is no longer supported as of 3.3 and will become an error two minor releases later
frameon=None)

@davidsanchez
Copy link
Member

The warning should not be a problem

@ajaykhoj
Copy link
Author

Hi,

After the running the command " enrico_sed_plot myanalysis.conf " . When i try to plot SED , i get these warnings and unable to generate plot. To eliminate the warnings , i removed matplotlib cache files, but getting same errors and warnings.

(fermi2.0.8) ajay@ajay:~/enrico$ rm -r /.cache/matplotlib/
(fermi2.0.8) ajay@ajay:
/enrico$ enrico_plot_sed myanalysis.conf
Matplotlib is building the font cache; this may take a moment.
PrepareEbin /home/ajay/enrico/myanalysis/Spectrum/SED_S50716+714_PowerLaw2
WARNING:matplotlib.font_manager:findfont: Font family ['serif'] not found. Falling back to DejaVu Sans.
WARNING:matplotlib.font_manager:findfont: Generic family 'serif' not found because none of the following families were found: Computer Modern
WARNING:matplotlib.font_manager:findfont: Font family ['serif'] not found. Falling back to DejaVu Sans.
WARNING:matplotlib.font_manager:findfont: Generic family 'serif' not found because none of the following families were found: Computer Modern
WARNING:matplotlib.font_manager:findfont: Font family ['serif'] not found. Falling back to DejaVu Sans.
WARNING:matplotlib.font_manager:findfont: Generic family 'serif' not found because none of the following families were found: Computer Modern

@davidsanchez
Copy link
Member

the plot should be produced if all the options are well set

@ajaykhoj
Copy link
Author

Hello @davidsanchez

I have a query. I am analyzing a source, for that I am doing unbinnned likelihood and using NEWMINUIT optimizer. But the program suddenly killed when running "gtlike". I couldn't understand why this is happening. But when I tried it with the binned likelihood, it ran smoothly without any error. Now I just want to know why I am having this problem?
I have attached .conf file here.

(fermi) soumoya@soumoya-HP-Compaq-8200-Elite-SFF-PC:~/Downloads/ajay/enrico/S50716+714$ enrico_sed myanalysis.conf

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

*** SUMMARY: FRONTBACK ***

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

Source = S50716+714
RA = 110.473 degrees
Dec = 71.3434 degrees
Start = 247506217.0 MET (s)
Stop = 334165417.0 MET (s)
ROI = 10.0 degrees
E min = 100.0 MeV
E max = 300000.0 MeV
E min ext = 100.0 MeV
E max ext = 300000.0 MeV
IRFs = P8R3_SOURCE_V3
evclass = 128
evtype = 3

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

*** 1 gtselect --- Select data from library, coarse cut

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

time -p gtselect infile=/home/soumoya/Downloads/ajay/S50716+714/data.list outfile=/home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_TestofS50716+714_EvtCoarse.fits ra=110.473 dec=71.3434 rad=10.0 tmin=247506217.0 tmax=334165417.0 emin=0.0 emax=10000000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"
Done.
real 10.04
user 7.40
sys 0.64

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

*** 2 gtselect --- Select data from library, fine cut

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

time -p gtselect infile=/home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_TestofS50716+714_EvtCoarse.fits outfile=/home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_TestofS50716+714_FRONTBACK_Evt.fits ra=0.0 dec=0.0 rad=180.0 tmin="INDEF" tmax="INDEF" emin=100.0 emax=300000.0 zmin=0.0 zmax=90.0 evclass=128 evtype=3 convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"
Done.
real 0.55
user 0.47
sys 0.08

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

*** 3 gtmktime --- Update the GTI and cut data based on ROI

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

time -p gtmktime scfile=/home/soumoya/Downloads/ajay/S50716+714/L220512172346FD19599860_SC00.fits sctable="SC_DATA" filter="(DATA_QUAL>0)&&(LAT_CONFIG==1)" roicut=no evfile=/home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_TestofS50716+714_FRONTBACK_Evt.fits evtable="EVENTS" outfile="/home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_TestofS50716+714_FRONTBACK_MkTime.fits.tmp" apply_filter=yes overwrite=no header_obstimes=yes tstart=247506217.0 tstop=334165417.0 gtifile="default" chatter=2 clobber=yes debug=no gui=no mode="ql"
real 15.89
user 12.38
sys 0.55

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

*** 4 gtdiffrsp --- Compute Diffuse response

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

time -p gtdiffrsp evfile=/home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_TestofS50716+714_FRONTBACK_MkTime.fits evtable="EVENTS" scfile=/home/soumoya/Downloads/ajay/S50716+714/L220512172346FD19599860_SC00.fits sctable="SC_DATA" srcmdl=/home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_PowerLaw2_model.xml irfs="P8R3_SOURCE_V3" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=no chatter=2 clobber=yes debug=no gui=no mode="ql"
adding source GalDiffModel
adding source IsoDiffModel
Working on...
/home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_TestofS50716+714_FRONTBACK_MkTime.fits.....................!
real 10362.80
user 10353.08
sys 3.31

done

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

*** 5 gtbin --- Create count maps (square fully embed in the ROI circle)

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

time -p gtbin evfile=/home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_TestofS50716+714_FRONTBACK_MkTime.fits scfile=/home/soumoya/Downloads/ajay/S50716+714/L220512172346FD19599860_SC00.fits outfile=/home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_TestofS50716+714_FRONTBACK_CountMap.fits algorithm="CMAP" ebinalg="LOG" emin=100.0 emax=300000.0 enumbins=0 denergy=0.0 ebinfile=NONE tbinalg="LIN" tstart=0.0 tstop=0.0 dtime=0.0 tbinfile=NONE snratio=0.0 lcemin=0.0 lcemax=0.0 nxpix=141 nypix=141 binsz=0.1 coordsys="CEL" xref=110.473 yref=71.3434 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"
This is gtbin version HEAD
real 1.86
user 1.50
sys 0.10

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

*** 6 gtltcube --- Make live time cube

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

time -p gtltcube evfile="/home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_TestofS50716+714_FRONTBACK_MkTime.fits" evtable="EVENTS" scfile=/home/soumoya/Downloads/ajay/S50716+714/L220512172346FD19599860_SC00.fits sctable="SC_DATA" outfile=/home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_TestofS50716+714_FRONTBACK_ltCube.fits dcostheta=0.025 binsz=1.0 phibins=0 tmin=0.0 tmax=0.0 file_version="1" zmin=0.0 zmax=90.0 chatter=2 clobber=yes debug=no gui=no mode="ql"
Working on file /home/soumoya/Downloads/ajay/S50716+714/L220512172346FD19599860_SC00.fits
.....................!
real 3608.69
user 3603.65
sys 1.42
[FitMaker]: Compute the psf
time -p gtpsf expcube=/home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_TestofS50716+714_FRONTBACK_ltCube.fits outfile=/home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_TestofS50716+714_FRONTBACK_PowerLaw2_psf.fits outtable="PSF" irfs="P8R3_SOURCE_V3" evtype=3 ra=110.473 dec=71.3434 emin=100.0 emax=300000.0 nenergies=35 thetamax=5.0 ntheta=300 chatter=2 clobber=yes debug=no gui=no mode="ql"
Using evtype=3 (i.e., FRONT/BACK irfs)
real 1.80
user 1.87
sys 0.39

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

*** 7 gtexpmap --- Make an exposure map

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

time -p gtexpmap evfile=/home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_TestofS50716+714_FRONTBACK_MkTime.fits evtable="EVENTS" scfile=/home/soumoya/Downloads/ajay/S50716+714/L220512172346FD19599860_SC00.fits sctable="SC_DATA" expcube=/home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_TestofS50716+714_FRONTBACK_ltCube.fits outfile=/home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_TestofS50716+714_FRONTBACK_ExpMap.fits irfs="P8R3_SOURCE_V3" evtype=3 srcrad=25.0 nlong=120 nlat=120 nenergies=35 submap=no nlongmin=0 nlongmax=0 nlatmin=0 nlatmax=0 chatter=2 clobber=yes debug=no gui=no mode="ql"
The exposure maps generated by this tool are meant
to be used for unbinned likelihood analysis only.
Do not use them for binned analyses.
Using evtype=3 (i.e., FRONT/BACK irfs)
Computing the ExposureMap using /home/soumoya/Downloads/ajay/enrico/S50716+714/S50716+714_TestofS50716+714_FRONTBACK_ltCube.fits
....................!
real 442.46
user 430.28
sys 12.53
[Message]: Creating Likelihood object for component.
[Message]: Adding component to the summed likelihood.

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

*** 8 gtlike --- Run likelihood analysis

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

Fit output with NEWMINUIT: 2271570.333113697 [quality: 3]
Killed
(fermi) soumoya@soumoya-HP-Compaq-8200-Elite-SFF-PC:~/Downloads/ajay/enrico/S50716+714$

myanalysis.txt

@ajaykhoj
Copy link
Author

Hi,

It is not producing .srcmap.fits file while running enrico_sed.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

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

*** 10 Re-optimize ---

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

Fit output with NEWMINUIT: 85930.82926996409 [quality: 3]
[FitMaker]: Fit with gtlike performed

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

*** 11 PlotSED --- Generate SED plot

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

[Result]: Decorrelation energy : 6.41e+02 MeV
[Result]: Diffential flux at the Decorrelation energy : 3.75e-11 +/- 1.22e-12 ph/cm2/s/MeV
[Result]: SED value at the Decorrelation energy : 2.47e-11 +/- 8.04e-13 erg/cm2/s
WARNING:matplotlib.font_manager:findfont: Font family ['serif'] not found. Falling back to DejaVu Sans.
WARNING:matplotlib.font_manager:findfont: Generic family 'serif' not found because none of the following families were found: Computer Modern
WARNING:matplotlib.font_manager:findfont: Font family ['serif'] not found. Falling back to DejaVu Sans.
WARNING:matplotlib.font_manager:findfont: Generic family 'serif' not found because none of the following families were found: Computer Modern
<class 'NameError'>
("name 'par' is not defined",)
name 'par' is not defined

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

*** 12 Results --- Print results of the fit

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

(4FGL J0636.7+7139
Spectrum: PowerLaw
0 Prefactor: 2.227e+00 5.061e-01 0.000e+00 1.000e+04 ( 1.000e-12)
1 Index: -2.310e+00 0.000e+00 -6.000e+00 -5.000e-01 ( 1.000e+00) fixed
2 Scale: 1.274e+03 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed

GalDiffModel
Spectrum: ConstantValue
3 Value: 5.498e-01 1.048e-01 1.000e-02 1.000e+01 ( 1.000e+00)

IsoDiffModel
Spectrum: FileFunction
4 Normalization: 1.877e+00 1.626e-01 1.000e-03 1.000e+03 ( 1.000e+00)

S50716+714
Spectrum: EblAtten::LogParabola
5 norm: 6.776e-01 2.524e-02 0.000e+00 1.000e+04 ( 1.000e-11)
6 alpha: 2.051e+00 2.671e-02 5.000e-01 3.000e+00 ( 1.000e+00)
7 beta: 6.277e-02 1.595e-02 0.000e+00 1.000e+00 ( 1.000e+00)
8 Eb: 1.511e+03 0.000e+00 3.000e+01 3.000e+05 ( 1.000e+00) fixed
9 tau_norm: 1.000e+00 0.000e+00 0.000e+00 2.500e+00 ( 1.000e+00) fixed
10 redshift: 3.000e-01 0.000e+00 0.000e+00 5.000e+00 ( 1.000e+00) fixed
11 ebl_model: 4.000e+00 0.000e+00 0.000e+00 2.000e+01 ( 1.000e+00) fixed
, '\n')
[FitMaker]: Results for the Fit
Source Name Npred TS
Values and (MINOS) errors for S50716+714
TS : 4348.288437577983
norm : 0.68 +/- 0.03 [ -0.02, + 0.03 ] 1e-11
alpha : 2.05 +/- 0.03 [ -0.03, + 0.03 ] 1e+00
beta : 0.06 +/- 0.02 [ -0.02, + 0.02 ] 1e+00
Eb : 1510.63 1e+00
tau_norm : 1.00 1e+00
redshift : 0.30 1e+00
ebl_model : 4.00 1e+00
('The covariance matrix is :\n', array([[ 6.36870640e-04, -1.80474816e-04, 2.10700349e-04],
[-1.80474816e-04, 7.13246568e-04, 5.98677890e-05],
[ 2.10700349e-04, 5.98677890e-05, 2.54412767e-04]]))

Source Flux [1.00e+02 MeV, 3.00e+05 MeV] :
4FGL J0636.7+7139 Integral Flux : 6.08e-08 +/- 1.38e-08 ph/cm2/s
GalDiffModel Integral Flux : 2.86e-04 +/- 5.46e-05 ph/cm2/s
IsoDiffModel Integral Flux : 2.31e-04 +/- 2.00e-05 ph/cm2/s
S50716+714 Integral Flux : 1.33e-07 +/- 7.14e-09 ph/cm2/s

time -p gtmodel srcmaps=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_LogParabola_srcMap.fits srcmdl=/home/ajay/enrico/S5_test1/S50716+714_LogParabola_TestofS5_out.xml outfile=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_LogParabola_ModelMap.fits irfs="P8R3_SOURCE_V3" evtype="INDEF" expcube=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_ltCube.fits bexpmap=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_BinnedMap.fits convol=yes resample=yes rfactor=2 outtype="CMAP" psfcorr=yes phased_expmap=none edisp_bins=0 chatter=2 clobber=yes debug=no gui=no mode="ql"
Parameter srcmaps: file "/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_LogParabola_srcMap.fits" is not accessible in mode r.
Caught N5hoops12ApeExceptionE at the top level: Exception while querying for file name parameter srcmaps for component gtmodel; Ape exception code 43 (at /usr/share/miniconda/conda-bld/fermitools_1611158415999/work/hoops/build/debianstretch/sid-x86_64-64bit-gcc75-Optimized/src/hoops_ape.cxx: 565)
[Message] Warning: An error ocurred, retrying ...
time -p gtmodel srcmaps=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_LogParabola_srcMap.fits srcmdl=/home/ajay/enrico/S5_test1/S50716+714_LogParabola_TestofS5_out.xml outfile=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_LogParabola_ModelMap.fits irfs="P8R3_SOURCE_V3" evtype="INDEF" expcube=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_ltCube.fits bexpmap=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_BinnedMap.fits convol=yes resample=yes rfactor=2 outtype="CMAP" psfcorr=yes phased_expmap=none edisp_bins=0 chatter=2 clobber=yes debug=no gui=no mode="ql"
Parameter srcmaps: file "/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_LogParabola_srcMap.fits" is not accessible in mode r.
Caught N5hoops12ApeExceptionE at the top level: Exception while querying for file name parameter srcmaps for component gtmodel; Ape exception code 43 (at /usr/share/miniconda/conda-bld/fermitools_1611158415999/work/hoops/build/debianstretch/sid-x86_64-64bit-gcc75-Optimized/src/hoops_ape.cxx: 565)
[Message] Warning: An error ocurred, retrying ...
time -p gtmodel srcmaps=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_LogParabola_srcMap.fits srcmdl=/home/ajay/enrico/S5_test1/S50716+714_LogParabola_TestofS5_out.xml outfile=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_LogParabola_ModelMap.fits irfs="P8R3_SOURCE_V3" evtype="INDEF" expcube=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_ltCube.fits bexpmap=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_BinnedMap.fits convol=yes resample=yes rfactor=2 outtype="CMAP" psfcorr=yes phased_expmap=none edisp_bins=0 chatter=2 clobber=yes debug=no gui=no mode="ql"
Parameter srcmaps: file "/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_LogParabola_srcMap.fits" is not accessible in mode r.
Caught N5hoops12ApeExceptionE at the top level: Exception while querying for file name parameter srcmaps for component gtmodel; Ape exception code 43 (at /usr/share/miniconda/conda-bld/fermitools_1611158415999/work/hoops/build/debianstretch/sid-x86_64-64bit-gcc75-Optimized/src/hoops_ape.cxx: 565)
[Message] Warning: An error ocurred, retrying ...
time -p gtmodel srcmaps=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_LogParabola_srcMap.fits srcmdl=/home/ajay/enrico/S5_test1/S50716+714_LogParabola_TestofS5_out.xml outfile=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_LogParabola_ModelMap.fits irfs="P8R3_SOURCE_V3" evtype="INDEF" expcube=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_ltCube.fits bexpmap=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_BinnedMap.fits convol=yes resample=yes rfactor=2 outtype="CMAP" psfcorr=yes phased_expmap=none edisp_bins=0 chatter=2 clobber=yes debug=no gui=no mode="ql"
Parameter srcmaps: file "/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_LogParabola_srcMap.fits" is not accessible in mode r.
Caught N5hoops12ApeExceptionE at the top level: Exception while querying for file name parameter srcmaps for component gtmodel; Ape exception code 43 (at /usr/share/miniconda/conda-bld/fermitools_1611158415999/work/hoops/build/debianstretch/sid-x86_64-64bit-gcc75-Optimized/src/hoops_ape.cxx: 565)
[Message] Warning: An error ocurred, retrying ...
time -p gtmodel srcmaps=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_LogParabola_srcMap.fits srcmdl=/home/ajay/enrico/S5_test1/S50716+714_LogParabola_TestofS5_out.xml outfile=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_LogParabola_ModelMap.fits irfs="P8R3_SOURCE_V3" evtype="INDEF" expcube=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_ltCube.fits bexpmap=/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_BinnedMap.fits convol=yes resample=yes rfactor=2 outtype="CMAP" psfcorr=yes phased_expmap=none edisp_bins=0 chatter=2 clobber=yes debug=no gui=no mode="ql"
Parameter srcmaps: file "/home/ajay/enrico/S5_test1/S50716+714_TestofS5_FRONTBACK_LogParabola_srcMap.fits" is not accessible in mode r.
Caught N5hoops12ApeExceptionE at the top level: Exception while querying for file name parameter srcmaps for component gtmodel; Ape exception code 43 (at /usr/share/miniconda/conda-bld/fermitools_1611158415999/work/hoops/build/debianstretch/sid-x86_64-64bit-gcc75-Optimized/src/hoops_ape.cxx: 565)
[Message] Warning: An error ocurred, retrying ...

*** Error [Message]: An error ocurred and could not be recovered. Exiting! ***

(fermi2.0.8) ajay@ajay:~/enrico/S5_test1$

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Any help is much appreciated. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants