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

FunctionFactory::create: Cannot create Function named EblAtten::PowerLaw. #145

Closed amit008shukla closed 5 years ago

amit008shukla commented 5 years ago

Hi, I am running unbinned lightcurve using enrico, and I am ending up with an error which is listed below: FunctionFactory::create: Cannot create Function named EblAtten::PowerLaw.

Traceback (most recent call last): File "/home/enrico/bin/enrico_sed", line 53, in sed(config,infile) File "/home/enrico/bin/enrico_sed", line 13, in sed run(infile) File "/home/enrico/enrico/RunGTlike.py", line 147, in run FitRunner,Fit = GenAnalysisObjects(config) File "/home//enrico/enrico/RunGTlike.py", line 126, in GenAnalysisObjects Fit_component = Analyse.CreateLikeObject() File "/home//enrico/enrico/fitmaker.py", line 109, in CreateLikeObject optimizer=self.config['fitting']['optimizer']) File "/home/anaconda2/envs/fermi/lib/python2.7/site-packages/fermitools/UnbinnedAnalysis.py", line 154, in init self.logLike.readXml(srcModel, _funcFactory, True, True, False) File "/home/anaconda2/envs/fermi/lib/python2.7/site-packages/fermitools/pyLikelihood.py", line 14220, in readXml return _pyLikelihood.SourceModel_readXml(self, xmlFile, funcFactory, requireExposure, addPointSources, loadMaps) RuntimeError: FunctionFactory::create: Cannot create Function named EblAtten::PowerLaw.

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

I will be glad if you help me to solve this issue. best regards

davidsanchez commented 5 years ago

Hi In the doc of the Science tools, I am not able to find the EBL model anymore. Did you check that such model still is supported ? did you try enrico_xml first?

amit008shukla commented 5 years ago

Yes, I ran enrico_xml as well. Same error. I am also getting this error: RuntimeError: Parameter::extractDomData: In the XML description of parameter Cutoff, An attempt has been made to set the parameter value outside of the specified bounds. OError: [Errno 2] No such file or directory: '/home/test/Ebin10/Spectrum/SED_Source_PowerLaw.dat'

If I remove all the sources which have Cutoff spectrum then it runs.

and If I put redshift (Z)=0 then I do not get this error: FunctionFactory::create: Cannot create Function named EblAtten::PowerLaw.

mireianievas commented 5 years ago

I think EblAtten::PowerLaw never existed, you had to use LogParabola fixing b=0.