gammapy/enrico

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

Closed this issue · 3 comments

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

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?

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.

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