smodels 3.0.2__tar.gz → 3.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {smodels-3.0.2 → smodels-3.0.3}/Makefile +17 -2
- {smodels-3.0.2/smodels.egg-info → smodels-3.0.3}/PKG-INFO +19 -3
- {smodels-3.0.2/smodels → smodels-3.0.3}/README.rst +4 -1
- smodels-3.0.3/pyproject.toml +3 -0
- {smodels-3.0.2 → smodels-3.0.3}/setup.py +4 -1
- {smodels-3.0.2 → smodels-3.0.3/smodels}/README.rst +4 -1
- {smodels-3.0.2 → smodels-3.0.3}/smodels/experiment/databaseObj.py +1 -1
- {smodels-3.0.2 → smodels-3.0.3}/smodels/installation.py +7 -5
- {smodels-3.0.2 → smodels-3.0.3}/smodels/statistics/speyTools.py +52 -41
- smodels-3.0.3/smodels/tools/printers/__init__.py +5 -0
- smodels-3.0.3/smodels/tools/printers/basicPrinter.py +164 -0
- smodels-3.0.3/smodels/tools/printers/masterPrinter.py +108 -0
- smodels-3.0.3/smodels/tools/printers/pythonPrinter.py +424 -0
- smodels-3.0.3/smodels/tools/printers/slhaPrinter.py +234 -0
- smodels-3.0.3/smodels/tools/printers/summaryPrinter.py +190 -0
- smodels-3.0.3/smodels/tools/printers/txtPrinter.py +484 -0
- smodels-3.0.3/smodels/tools/printers/xmlPrinter.py +115 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/pythia8Wrapper.py +8 -5
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/wrapperBase.py +7 -7
- smodels-3.0.3/smodels/version +1 -0
- {smodels-3.0.2 → smodels-3.0.3/smodels.egg-info}/PKG-INFO +19 -3
- {smodels-3.0.2 → smodels-3.0.3}/smodels.egg-info/SOURCES.txt +10 -1
- smodels-3.0.2/smodels/version +0 -1
- {smodels-3.0.2 → smodels-3.0.3}/MANIFEST.in +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/inputFiles/lhe/gluino_squarks.lhe +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/inputFiles/lhe/simplyGluino.lhe +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/inputFiles/slha/TRV1_1800_300_300.slha +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/inputFiles/slha/complicated.slha +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/inputFiles/slha/ew_ymi2l51r.slha +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/inputFiles/slha/gluinoToTops.slha +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/inputFiles/slha/gluino_squarks.slha +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/inputFiles/slha/higgsinoStop.slha +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/inputFiles/slha/higgsino_spectrum_520_125_dm_10.slha +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/inputFiles/slha/higgsino_spectrum_520_125_dm_4.slha +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/inputFiles/slha/idm_example.slha +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/inputFiles/slha/lightEWinos.slha +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/inputFiles/slha/lightEWinos_simple.slha +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/inputFiles/slha/longLived.slha +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/inputFiles/slha/simplyGluino.slha +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/setup.cfg +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/COPYING +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/INSTALLATION.rst +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/__init__.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/base/__init__.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/base/crossSection.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/base/exceptions.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/base/genericSMS.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/base/inclusiveObjects.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/base/lheReader.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/base/model.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/base/particle.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/base/particleNode.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/base/physicsUnits.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/base/runtime.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/base/smodelsLogging.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/decomposition/__init__.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/decomposition/decomposer.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/decomposition/exceptions.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/decomposition/theorySMS.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/decomposition/topologyDict.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/etc/input_resummino.in +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/etc/iplots_parameters.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/etc/iplots_parameters_IDM.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/etc/logging.conf +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/etc/logging_consoleonly.conf +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/etc/logging_file.conf +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/etc/parameters_default.ini +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/etc/pythia.card +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/etc/pythia8.cfg +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/etc/resummino.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/experiment/__init__.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/experiment/datasetObj.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/experiment/defaultFinalStates.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/experiment/exceptions.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/experiment/expAuxiliaryFuncs.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/experiment/expResultObj.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/experiment/expSMS.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/experiment/expSMSDict.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/experiment/graphMatching.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/experiment/infoObj.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/experiment/metaObj.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/experiment/reweighting.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/experiment/txnameDataObj.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/experiment/txnameObj.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/Makefile +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/Makefile +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/Makefile +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/gdcpl_nllnlo_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/gdcpl_nllnlo_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/gg_nllnlo_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/gg_nllnlo_hm_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/gg_nllnlo_hm_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/gg_nllnlo_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/nllfast-1.2.f +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/sb_nllnlo_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/sb_nllnlo_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/sdcpl_nllnlo_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/sdcpl_nllnlo_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/sg_nllnlo_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/sg_nllnlo_hm_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/sg_nllnlo_hm_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/sg_nllnlo_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/ss_nllnlo_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/ss_nllnlo_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/st_nllnlo_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/st_nllnlo_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/tot_nllnlo_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-1.2/tot_nllnlo_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/Makefile +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/gdcpl_nllnlo_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/gdcpl_nllnlo_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/gg_nllnlo_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/gg_nllnlo_hm_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/gg_nllnlo_hm_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/gg_nllnlo_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/nllfast-2.1.f +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/sb_nllnlo_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/sb_nllnlo_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/sdcpl_nllnlo_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/sdcpl_nllnlo_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/sg_nllnlo_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/sg_nllnlo_hm_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/sg_nllnlo_hm_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/sg_nllnlo_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/ss_nllnlo_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/ss_nllnlo_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/st_nllnlo_cteq6.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-2.1/st_nllnlo_mstw2008.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/Makefile +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/gdcpl_nllnlo_cteq66_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/gdcpl_nllnlo_mstw2008_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/gdcpl_nllnlo_nnpdf30_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/gg_nllnlo_cteq66_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/gg_nllnlo_hm_cteq66_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/gg_nllnlo_hm_mstw2008_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/gg_nllnlo_hm_nnpdf30_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/gg_nllnlo_mstw2008_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/gg_nllnlo_nnpdf30_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/nllfast-3.1-13TeV.f +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/sb_nllnlo_cteq66_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/sb_nllnlo_mstw2008_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/sb_nllnlo_nnpdf30_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/sdcpl_nllnlo_cteq66_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/sdcpl_nllnlo_mstw2008_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/sdcpl_nllnlo_nnpdf30_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/sg_nllnlo_cteq66_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/sg_nllnlo_hm_cteq66_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/sg_nllnlo_hm_mstw2008_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/sg_nllnlo_hm_nnpdf30_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/sg_nllnlo_mstw2008_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/sg_nllnlo_nnpdf30_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/ss_nllnlo_cteq66_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/ss_nllnlo_mstw2008_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/ss_nllnlo_nnpdf30_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/st_nllnlo_cteq66_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/st_nllnlo_mstw2008_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/nllfast/nllfast-3.1/st_nllnlo_nnpdf30_13TeV.grid +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/pythia6/Makefile +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/pythia6/pythia-6.4.27.f +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/pythia6/pythia_lhe.f +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/pythia8/Makefile +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/pythia8/installer.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/pythia8/parseXml.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/pythia8/pythia8.cc +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/pythia8/pythiaversion +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/pythia8/xml.doc +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/resummino/Makefile +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/resummino/clean.sh +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/resummino/install.sh +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/lib/resummino/versions.txt +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/matching/__init__.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/matching/clusterTools.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/matching/exceptions.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/matching/matcherAuxiliaryFuncs.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/matching/modelTester.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/matching/theoryPrediction.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/share/BANNER +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/share/__init__.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/share/models/SMparticles.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/share/models/__init__.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/share/models/dgmssm.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/share/models/idm.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/share/models/mssm.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/share/models/mssmQNumbers.slha +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/share/models/nmssm.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/share/models/zprime.slha +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/share/pythia_test.card +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/share/requirements.txt +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/statistics/__init__.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/statistics/analysesCombinations.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/statistics/basicStats.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/statistics/exceptions.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/statistics/pyhfInterface.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/statistics/simplifiedLikelihoods.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/statistics/statsTools.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/statistics/truncatedGaussians.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/__init__.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/asciiGraph.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/caching.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/coverage.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/crashReport.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/databaseBrowser.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/databaseClient.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/databaseServer.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/externalPythonTools.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/interactivePlots.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/interactivePlotsHelpers.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/ioObjects.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/lheChecks.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/nllFastWrapper.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/particlesLoader.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/printerTools.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/pythia6Wrapper.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/pythia8particles.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/runSModelS.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/slhaChecks.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/smodelsTools.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/timeOut.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/toolBox.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/xsecBase.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/xsecComputer.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels/tools/xsecResummino.py +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels.egg-info/dependency_links.txt +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels.egg-info/entry_points.txt +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels.egg-info/requires.txt +0 -0
- {smodels-3.0.2 → smodels-3.0.3}/smodels.egg-info/top_level.txt +0 -0
|
@@ -70,18 +70,33 @@ builddeb: buildrpm
|
|
|
70
70
|
|
|
71
71
|
pypi: clean
|
|
72
72
|
## pypi user is walten, repository is https://upload.pypi.org/legacy/
|
|
73
|
+
python -m pip install build
|
|
73
74
|
rm -rf dist
|
|
74
|
-
python3 setup.py sdist bdist_wheel
|
|
75
|
+
# python3 setup.py sdist bdist_wheel
|
|
76
|
+
python -m build .
|
|
77
|
+
twine check --strict dist/*
|
|
75
78
|
twine upload dist/smodels-*.tar.gz
|
|
76
79
|
|
|
77
80
|
testpypi: clean
|
|
78
81
|
## testpypi user is smodels, repository is https://test.pypi.org/legacy/
|
|
79
|
-
# to install from testpypi:
|
|
82
|
+
# to install from testpypi:
|
|
83
|
+
# pip3 install --user --upgrade --index-url https://test.pypi.org/simple/ smodels
|
|
84
|
+
python -m pip install build
|
|
85
|
+
rm -rf dist
|
|
86
|
+
#python3 setup.py sdist bdist_wheel
|
|
87
|
+
python -m build .
|
|
88
|
+
twine check --strict dist/*
|
|
89
|
+
twine upload -r pypitest dist/smodels-*.tar.gz
|
|
90
|
+
|
|
91
|
+
testpypiold: clean
|
|
92
|
+
## testpypi user is smodels, repository is https://test.pypi.org/legacy/
|
|
93
|
+
# to install from testpypi:
|
|
80
94
|
# pip3 install --user --upgrade --index-url https://test.pypi.org/simple/ smodels
|
|
81
95
|
rm -rf dist
|
|
82
96
|
python3 setup.py sdist bdist_wheel
|
|
83
97
|
twine upload -r pypitest dist/smodels-*.tar.gz
|
|
84
98
|
|
|
99
|
+
|
|
85
100
|
tarballs:
|
|
86
101
|
cd distribution && make tarballs
|
|
87
102
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: smodels
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.3
|
|
4
4
|
Summary: A tool for interpreting simplified-model results from the LHC
|
|
5
5
|
Home-page: http://smodels.github.io/
|
|
6
6
|
Author: The SModelS collaboration, smodels-users@lists.oeaw.ac.at Current members: Mohammad Mahdi Altakach, Sabine Kraml, Andre Lessa, Sahana Narashima, Timothee Pascal, Camila Ramos, Humberto Reyes-Gonzalez, Theo Reymermier, Yoxara Villamizar, Wolfgang Waltenberger Previously involved in SModelS: Gael Alguero, Federico Ambrogi, Juhi Dutta, Jan Heisig, Charanjit K. Khosa, Suchita Kulkarni, Ursula Laa, Veronika Magerl, Wolfgang Magerl, Philipp Neuhuber, Doris Proschofsky, Jory Sonneveld, Michael Traub, Matthias Wolf, Alicia Wongel
|
|
@@ -10,6 +10,8 @@ Keywords: simplified models LHC BSM theories interpretation supersymmetry UEDs
|
|
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
11
|
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
12
12
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
13
|
+
Requires-Python: >=3.8
|
|
14
|
+
Description-Content-Type: text/x-rst
|
|
13
15
|
Requires-Dist: docutils>=0.3
|
|
14
16
|
Requires-Dist: numpy>=1.22.0
|
|
15
17
|
Requires-Dist: scipy>=1.0.0
|
|
@@ -20,12 +22,26 @@ Requires-Dist: pyslha>=3.1.0
|
|
|
20
22
|
Requires-Dist: pyhf>=0.6.1
|
|
21
23
|
Requires-Dist: jsonpatch>=1.25
|
|
22
24
|
Requires-Dist: jsonschema>=3.2.0
|
|
25
|
+
Dynamic: author
|
|
26
|
+
Dynamic: author-email
|
|
27
|
+
Dynamic: classifier
|
|
28
|
+
Dynamic: description
|
|
29
|
+
Dynamic: description-content-type
|
|
30
|
+
Dynamic: home-page
|
|
31
|
+
Dynamic: keywords
|
|
32
|
+
Dynamic: license
|
|
33
|
+
Dynamic: requires-dist
|
|
34
|
+
Dynamic: requires-python
|
|
35
|
+
Dynamic: summary
|
|
23
36
|
|
|
24
37
|
.. image:: https://smodels.github.io/pics/banner.png
|
|
25
38
|
|
|
26
39
|
.. |PyPI version| image:: https://badge.fury.io/py/smodels.svg
|
|
27
40
|
:target: https://badge.fury.io/py/smodels
|
|
28
41
|
|
|
42
|
+
.. |Anaconda version| image:: https://anaconda.org/conda-forge/smodels/badges/version.svg
|
|
43
|
+
:target: https://anaconda.org/conda-forge/smodels/
|
|
44
|
+
|
|
29
45
|
.. |GitHub Project| image:: https://img.shields.io/badge/GitHub--blue?style=social&logo=GitHub
|
|
30
46
|
:target: https://github.com/SModelS
|
|
31
47
|
|
|
@@ -41,7 +57,7 @@ Requires-Dist: jsonschema>=3.2.0
|
|
|
41
57
|
.. |Colab| image:: https://colab.research.google.com/assets/colab-badge.svg
|
|
42
58
|
:target: https://colab.research.google.com/github/SModelS/tutorials/blob/main/index.ipynb
|
|
43
59
|
|
|
44
|
-
|GitHub Project| |PyPI version| |CodeFactor| |Colab| |Docs|
|
|
60
|
+
|GitHub Project| |PyPI version| |Anaconda version| |CodeFactor| |Colab| |Docs|
|
|
45
61
|
|
|
46
62
|
==============
|
|
47
63
|
SModelS v3
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
.. |PyPI version| image:: https://badge.fury.io/py/smodels.svg
|
|
4
4
|
:target: https://badge.fury.io/py/smodels
|
|
5
5
|
|
|
6
|
+
.. |Anaconda version| image:: https://anaconda.org/conda-forge/smodels/badges/version.svg
|
|
7
|
+
:target: https://anaconda.org/conda-forge/smodels/
|
|
8
|
+
|
|
6
9
|
.. |GitHub Project| image:: https://img.shields.io/badge/GitHub--blue?style=social&logo=GitHub
|
|
7
10
|
:target: https://github.com/SModelS
|
|
8
11
|
|
|
@@ -18,7 +21,7 @@
|
|
|
18
21
|
.. |Colab| image:: https://colab.research.google.com/assets/colab-badge.svg
|
|
19
22
|
:target: https://colab.research.google.com/github/SModelS/tutorials/blob/main/index.ipynb
|
|
20
23
|
|
|
21
|
-
|GitHub Project| |PyPI version| |CodeFactor| |Colab| |Docs|
|
|
24
|
+
|GitHub Project| |PyPI version| |Anaconda version| |CodeFactor| |Colab| |Docs|
|
|
22
25
|
|
|
23
26
|
==============
|
|
24
27
|
SModelS v3
|
|
@@ -128,6 +128,7 @@ setup(
|
|
|
128
128
|
'runSModelS.py=smodels.tools.runSModelS:main',
|
|
129
129
|
'smodelsTools.py=smodels.tools.smodelsTools:main' ]
|
|
130
130
|
},
|
|
131
|
+
python_requires='>=3.8',
|
|
131
132
|
install_requires=requirements(),
|
|
132
133
|
data_files=dataFiles() ,
|
|
133
134
|
description=("A tool for interpreting simplified-model results from the "
|
|
@@ -142,12 +143,14 @@ setup(
|
|
|
142
143
|
'smodels.decomposition',
|
|
143
144
|
'smodels.matching',
|
|
144
145
|
'smodels.tools',
|
|
146
|
+
'smodels.tools.printers',
|
|
145
147
|
'smodels.base',
|
|
146
148
|
'smodels.statistics',
|
|
147
149
|
'smodels.experiment'],
|
|
148
150
|
include_package_data = True,
|
|
149
|
-
test_suite='
|
|
151
|
+
test_suite='unittests',
|
|
150
152
|
long_description=read('smodels/README.rst'),
|
|
153
|
+
long_description_content_type="text/x-rst",
|
|
151
154
|
classifiers=[
|
|
152
155
|
"Development Status :: 5 - Production/Stable",
|
|
153
156
|
"Topic :: Scientific/Engineering :: Physics",
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
.. |PyPI version| image:: https://badge.fury.io/py/smodels.svg
|
|
4
4
|
:target: https://badge.fury.io/py/smodels
|
|
5
5
|
|
|
6
|
+
.. |Anaconda version| image:: https://anaconda.org/conda-forge/smodels/badges/version.svg
|
|
7
|
+
:target: https://anaconda.org/conda-forge/smodels/
|
|
8
|
+
|
|
6
9
|
.. |GitHub Project| image:: https://img.shields.io/badge/GitHub--blue?style=social&logo=GitHub
|
|
7
10
|
:target: https://github.com/SModelS
|
|
8
11
|
|
|
@@ -18,7 +21,7 @@
|
|
|
18
21
|
.. |Colab| image:: https://colab.research.google.com/assets/colab-badge.svg
|
|
19
22
|
:target: https://colab.research.google.com/github/SModelS/tutorials/blob/main/index.ipynb
|
|
20
23
|
|
|
21
|
-
|GitHub Project| |PyPI version| |CodeFactor| |Colab| |Docs|
|
|
24
|
+
|GitHub Project| |PyPI version| |Anaconda version| |CodeFactor| |Colab| |Docs|
|
|
22
25
|
|
|
23
26
|
==============
|
|
24
27
|
SModelS v3
|
|
@@ -473,7 +473,7 @@ class SubDatabase(object):
|
|
|
473
473
|
self.loadBinaryFile(lastm_only=False)
|
|
474
474
|
except Exception as e:
|
|
475
475
|
import traceback
|
|
476
|
-
logger.error ( "when loading database: {e}, {traceback.format_exc()}" )
|
|
476
|
+
logger.error ( f"when loading database: {e}, {traceback.format_exc()}" )
|
|
477
477
|
sys.exit(-1)
|
|
478
478
|
|
|
479
479
|
def loadTextDatabase(self):
|
|
@@ -40,7 +40,7 @@ def test_requirements():
|
|
|
40
40
|
return False
|
|
41
41
|
return True
|
|
42
42
|
|
|
43
|
-
def resolve_dependencies( as_user = True ):
|
|
43
|
+
def resolve_dependencies( as_user = True, verbose = True ):
|
|
44
44
|
""" method that is meant to resolve the SModelS dependencies,
|
|
45
45
|
via pip install --user. Warns you if pip cannot be found.
|
|
46
46
|
:params as_user: if False, try system-wide install.
|
|
@@ -54,8 +54,10 @@ def resolve_dependencies( as_user = True ):
|
|
|
54
54
|
try:
|
|
55
55
|
import pip
|
|
56
56
|
except (ModuleNotFoundError,ImportError) as e:
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
if verbose:
|
|
58
|
+
print ( "warning: pip not found. cannot install requirements. Maybe try easy_install pip" )
|
|
59
|
+
return
|
|
60
|
+
# sys.exit()
|
|
59
61
|
cmd = [ sys.executable, '-m', 'pip', 'install', '--upgrade', '-r', req ]
|
|
60
62
|
if as_user:
|
|
61
63
|
o = subprocess.getoutput ( " ".join ( [ sys.executable, '-m', 'pip', 'install', '--user', '--dry-run', 'pyslha' ] ) )
|
|
@@ -184,7 +186,7 @@ def banner():
|
|
|
184
186
|
def fixpermissions():
|
|
185
187
|
""" make sure that all filepermissions are such that
|
|
186
188
|
we can compile the wrappers for pythia and nllfast. """
|
|
187
|
-
from smodels.
|
|
189
|
+
from smodels.base.smodelsLogging import logger
|
|
188
190
|
import glob
|
|
189
191
|
Dir = "%ssmodels/lib/" % installDirectory()
|
|
190
192
|
try:
|
|
@@ -208,7 +210,7 @@ def databasePath ( label ):
|
|
|
208
210
|
:returns: URL, e.g. https://smodels.github.io/database/official
|
|
209
211
|
"""
|
|
210
212
|
if not label in __dblabels__:
|
|
211
|
-
from smodels.
|
|
213
|
+
from smodels.base.smodelsLogging import logger
|
|
212
214
|
logger.warning ( "cannot identify label %s" % label )
|
|
213
215
|
return label
|
|
214
216
|
if label == None:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
4
|
.. module:: speyTools
|
|
5
|
-
:synopsis: a module that contains tools and convenience methods
|
|
5
|
+
:synopsis: a module that contains tools and convenience methods
|
|
6
6
|
that we use in connection with spey.
|
|
7
7
|
|
|
8
8
|
.. moduleauthor:: Wolfgang Waltenberger <wolfgang.waltenberger@gmail.com>
|
|
@@ -28,7 +28,7 @@ class SpeyComputer:
|
|
|
28
28
|
__slots__ = [ "speyModels", "dataset", "backendType", "nsig",
|
|
29
29
|
"model_index" ]
|
|
30
30
|
|
|
31
|
-
def __init__ ( self, dataset, backendType : str, nsig : Union[float,list],
|
|
31
|
+
def __init__ ( self, dataset, backendType : str, nsig : Union[float,list],
|
|
32
32
|
deltas_rel : Union[None,float] = None ):
|
|
33
33
|
""" initialise with dataset.
|
|
34
34
|
:param dataset: a smodels (combined)dataset, or a onnx file (for now, will change)
|
|
@@ -50,8 +50,8 @@ class SpeyComputer:
|
|
|
50
50
|
""" retrieve the statistical model """
|
|
51
51
|
assert self.backendType in [ "1bin", "SL", "ML", "pyhf" ], f"unknown backend type {self.backendType}"
|
|
52
52
|
if hasattr ( self.dataset.globalInfo, "onnxFile" ):
|
|
53
|
-
# an onnxfile is defined, we use it!
|
|
54
|
-
return self.getNNModel ( nsig )
|
|
53
|
+
# an onnxfile is defined, we use it!
|
|
54
|
+
return self.getNNModel ( nsig )
|
|
55
55
|
if self.backendType == "pyhf":
|
|
56
56
|
return self.getStatModelsPyhf ( nsig )
|
|
57
57
|
if self.dataset.getType() == "efficiencyMap":
|
|
@@ -62,11 +62,12 @@ class SpeyComputer:
|
|
|
62
62
|
def create ( cls, dataset : DataSet, xsection : XSection,
|
|
63
63
|
predictions, deltas_rel : float ):
|
|
64
64
|
""" generic entry point for theoryPrediction. given the
|
|
65
|
-
data, create the appropriate SpeyComputer
|
|
65
|
+
data, create the appropriate SpeyComputer
|
|
66
|
+
|
|
66
67
|
:param dataset: the dataset to create the stats model for
|
|
67
68
|
:param xsection: the cross section, needed just as a scale factor
|
|
68
69
|
:param predictions: the individual predictions, in case of multiple SRs
|
|
69
|
-
|
|
70
|
+
for e.g. upper limits on them
|
|
70
71
|
"""
|
|
71
72
|
dataType = dataset.getType()
|
|
72
73
|
if dataType == "upperLimit":
|
|
@@ -120,10 +121,10 @@ class SpeyComputer:
|
|
|
120
121
|
:deltas_rel: Relative uncertainty for the signal
|
|
121
122
|
|
|
122
123
|
:returns: a SpeyComputer
|
|
123
|
-
"""
|
|
124
|
-
computer = SpeyComputer(dataset=dataset, backendType="1bin",
|
|
124
|
+
"""
|
|
125
|
+
computer = SpeyComputer(dataset=dataset, backendType="1bin",
|
|
125
126
|
nsig=nsig, deltas_rel=deltas_rel)
|
|
126
|
-
|
|
127
|
+
|
|
127
128
|
return computer
|
|
128
129
|
|
|
129
130
|
@classmethod
|
|
@@ -136,14 +137,14 @@ class SpeyComputer:
|
|
|
136
137
|
|
|
137
138
|
:returns: a StatsComputer
|
|
138
139
|
"""
|
|
139
|
-
|
|
140
|
-
computer = SpeyComputer(dataset=dataset,
|
|
141
|
-
backendType="SL",
|
|
140
|
+
|
|
141
|
+
computer = SpeyComputer(dataset=dataset,
|
|
142
|
+
backendType="SL",
|
|
142
143
|
nsig=nsig, deltas_rel=deltas_rel)
|
|
143
144
|
return computer
|
|
144
145
|
|
|
145
146
|
def getNNModel ( self, nsig ):
|
|
146
|
-
""" here is the code for how we create a spey speyModel that uses an NN
|
|
147
|
+
""" here is the code for how we create a spey speyModel that uses an NN
|
|
147
148
|
as its backend """
|
|
148
149
|
#For the moment, the ml-likelihood backned has to be dowanloaded and installed manually. In the future, the backend could be directly embedded and installed in SmodelS.
|
|
149
150
|
# import sys
|
|
@@ -153,13 +154,13 @@ class SpeyComputer:
|
|
|
153
154
|
# sys.path.append(MLlikePath)
|
|
154
155
|
import spey
|
|
155
156
|
stat_wrapper = spey.get_backend('ml.likelihoods')
|
|
156
|
-
|
|
157
|
+
|
|
157
158
|
#The current ML-likelihood backend takes a local path. This has to be
|
|
158
159
|
#updated, I think the idea is that the backend takes 'dataset' as input,
|
|
159
160
|
# where 'dataset' is a loaded onnx model. Thus, the onnx has to be loaded
|
|
160
161
|
# by SmodelS beforehand. It seems to be the more consistent wrt the other
|
|
161
162
|
# backends.
|
|
162
|
-
|
|
163
|
+
|
|
163
164
|
#network_path='/Users/humberto/Documents/work/learn_pyhf_smodels/ML_LHClikelihoods/ML_models/ATLAS-SUSY-2018-04/ensemble_model.onnx'
|
|
164
165
|
onnxBlob=self.dataset.globalInfo.onnx
|
|
165
166
|
# self.speyModel = stat_wrapper(nsig,onnxBlob) # this is how i want it long run
|
|
@@ -182,13 +183,15 @@ class SpeyComputer:
|
|
|
182
183
|
"""
|
|
183
184
|
Create a statistical model from multibin data.
|
|
184
185
|
|
|
185
|
-
:param nsig: number of signal events. For simplified likelihood backend
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
:param nsig: number of signal events. For simplified likelihood backend
|
|
187
|
+
this input can contain `np.array` or `List[float]` which contains
|
|
188
|
+
signal yields per region.
|
|
189
|
+
For `pyhf` backend this input expected to be a JSON-patch
|
|
190
|
+
i.e. `List[Dict]`, see `pyhf` documentation for details on
|
|
191
|
+
JSON-patch format.
|
|
189
192
|
:param delta_sys: systematic uncertainty on signal. Currently unused.
|
|
190
|
-
:param allow_negative_signal: if True, the expected upper limit on mu,
|
|
191
|
-
|
|
193
|
+
:param allow_negative_signal: if True, the expected upper limit on mu,
|
|
194
|
+
used to find the best statistical model, can be negative.
|
|
192
195
|
|
|
193
196
|
:returns: spey StatisticalModel object.
|
|
194
197
|
|
|
@@ -264,14 +267,14 @@ class SpeyComputer:
|
|
|
264
267
|
analysis = dataset.globalInfo.id
|
|
265
268
|
|
|
266
269
|
speyModel = stat_wrapper( analysis = analysis,
|
|
267
|
-
signal_patch = signal_patch,
|
|
270
|
+
signal_patch = signal_patch,
|
|
268
271
|
background_only_model = inputJson )
|
|
269
272
|
models.append ( speyModel )
|
|
270
273
|
self.speyModels = models
|
|
271
274
|
self.model_index = self.getBestCombinationIndex( data )
|
|
272
275
|
return models
|
|
273
276
|
|
|
274
|
-
def getStatModelSingleBin(self, nsig: Union[float, np.ndarray],
|
|
277
|
+
def getStatModelSingleBin(self, nsig: Union[float, np.ndarray],
|
|
275
278
|
delta_sys : Union[None,float] = None,
|
|
276
279
|
allow_negative_signal : bool = False
|
|
277
280
|
):
|
|
@@ -316,7 +319,8 @@ class SpeyComputer:
|
|
|
316
319
|
def get_five_values ( self, expected : Union [ bool, Text ],
|
|
317
320
|
return_nll : bool = False,
|
|
318
321
|
check_for_maxima : bool = False )-> Dict:
|
|
319
|
-
""" return the Five Values: l(bsm), l(sm), muhat, l(muhat), sigma(mu_hat)
|
|
322
|
+
""" return the Five Values: l(bsm), l(sm), muhat, l(muhat), sigma(mu_hat)
|
|
323
|
+
|
|
320
324
|
:param check_for_maxima: if true, then check lmax against l(sm) and l(bsm)
|
|
321
325
|
correct, if necessary
|
|
322
326
|
"""
|
|
@@ -356,11 +360,12 @@ class SpeyComputer:
|
|
|
356
360
|
|
|
357
361
|
def poi_upper_limit ( self, expected : Union [ bool, Text ],
|
|
358
362
|
limit_on_xsec : bool = False, model_index : Union [int,None] = None ) -> float:
|
|
359
|
-
""" simple frontend
|
|
363
|
+
""" simple frontend to spey::poi_upper_limit
|
|
364
|
+
|
|
360
365
|
:param limit_on_xsec: if True, then return the limit on the
|
|
361
|
-
|
|
366
|
+
cross section
|
|
362
367
|
:param model_index: if None, then get upper limit for most sensitive model,
|
|
363
|
-
|
|
368
|
+
if integer, get UL for that model
|
|
364
369
|
"""
|
|
365
370
|
if model_index == None:
|
|
366
371
|
model_index = self.model_index
|
|
@@ -371,12 +376,15 @@ class SpeyComputer:
|
|
|
371
376
|
except ValueError as e:
|
|
372
377
|
logger.warning ( f"when computing upper limit for SL: {e}. Will try with other method" )
|
|
373
378
|
sys.exit(-1)
|
|
379
|
+
except spey.system.exceptions.AsimovTestStatZero as e:
|
|
380
|
+
logger.debug ( f"spey returned: {e}. will interpret as ul=inf" )
|
|
381
|
+
ret = float("inf")
|
|
374
382
|
ret = float(ret) # cast for the printers
|
|
375
383
|
if limit_on_xsec:
|
|
376
384
|
totsig = self.nsig
|
|
377
385
|
if type ( self.nsig ) in [ list ]:
|
|
378
386
|
totsig = sum ( self.nsig )
|
|
379
|
-
xsec = totsig / self.dataset.globalInfo.lumi
|
|
387
|
+
xsec = totsig / self.dataset.globalInfo.lumi
|
|
380
388
|
ret = ret * xsec
|
|
381
389
|
return ret
|
|
382
390
|
|
|
@@ -403,7 +411,7 @@ class SpeyComputer:
|
|
|
403
411
|
return i_best
|
|
404
412
|
|
|
405
413
|
|
|
406
|
-
def asimov_likelihood ( self, poi_test : float, expected : Union[bool,Text],
|
|
414
|
+
def asimov_likelihood ( self, poi_test : float, expected : Union[bool,Text],
|
|
407
415
|
return_nll : bool ) -> float:
|
|
408
416
|
""" simple frontend to spey functionality """
|
|
409
417
|
self.checkMinimumPoi( poi_test )
|
|
@@ -421,7 +429,7 @@ class SpeyComputer:
|
|
|
421
429
|
|
|
422
430
|
:returns: a StatsComputer
|
|
423
431
|
"""
|
|
424
|
-
computer = SpeyComputer(dataset=dataset, backendType="pyhf",
|
|
432
|
+
computer = SpeyComputer(dataset=dataset, backendType="pyhf",
|
|
425
433
|
nsig=nsig, deltas_rel=deltas_rel)
|
|
426
434
|
return computer
|
|
427
435
|
|
|
@@ -431,7 +439,7 @@ class SpeyComputer:
|
|
|
431
439
|
if poi_test < config.minimum_poi:
|
|
432
440
|
logger.error ( f'Calling likelihood for {self.dataset.globalInfo.id} (using combination of SRs) for a mu giving a negative total yield. mu = {mu} and minimum_mu = {config.minimum_poi}.' )
|
|
433
441
|
|
|
434
|
-
def likelihood ( self, poi_test : float, expected : Union[bool,Text],
|
|
442
|
+
def likelihood ( self, poi_test : float, expected : Union[bool,Text],
|
|
435
443
|
return_nll : bool ) -> float:
|
|
436
444
|
""" simple frontend to spey functionality """
|
|
437
445
|
self.checkMinimumPoi ( poi_test )
|
|
@@ -449,7 +457,7 @@ class SpeyComputer:
|
|
|
449
457
|
:returns: tuple of muhat,lmax
|
|
450
458
|
"""
|
|
451
459
|
expected = self.translateExpectationType ( expected )
|
|
452
|
-
speyret = self.speyModels[self.model_index].maximize_likelihood ( expected = expected,
|
|
460
|
+
speyret = self.speyModels[self.model_index].maximize_likelihood ( expected = expected,
|
|
453
461
|
allow_negative_signal = allow_negative_signal,
|
|
454
462
|
return_nll = return_nll )
|
|
455
463
|
ret = { "muhat": float(speyret[0]), "lmax": float(speyret[1]) }
|
|
@@ -471,7 +479,7 @@ class SpeyComputer:
|
|
|
471
479
|
|
|
472
480
|
def maximize_asimov_likelihood ( self, expected : Union[bool,Text],
|
|
473
481
|
return_nll : bool = False ) -> Tuple[float,float]:
|
|
474
|
-
""" simple frontend to spey functionality
|
|
482
|
+
""" simple frontend to spey functionality
|
|
475
483
|
:param return_nll: if True, return negative log likelihood
|
|
476
484
|
:param allow_negative_signal: allow also negative muhats
|
|
477
485
|
:returns: tuple of muhat,lmax
|
|
@@ -480,7 +488,7 @@ class SpeyComputer:
|
|
|
480
488
|
# init = self.getSpeyInitialisation ( True )
|
|
481
489
|
# opt = init["optimiser"]
|
|
482
490
|
# opt["test_statistics"]="qmutilde"
|
|
483
|
-
ret = self.speyModels[self.model_index].maximize_asimov_likelihood ( expected = expected,
|
|
491
|
+
ret = self.speyModels[self.model_index].maximize_asimov_likelihood ( expected = expected,
|
|
484
492
|
return_nll = return_nll ) # , **opt )
|
|
485
493
|
assert ret[0]>=0., "maximum of asimov likelihood should not be below zero"
|
|
486
494
|
for k,v in ret.items():
|
|
@@ -497,7 +505,7 @@ class SimpleSpeyDataSet:
|
|
|
497
505
|
""" a very simple data class that can replace a smodels.dataset,
|
|
498
506
|
for 1d SL data only. used for testing and in dataPreparation """
|
|
499
507
|
class SimpleInfo:
|
|
500
|
-
def __init__ ( self, observedN : float, expectedBG : float,
|
|
508
|
+
def __init__ ( self, observedN : float, expectedBG : float,
|
|
501
509
|
bgError : float ):
|
|
502
510
|
self.observedN = observedN
|
|
503
511
|
self.expectedBG = expectedBG
|
|
@@ -546,7 +554,8 @@ class SpeyAnalysesCombosComputer:
|
|
|
546
554
|
|
|
547
555
|
def poi_upper_limit ( self, expected : Union [ bool, Text ],
|
|
548
556
|
limit_on_xsec : bool = False ) -> float:
|
|
549
|
-
""" simple frontend, to spey::poi_upper_limit
|
|
557
|
+
""" simple frontend, to spey::poi_upper_limit
|
|
558
|
+
|
|
550
559
|
:param limit_on_xsec: if True, then return the limit on the
|
|
551
560
|
cross section
|
|
552
561
|
"""
|
|
@@ -558,7 +567,7 @@ class SpeyAnalysesCombosComputer:
|
|
|
558
567
|
ret = ret * totxsec
|
|
559
568
|
return ret
|
|
560
569
|
|
|
561
|
-
def likelihood ( self, poi_test : float, expected : Union[bool,Text],
|
|
570
|
+
def likelihood ( self, poi_test : float, expected : Union[bool,Text],
|
|
562
571
|
return_nll : bool ) -> float:
|
|
563
572
|
""" simple frontend to spey functionality """
|
|
564
573
|
expected = SpeyComputer.translateExpectationType ( expected )
|
|
@@ -575,7 +584,7 @@ class SpeyAnalysesCombosComputer:
|
|
|
575
584
|
:returns: tuple of muhat,lmax
|
|
576
585
|
"""
|
|
577
586
|
expected = SpeyComputer.translateExpectationType ( expected )
|
|
578
|
-
speyret = self.speyModel.maximize_likelihood ( expected = expected,
|
|
587
|
+
speyret = self.speyModel.maximize_likelihood ( expected = expected,
|
|
579
588
|
allow_negative_signal = allow_negative_signal,
|
|
580
589
|
return_nll = return_nll )
|
|
581
590
|
ret = { "muhat": float(speyret[0]), "lmax": float(speyret[1]) }
|
|
@@ -588,9 +597,11 @@ class SpeyAnalysesCombosComputer:
|
|
|
588
597
|
def get_five_values ( self, expected : Union [ bool, Text ],
|
|
589
598
|
return_nll : bool = False,
|
|
590
599
|
check_for_maxima : bool = False )-> Dict:
|
|
591
|
-
"""
|
|
600
|
+
""" method returning the Five Values:
|
|
601
|
+
l(bsm), l(sm), muhat, l(muhat), sigma(mu_hat)
|
|
602
|
+
|
|
592
603
|
:param check_for_maxima: if true, then check lmax against l(sm) and l(bsm)
|
|
593
|
-
|
|
604
|
+
correct, if necessary
|
|
594
605
|
"""
|
|
595
606
|
ret = self.maximize_likelihood ( expected = expected, return_nll = return_nll )
|
|
596
607
|
lmax = ret['lmax']
|
|
@@ -636,7 +647,7 @@ class SpeyAnalysesCombosComputer:
|
|
|
636
647
|
test_statistics=test_statistic )
|
|
637
648
|
return float(sigma_mu)
|
|
638
649
|
|
|
639
|
-
|
|
650
|
+
|
|
640
651
|
if __name__ == "__main__":
|
|
641
652
|
# nobs,bg,bgerr,lumi = 3., 4.1, 0.6533758489567854, 35.9/fb
|
|
642
653
|
# nobs,bg,bgerr,lumi = 0, 1., 0.2, 35.9/fb
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"""
|
|
2
|
+
.. module:: basicPrinter
|
|
3
|
+
:synopsis: Base class for defining printer classes
|
|
4
|
+
|
|
5
|
+
.. moduleauthor:: Andre Lessa <lessa.a.p@gmail.com>
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import sys
|
|
9
|
+
import os
|
|
10
|
+
from smodels.base.smodelsLogging import logger
|
|
11
|
+
import numpy as np
|
|
12
|
+
import time
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class BasicPrinter(object):
|
|
16
|
+
"""
|
|
17
|
+
Super class to handle the basic printing methods
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
def __init__(self, output, filename, outputFormat = 'current'):
|
|
21
|
+
"""
|
|
22
|
+
:ivar str typeofexpectedvalues: what type of expected values to print,
|
|
23
|
+
apriori or posteriori
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
self.name = "basic"
|
|
27
|
+
self.time = time.time() # time stamps
|
|
28
|
+
|
|
29
|
+
self.outputList = []
|
|
30
|
+
self.filename = filename
|
|
31
|
+
self.output = output
|
|
32
|
+
self.printingOrder = []
|
|
33
|
+
self.typeofexpectedvalues = "apriori"
|
|
34
|
+
self.toPrint = []
|
|
35
|
+
self.outputFormat = outputFormat
|
|
36
|
+
|
|
37
|
+
if filename and os.path.isfile(filename):
|
|
38
|
+
logger.warning("Removing file %s" % filename)
|
|
39
|
+
os.remove(filename)
|
|
40
|
+
|
|
41
|
+
def getTypeOfExpected(self):
|
|
42
|
+
""" tiny convenience function for what expected values to print,
|
|
43
|
+
apriori (True) or posteriori """
|
|
44
|
+
expected = True
|
|
45
|
+
if self.typeofexpectedvalues == "posteriori":
|
|
46
|
+
expected = "posteriori"
|
|
47
|
+
return expected
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def filename(self):
|
|
51
|
+
return self._filename
|
|
52
|
+
|
|
53
|
+
@filename.setter
|
|
54
|
+
def filename(self, fn):
|
|
55
|
+
self._filename = fn
|
|
56
|
+
self.mkdir()
|
|
57
|
+
|
|
58
|
+
def mkdir(self):
|
|
59
|
+
""" create directory to file, if necessary """
|
|
60
|
+
if not self.filename:
|
|
61
|
+
return
|
|
62
|
+
dirname = os.path.dirname(self.filename)
|
|
63
|
+
if dirname != "" and not os.path.exists(dirname):
|
|
64
|
+
os.makedirs(dirname)
|
|
65
|
+
|
|
66
|
+
def setOptions(self, options):
|
|
67
|
+
"""
|
|
68
|
+
Store the printer specific options to control the output of each printer.
|
|
69
|
+
Each option is stored as a printer attribute.
|
|
70
|
+
|
|
71
|
+
:param options: a list of (option,value) for the printer.
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
for opt, value in options:
|
|
75
|
+
setattr(self, opt, eval(value))
|
|
76
|
+
|
|
77
|
+
def addObj(self, obj):
|
|
78
|
+
"""
|
|
79
|
+
Adds object to the Printer.
|
|
80
|
+
|
|
81
|
+
:param obj: A object to be printed. Must match one of the types defined in formatObj
|
|
82
|
+
|
|
83
|
+
:return: True if the object has been added to the output. If the object does not belong
|
|
84
|
+
to the pre-defined printing list toPrint, returns False.
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
for iobj, objType in enumerate(self.printingOrder):
|
|
88
|
+
if isinstance(obj, objType):
|
|
89
|
+
self.toPrint[iobj] = obj
|
|
90
|
+
return True
|
|
91
|
+
return False
|
|
92
|
+
|
|
93
|
+
def openOutFile(self, filename, mode):
|
|
94
|
+
""" creates and opens a data sink,
|
|
95
|
+
creates path if needed """
|
|
96
|
+
d = os.path.dirname(filename)
|
|
97
|
+
if not os.path.exists(d):
|
|
98
|
+
os.makedirs(d)
|
|
99
|
+
logger.info("creating directory %s" % d)
|
|
100
|
+
return open(filename, mode)
|
|
101
|
+
|
|
102
|
+
def flush(self):
|
|
103
|
+
"""
|
|
104
|
+
Format the objects added to the output, print them to the screen
|
|
105
|
+
or file and remove them from the printer.
|
|
106
|
+
"""
|
|
107
|
+
ret = ""
|
|
108
|
+
|
|
109
|
+
for obj in self.toPrint:
|
|
110
|
+
if obj is None:
|
|
111
|
+
continue
|
|
112
|
+
output = self._formatObj(obj)
|
|
113
|
+
if not output:
|
|
114
|
+
continue # Skip empty output
|
|
115
|
+
ret += output
|
|
116
|
+
if self.output == 'stdout':
|
|
117
|
+
sys.stdout.write(output)
|
|
118
|
+
elif self.output == 'file':
|
|
119
|
+
if not self.filename:
|
|
120
|
+
logger.error('Filename not defined for printer')
|
|
121
|
+
return False
|
|
122
|
+
with self.openOutFile(self.filename, "a") as outfile:
|
|
123
|
+
outfile.write(output)
|
|
124
|
+
outfile.close()
|
|
125
|
+
|
|
126
|
+
self.toPrint = [None]*len(self.printingOrder) # Reset printing objects
|
|
127
|
+
self.time = time.time() # prepare next timestamp
|
|
128
|
+
return ret
|
|
129
|
+
|
|
130
|
+
def _formatObj(self, obj):
|
|
131
|
+
"""
|
|
132
|
+
Method for formatting the output depending on the type of object
|
|
133
|
+
and output.
|
|
134
|
+
|
|
135
|
+
:param obj: A object to be printed. Must match one of the types defined in formatObj
|
|
136
|
+
|
|
137
|
+
"""
|
|
138
|
+
|
|
139
|
+
typeStr = type(obj).__name__
|
|
140
|
+
try:
|
|
141
|
+
formatFunction = getattr(self, '_format'+typeStr)
|
|
142
|
+
ret = formatFunction(obj)
|
|
143
|
+
# print ( " `-", len(ret))
|
|
144
|
+
return ret
|
|
145
|
+
except AttributeError as e:
|
|
146
|
+
logger.warning('Error formating object %s: \n %s' % (typeStr, e))
|
|
147
|
+
return False
|
|
148
|
+
|
|
149
|
+
def _round(self, number, n=6):
|
|
150
|
+
""" round a number to n significant digits, if it *is* a number """
|
|
151
|
+
if type(number) not in [float, np.float64]:
|
|
152
|
+
return number
|
|
153
|
+
if not np.isfinite(number):
|
|
154
|
+
return f'float("{number}")'
|
|
155
|
+
if np.isnan(number) or not np.isfinite(number):
|
|
156
|
+
return number
|
|
157
|
+
try:
|
|
158
|
+
if abs(number) < 1e-40:
|
|
159
|
+
return number
|
|
160
|
+
return round(number, -int(np.floor(np.sign(number) * np.log10(abs(number)))) + n)
|
|
161
|
+
except Exception:
|
|
162
|
+
pass
|
|
163
|
+
return number
|
|
164
|
+
# return round ( number, n )
|