fermi-lat / Likelihood

BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Occured Error by pylikelihood at v1.0.2. #41

Closed FurutaT closed 5 years ago

FurutaT commented 5 years ago

I had tried BinnedAnalysis of pyLikelihood by fermitools v1.0.2, but got following Errors. When I running the same program by v1.0.1, I got good results. Although I deleted .par file in ~/pfiles, Has not been resolved.

############################################################## (fermi) [furuta@hozuki 2GeV-]$ conda list fermi packages in environment at /home/user/anaconda3/envs/fermi:

Name Version Build Channel fermitools 1.0.2 py27h39e3cac_0 fermi fermitools-data 0.17 0 fermi

(fermi) [furuta@hozuki ]$ python Python 2.7.14 | packaged by conda-forge | (default, Oct 5 2017, 14:19:56) [GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import pyLikelihood

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

from BinnedAnalysis import * obs = BinnedObs(srcMaps=SRCM,expCube=LTCB,binnedExpMap=EXPM,irfs='P8R2_SOURCE_V6')

like1 = BinnedAnalysis(obs,XMLM,optimizer='DRMNGB') Traceback (most recent call last): File "", line 1, in File "/home/furuta/anaconda3/envs/fermi/lib/python2.7/site-packages/fermitools/BinnedAnalysis.py", line 169, in init delete_local_fixed=delete_local_fixed) File "/home/furuta/anaconda3/envs/fermi/lib/python2.7/site-packages/fermitools/BinnedAnalysis.py", line 43, in BinnedConfig kwargs.get('delete_local_fixed', False)) File "/home/furuta/anaconda3/envs/fermi/lib/python2.7/site-packages/fermitools/pyLikelihood.py", line 5092, in init this = _pyLikelihood.new_BinnedLikeConfig(*args) NotImplementedError: Wrong number or type of arguments for overloaded function 'new_BinnedLikeConfig'. Possible C/C++ prototypes are: Likelihood::BinnedLikeConfig::BinnedLikeConfig(bool,bool,bool,bool,double,double,Likelihood::PsfIntegConfig::PSFIntegType,double,double,bool,int,bool,bool,bool,bool,bool) Likelihood::BinnedLikeConfig::BinnedLikeConfig(bool,bool,bool,bool,double,double,Likelihood::PsfIntegConfig::PSFIntegType,double,double,bool,int,bool,bool,bool,bool) Likelihood::BinnedLikeConfig::BinnedLikeConfig(bool,bool,bool,bool,double,double,Likelihood::PsfIntegConfig::PSFIntegType,double,double,bool,int,bool,bool,bool) Likelihood::BinnedLikeConfig::BinnedLikeConfig(bool,bool,bool,bool,double,double,Likelihood::PsfIntegConfig::PSFIntegType,double,double,bool,int,bool,bool) Likelihood::BinnedLikeConfig::BinnedLikeConfig(bool,bool,bool,bool,double,double,Likelihood::PsfIntegConfig::PSFIntegType,double,double,bool,int,bool) Likelihood::BinnedLikeConfig::BinnedLikeConfig(bool,bool,bool,bool,double,double,Likelihood::PsfIntegConfig::PSFIntegType,double,double,bool,int) Likelihood::BinnedLikeConfig::BinnedLikeConfig(bool,bool,bool,bool,double,double,Likelihood::PsfIntegConfig::PSFIntegType,double,double,bool) Likelihood::BinnedLikeConfig::BinnedLikeConfig(bool,bool,bool,bool,double,double,Likelihood::PsfIntegConfig::PSFIntegType,double,double) Likelihood::BinnedLikeConfig::BinnedLikeConfig(bool,bool,bool,bool,double,double,Likelihood::PsfIntegConfig::PSFIntegType,double) Likelihood::BinnedLikeConfig::BinnedLikeConfig(bool,bool,bool,bool,double,double,Likelihood::PsfIntegConfig::PSFIntegType) Likelihood::BinnedLikeConfig::BinnedLikeConfig(bool,bool,bool,bool,double,double) Likelihood::BinnedLikeConfig::BinnedLikeConfig(bool,bool,bool,bool,double) Likelihood::BinnedLikeConfig::BinnedLikeConfig(bool,bool,bool,bool) Likelihood::BinnedLikeConfig::BinnedLikeConfig(bool,bool,bool) Likelihood::BinnedLikeConfig::BinnedLikeConfig(bool,bool) Likelihood::BinnedLikeConfig::BinnedLikeConfig(bool) Likelihood::BinnedLikeConfig::BinnedLikeConfig() Likelihood::BinnedLikeConfig::BinnedLikeConfig(Likelihood::BinnedLikeConfig const &)

nmirabal commented 5 years ago

We are looking into this. Can you work with Fermitools v1.0.1 for now?.

FurutaT commented 5 years ago

I can work pylikelihood with v1.0.1 now. But I do not work with changing to v1.0.2.

2019年5月1日(水) 2:24 nmirabal notifications@github.com:

We are looking into this. Can you work with Fermitools v1.0.1 for now?.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fermi-lat/Likelihood/issues/41#issuecomment-488040648, or mute the thread https://github.com/notifications/unsubscribe-auth/AJQNGIPSN7MWLS3KQFH7XGDPTB6EPANCNFSM4HJIIQCA .

drzchang commented 5 years ago

Same error on my macOS.

dmalishev commented 5 years ago

Same bug here. Trying to evercome it following the way it is done in analysis threads, i.e.: import pyLikelihood from BinnedAnalysis import * obs = BinnedObs(srcMaps='CenA_srcMaps.fits',expCube='CenA_ltcube.fits',binnedExpMap='CenA_BinnedExpMap.fits',irfs='CALDB') like1 = BinnedAnalysis(obs,'CenA_model.xml',optimizer='MINUIT')

I've got another error

analysis = binnedAnalysis (obs, xml_model, optimizer='MINUIT') File "/home/tu/tu_tu/tu_pside01/FERMI/Soft/MiniConda3/envs/fermi/lib/python2.7/site-packages/fermitools/BinnedAnalysis.py", line 319, in binnedAnalysis irfs=irfs, phased_expmap=phased_expmap) File "/home/tu/tu_tu/tu_pside01/FERMI/Soft/MiniConda3/envs/fermi/lib/python2.7/site-packages/fermitools/BinnedAnalysis.py", line 51, in init expCube) File "/home/tu/tu_tu/tu_pside01/FERMI/Soft/MiniConda3/envs/fermi/lib/python2.7/site-packages/fermitools/BinnedAnalysis.py", line 114, in _obsDialog paramDict = MyOrderedDict() NameError: global name 'MyOrderedDict' is not defined

donhorner commented 5 years ago

We have a beta release that should fix this issue. It would be great if any of you could test it. You can install the beta (we recommend creating a separate conda environment for testing) with the command:

conda create --name fermi_dev -c conda-forge/label/cf201901 -c fermi/label/beta -c fermi fermitools=1.0.5

Due to some metadata changes, it will probably also install fermitools-data and some other packages again.

You can see full instructions on this page: https://github.com/fermi-lat/Fermitools-conda/wiki/Testing-the-Fermitools

Let us know if it works. Any feedback would be appreciated.

FurutaT commented 5 years ago

I tried pyLIkelihood after change Fermitools v1.0.5. I didn't get any Error!!

2019年5月15日(水) 0:01 Don Horner notifications@github.com:

We have a beta release that should fix this issue. It would be great if any of you could test it. You can install the beta (we recommend creating a separate conda environment for testing) with the command:

conda create --name fermi_dev -c conda-forge/label/cf201901 -c fermi/label/beta -c fermi fermitools=1.0.5

Due to some metadata changes, it will probably also install fermitools-data and some other packages again.

You can see full instructions on this page: https://github.com/fermi-lat/Fermitools-conda/wiki/Testing-the-Fermitools

Let us know if it works. Any feedback would be appreciated.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fermi-lat/Likelihood/issues/41?email_source=notifications&email_token=AJQNGIN67TYFISSPW4L5VVDPVLH5NA5CNFSM4HJIIQCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVLYS2I#issuecomment-492276073, or mute the thread https://github.com/notifications/unsubscribe-auth/AJQNGIMN4TYHBURI53LRTT3PVLH5NANCNFSM4HJIIQCA .

donhorner commented 5 years ago

@FurutaT Thanks for checking. We'll probably officially release the new version early next week.

jasercion commented 5 years ago

A fix for this has been included in the latest release of the Fermitools (Fermitools=1.0.5).