-
Notifications
You must be signed in to change notification settings - Fork 26
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
enrico_sed issue: Error in "Preparing submission of fit into energy bins" #157
Comments
Hi |
Hi @davidsanchez, |
Do you have the output of the fit ? |
Yes, I have the .results file and also fitted models and figures in the Spectrum folder. |
I mean could you pass here the output (not the file but what is printed on the screen/log) |
The following is the GTLIKE output: *************************************************************** 8 gtlike --- Run likelihood analysis************************************************************Fit output with MINUIT: 49240.716557181666 [quality: 3] *************************************************************** 9 Remove all the weak (TS<1.00) sources************************************************************[FitMaker]: deleting source 4FGL J1332.6-1256 with TS = -0.00712294147524517 from the model *************************************************************** 10 Re-optimize ---************************************************************Fit output with MINUIT: 49237.40090700385 [quality: 3] |
No value of the source parameters? |
Yes, the source parameters are given below. Sorry for being late. *************************************************************** 12 Results --- Print results of the fit************************************************************(4FGL J1418.4-0233 4FGL J1433.0-1801 4FGL J1503.7-1540 4FGL J1505.0+0326 4FGL J1510.8-0542 4FGL J1512.2+0202 4FGL J1517.7-2422 4FGL J1544.5-1126 4FGL J1549.8-0659 GalDiffModel IsoDiffModel PKS1510 Source Flux [1.00e+02 MeV, 3.00e+05 MeV] : [Message]: Save Ebin results inAfter this last line, "Preparing submission of fit into energy bins" starts and gives the error I am facing. |
Since beta = 0 I wonder is there is not a problem when computing the Ebin value for the preparation. |
I have not checked that. I will soon get back to you after trying with power-law. |
Hi @davidsanchez, *************************************************************** 8 gtlike --- Run likelihood analysis************************************************************Fit output with NEWMINUIT: 488804.9949750247 [quality: 3] *************************************************************** 9 Remove all the weak (TS<1.00) sources************************************************************[FitMaker]: deleting source 4FGL J1332.6-1256 with TS = -0.04718278115615249 from the model *************************************************************** 10 Re-optimize ---************************************************************Fit output with NEWMINUIT: 488835.58915209485 [quality: 3] *************************************************************** 11 PlotSED --- Generate SED plot************************************************************[Result]: Decorrelation energy : 3.62e+02 MeV *************************************************************** 12 Results --- Print results of the fit************************************************************(4FGL J1418.4-0233 4FGL J1427.4-1823 4FGL J1433.0-1801 4FGL J1440.0-1530 4FGL J1441.4-1934 4FGL J1445.0-0326 4FGL J1458.8-2120 4FGL J1510.8-0542 4FGL J1512.2+0202 4FGL J1517.7-2422 4FGL J1520.8-0348 4FGL J1532.7-1319 4FGL J1549.5+0236 GalDiffModel IsoDiffModel PKS1510 Source Flux [1.00e+02 MeV, 3.00e+05 MeV] : [Message]: Save Ebin results in *************************************************************** Preparing submission of fit into energy bins ***************************************************************('Emin = 100.0 MeV', 'Emax = 300000.0 MeV', 'Nbins = 6') During handling of the above exception, another exception occurred: Traceback (most recent call last): |
I will try to reproduce the error |
I am working on it. it tooks time since our cluster was down. |
Hi I am not able to reproduce the problem you have; I am not using the last fermitools but I will update and retry` d |
Thanks, @davidsanchez for your kind effort. |
Hi, I have the same problem. Is there a solution to this problem? |
Hi |
Thank you for your prompt reply. Of course, I am running the sed for mrk 421 with NumEnergyBins = 7. In the Ebin # / folder is created the .confg file for the 0th energy but is empty. The file mrk421.conf : Default config and validation file for Enrico.Besides providing default options it is also usedto check the user config file.Options without default options here must bespecified in the user config fileFolder where the output will be storedout = /home/marisol/Desktop/sed_mkr421-prueba/datos verbosityverbose = yes [target] [space] [file] [time] [energy] [event] [analysis] [environ] [fitting] [model] [Spectrum] [UpperLimit] [LightCurve] [BayesianBlocks] [FoldedLC] [AppLC] [Ebin] [TSMap] [findsrc] [srcprob] [Contours] [ComponentAnalysis] |
Hi, I have the same error, did you manage to solve it ? *************************************************************** Preparing submission of fit into energy bins ***************************************************************('Emin = 442.894 MeV', 'Emax = 300000.0 MeV', 'Nbins = 3') During handling of the above exception, another exception occurred: Traceback (most recent call last): |
Hi, If you change config.write(open(config['out'] + '/' +filename, 'w')) with config.write(open(config['out'] + '/' +filename, 'wb')) it works without a problem. |
Hi, I confirm that it works without problem by correcting what you mention in the file /home/user/enrico/enrico/energybin.py, thank you so much! ('w' by 'wb') |
Hi |
Hi, I am facing the following error while running enrico_sed.
After fitting the spectrum over the full energy range with GTLIKE, it shows the following error:
************************************************************
*** Preparing submission of fit into energy bins ***
************************************************************
('Emin = 100.0 MeV', 'Emax = 300000.0 MeV', 'Nbins = 5')
Debug: read energy bins: logE
Energy bins (before energy cuts): [1.00000000e+02 4.95934420e+02 2.45950949e+03 1.21975541e+04
6.04918691e+04 3.00000000e+05]
Energy bins (after energy cuts): [1.00000000e+02 4.95934420e+02 2.45950949e+03 1.21975541e+04
6.04918691e+04 3.00000000e+05]
[Message]: Submitting # 0 at energy 222
Traceback (most recent call last):
File "/home/hegro/enrico/bin/enrico_sed", line 48, in
liste = np.genfromtxt(sys.argv[1],dtype="str",unpack=True)
File "/home/hegro/anaconda3/envs/fermi/lib/python3.7/site-packages/numpy/lib/npyio.py", line 2068, in genfromtxt
raise ValueError(errmsg)
ValueError: Some errors were detected !
Line #9 (got 1 columns instead of 3)
Line #20 (got 1 columns instead of 3)
Line #29 (got 1 columns instead of 3)
Line #37 (got 1 columns instead of 3)
Line #43 (got 1 columns instead of 3)
Line #49 (got 1 columns instead of 3)
Line #54 (got 1 columns instead of 3)
Line #70 (got 1 columns instead of 3)
Line #79 (got 1 columns instead of 3)
Line #85 (got 1 columns instead of 3)
Line #101 (got 1 columns instead of 3)
Line #111 (got 1 columns instead of 3)
Line #123 (got 1 columns instead of 3)
Line #142 (got 1 columns instead of 3)
Line #158 (got 1 columns instead of 3)
Line #166 (got 1 columns instead of 3)
Line #181 (got 1 columns instead of 3)
Line #195 (got 1 columns instead of 3)
Line #206 (got 1 columns instead of 3)
Line #212 (got 1 columns instead of 3)
Line #222 (got 1 columns instead of 3)
Line #226 (got 1 columns instead of 3)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/hegro/enrico/bin/enrico_sed", line 55, in
sed(config,infile)
File "/home/hegro/enrico/bin/enrico_sed", line 13, in sed
run(infile)
File "/home/hegro/enrico/enrico/RunGTlike.py", line 262, in run
energybin.RunEbin(folder,Nbin,Fit,FitRunner,sedresult)
File "/home/hegro/enrico/enrico/energybin.py", line 209, in RunEbin
configfiles = PrepareEbin(Fit, FitRunner,sedresult)
File "/home/hegro/enrico/enrico/energybin.py", line 202, in PrepareEbin
config.write(open(config['out'] + '/' +filename, 'w')) #save the config file in a ascii file
File "/home/hegro/enrico/enrico/extern/configobj.py", line 2098, in write
outfile.write(output_bytes)
TypeError: write() argument must be str, not bytes
It seems that there are two different issues. One in "/home/hegro/enrico/bin/enrico_sed", line 48 and another in "/home/hegro/enrico/enrico/extern/configobj.py", line 2098. The program stops just before making the configuration file for the first energy bin.
The text was updated successfully, but these errors were encountered: