{ "info": { "author": "Martin Gabelmann", "author_email": "martin@gabelmann.biz", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)" ], "description": "ScanLHA\n--------------\nPerform parameter scans with HEP tools that use (not only) (S)LHA in- and output.\n\n__Use Case__\n\nTypical tool-chains in high-energy physics (HEP) are the pass-through of one SLHA-input file from spectrum generators, e.g. [SPheno](https://spheno.hepforge.org/), to further HEP tools like [HiggsBounds](https://higgsbounds.hepforge.org/) and/or [micrOmegas](https://lapth.cnrs.fr/micromegas/) which themself return SLHA-output files. \nTo provide correct input for the various tools between the different steps as well as to enable further processing (e.g. plotting) the SLHA format needs to be parsed and stored in a storage-efficient tabular format. \nIn a phenomenological study, most of the physical parameters as well as config flags within a considered scenario are kept constant while only a few O(1-20) parameters are varied in different ways (grid- or randomly scanned, more sophisticated scanning techniques are planned in the future). \nDue to the large combinatorics, the scan may be done in parallel and even be distributed over different machines (using e.g. Sun Grid Engine, the usage of [dask.distributed](https://github.com/dask/distributed) is planned for the future). \nThe outcome is one (or multiple) HDF files (to be merged) that may undergo further editing before the results are visualized in 2D or 3D scatter plots.\n\n__Installing__\n\n pip3 install ScanLHA\n\n__Executables__\n\n * [ScanLHA](https://martingabelmann.github.io/ScanLHA/ScanLHA.m.html) - Perform (S)LHA scan/s and save to HDF file/s.\n * [PlotLHA](https://martingabelmann.github.io/ScanLHA/PlotLHA.m.html) - Plot ScanLHA results from HDF file/s.\n * [EditLHA](https://martingabelmann.github.io/ScanLHA/EditLHA.m.html) - Interactively load/edit/save/plot HDF file/s.\n * [MergeLHA](https://martingabelmann.github.io/ScanLHA/MergeLHA.m.html) - Merge multiple HDF files into one file.\n\nThe executables ``ScanLHA`` and ``PlotLHA`` take a YAML input [config](https://martingabelmann.github.io/ScanLHA/config.m.html) file.\n\n__Scanning__\n\nThe [config](https://martingabelmann.github.io/ScanLHA/config.m.html) YAML file must contain two dictionaries ``runner`` and ``blocks`` controlling\nthe type of scan/tools to be used as well as the SLHA blocks that have to be present/scanned in the input file. \nIn order to simplify the distribution of similar scans through grid-computing software, it is possible to declare ``argument``\nSLHA entries. The value/scanrange of these entries can be set from within command line arguments. \n\nA basic config.yml file to run SPheno and HiggsBounds may look like\n\n ---\n runner:\n binaries:\n - ['/bin/SPhenoMSSM', '{input_file}', '{output_file}']\n - ['./HiggsBounds', 'LandH', 'SLHA', '3', '0', '{output_file}']\n tmpfs: /dev/shm/slha\n keep_log: true\n timeout: 90\n scantype: random\n numparas: 50000\n constraints: # Higgs mass constraint\n - \"result['MASS']['values']['25']<127.09\"\n - \"result['MASS']['values']['25']>123.09\"\n blocks:\n - block: MINPAR\n lines:\n - parameter: 'MSUSY'\n latex: '$M_{SUSY}$ (GeV)'\n id: 1\n random: [500,3500]\n - parameter: 'TanBeta'\n latex: '$\\tan\\beta$'\n argument: 'value'\n - parameter: 'mu'\n latex: '$\\mu$ (GeV)'\n id: 2\n value: 300\n\nWhere the ``id`` is the SLHA-id of the parameter ``parameter`` in the block ``block`` which either takes the constant value ``value``, is ``random``ly chosen or ``scan``ed in a grid. \nThe presence of the new command line argument ``TanBeta`` may be verified with ``ScanLHA config.yml --help``. \nA scan that runs the SPheno->HiggsBounds chain in 2 parallel threads is started with ``ScanLHA config.yml -p 2 --TanBeta 4 scantanbeta4.h5`` (by default os.cpucount() is used for ``-p``). \nFor this purpose, 2 copies of the binaries are stored in 2 randomly named directories in ``runner['tmpfs']`` (default: ``/dev/shm/``) where the input and output files are generated. \nAlternatively one may specify ``values: [1, 2, 10]`` for the line ``TanBeta`` instead of ``argument``\nor even ``scan: [1, 50, 50]`` to scan over ``TanBeta`` (from 1 to 50 in 50 steps for each random value of ``MSUSY``) and save the result into one single file (likewise, the ``argument`` option can be set to ``scan`` or ``random`` and according numbers may be provided from the command line). Grid scans can have a ``distribution`` attribute equaling ``linear,log,geom,arange,uniform`` or ``normal``. \n\nThe executables in ``runner['binaries']`` are run subsequential for each parameter point using given arguments. For each point a randomly named ``{input_file}`` is generated and may be passed as argument\nto the executables. Likewise, the ``{output_file}`` is supposed to be written by the executables and eventually parsed afterwards. One may also make direct use of Python (or C-Python) implementations instead of using executables by implementing a [runner module](https://martingabelmann.github.io/ScanLHA/runner.m.html).\n\n__Plotting__\n\nThe config.yml used for the scan may also contain a ``scatterplot`` dictionary (but can also be contained in a separate file).\n\nPlotting capabilities are:\n\n * Automatically uses the ``latex`` attribute of specified LHA ``blocks`` for labels.\n * Fields for x/y/z axes can be specified by either ``BLOCKNAME.values.LHAID`` or the specified ``parameter`` attribute.\n * New fields to plot can be computed using existing fields saved in ``DATA``\n * Optional constraints on the different fields may be specified using ``PDATA``\n * Various options can be passed to ``matplotlib``s ``legend``, ``scatter``, ``colorbar`` functions.\n * Optional ticks, textboxes, legend-position, colors, etc... can be set manually.\n\nThe ``scatterplot`` dict must contain a ``conf`` dict that specifies at least the\nHDF ``datafile`` to load. Additionaly, defaults for x/y/z axes or other plot configs may be set and need not to be\nrepeated in the plot definitions (but can be overwritten). In addition, the ``plots`` key contains a list of dicts\nthat specify the ``filename`` and data to plot.\n\nAn example configuration may look like\n\n ---\n scatterplot:\n conf:\n datafile: \"mssm.h5\"\n newfields:\n TanBeta: \"DATA['HMIX.values.2'].apply(abs).apply(tan)\"\n # the string is passed to eval\n constraints:\n - \"PDATA['TREELEVELUNITARITYwTRILINEARS.values.1']<0.5\"\n # enforces unitarity on the sample\n plots:\n - filename: \"mssm_TanBetaMSUSYmH.png\"\n # one scatterplot\n y-axis: {field: TanBeta, label: '$\\tan\\beta$'}\n x-axis:\n field: MSUSY\n label: \"$m_{SUSY}$ (TeV)$\"\n lognorm: True\n ticks:\n - [1000,2000,3000,4000]\n - ['$1$','$2','$3','$4$']\n z-axis:\n field: MASS.values.25\n colorbar: True\n label: \"$m_h$ (GeV)\"\n alpha: 0.8\n textbox: {x: 0.9, y: 0.3, text: 'some info'}\n - filename: \"mssm_mhiggs.png\"\n # multiple lines in one plot with legend\n constraints: [] # ignore all global constraints\n x-axis:\n field: MSUSY,\n label: 'Massparameter (GeV)'\n y-axis:\n lognorm: True,\n label: '$m_{SUSY}$ (GeV)'\n plots:\n - y-axis: MASS.values.25\n color: red\n label: '$m_{h_1}$'\n - y-axis: MASS.values.26\n color: green\n label: '$m_{h_2}$'\n - y-axis: MASS.values.35\n color: blue\n label: '$m_{A}$'\n\n__Editing and Merging__\n\nSee ``EditLHA --help`` and ``MergeLHA --help``.\n\n__Scanning with other (non-)SLHA Tools__\n\nSee the API docs of the [runner module](https://martingabelmann.github.io/ScanLHA/runner.m.html).\n\n__Related Tools__\n\n * [xBIT](https://github.com/fstaub/xBIT)\n * [SSP](https://sarah.hepforge.org/SSP.html)/[pySSP](https://github.com/fstaub/pySSP)\n * ask me if you wish to be listed here\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/martingabelmann/ScanLHA", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "ScanLHA", "package_url": "https://pypi.org/project/ScanLHA/", "platform": "", "project_url": "https://pypi.org/project/ScanLHA/", "project_urls": { "Homepage": "https://github.com/martingabelmann/ScanLHA" }, "release_url": "https://pypi.org/project/ScanLHA/0.3/", "requires_dist": [ "pylha", "numpy", "ipython", "tqdm", "pandas", "matplotlib", "PyYAML" ], "requires_python": "", "summary": "Perform parameter scans with HEP tools that use (not only) (S)LHA in- and output.", "version": "0.3" }, "last_serial": 4648149, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "bb281367108c4fadfdbf83fe3e3bf94a", "sha256": "3fd8f8bbabda413f3d021975197c774b4e197a2f359fa53641ba1d9c44d139dc" }, "downloads": -1, "filename": "ScanLHA-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bb281367108c4fadfdbf83fe3e3bf94a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 114202, "upload_time": "2018-11-19T20:46:58", "url": "https://files.pythonhosted.org/packages/19/a7/55be9d054edbce9395005275cd43222c8ede30c5b0c8d129bbb01aa71302/ScanLHA-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e226e2d0a686a309b5066b193a2a35d4", "sha256": "3f25b0809fab5cec61f43e9b302082490d1e883e1017ccd2e102c6bb25113d7c" }, "downloads": -1, "filename": "ScanLHA-0.1.tar.gz", "has_sig": false, "md5_digest": "e226e2d0a686a309b5066b193a2a35d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 157102, "upload_time": "2018-11-19T20:47:11", "url": "https://files.pythonhosted.org/packages/be/b4/64fcf5884f48a907cabcc88bdd2b0af49e802ee4dfff5a493d3903ce34dc/ScanLHA-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "86be46743c60835160198f23ecbfd860", "sha256": "97362a3c04fe36952c3f1479c355f246a1ac0a04e91b5d904b4ec94897590172" }, "downloads": -1, "filename": "ScanLHA-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "86be46743c60835160198f23ecbfd860", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 114264, "upload_time": "2018-11-19T20:58:12", "url": "https://files.pythonhosted.org/packages/f1/3c/752f421d64dc926180301cdf2e7e0392f6bb7a251437e4373882e413a64e/ScanLHA-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "34470097dd60d1783e554763d513c469", "sha256": "68b005ea70419653976c96e20e25b5bc2c8aa13c72763433086141acdf8dba09" }, "downloads": -1, "filename": "ScanLHA-0.2.tar.gz", "has_sig": false, "md5_digest": "34470097dd60d1783e554763d513c469", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 157151, "upload_time": "2018-11-19T20:58:17", "url": "https://files.pythonhosted.org/packages/5c/e2/c2d9a446142fc3b4f7b9d5abc345f36ed16b073633c71c1c03f11e198230/ScanLHA-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "493e4ac678d1e544a1c44afda90b6db9", "sha256": "c144ea47a76eef4767686999ed360254d2108dd9109bc105ef20d55894123a58" }, "downloads": -1, "filename": "ScanLHA-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "493e4ac678d1e544a1c44afda90b6db9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 114875, "upload_time": "2018-12-31T13:45:42", "url": "https://files.pythonhosted.org/packages/f0/84/254d706111f5b9d555b6e34c08612c606d3fe86dbac9778d93d9d997e69b/ScanLHA-0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b300774481af7226eed1a1683bf20982", "sha256": "9f7472c0a103c5b3800a500d775ceceefc448ad107f392b100526bf0a394a954" }, "downloads": -1, "filename": "ScanLHA-0.3.tar.gz", "has_sig": false, "md5_digest": "b300774481af7226eed1a1683bf20982", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 157382, "upload_time": "2018-12-31T13:45:47", "url": "https://files.pythonhosted.org/packages/bd/fa/610d1401899fafb5a8c607c9ac1e4648172b1e1c4700e083c11c00ad2e0b/ScanLHA-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "493e4ac678d1e544a1c44afda90b6db9", "sha256": "c144ea47a76eef4767686999ed360254d2108dd9109bc105ef20d55894123a58" }, "downloads": -1, "filename": "ScanLHA-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "493e4ac678d1e544a1c44afda90b6db9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 114875, "upload_time": "2018-12-31T13:45:42", "url": "https://files.pythonhosted.org/packages/f0/84/254d706111f5b9d555b6e34c08612c606d3fe86dbac9778d93d9d997e69b/ScanLHA-0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b300774481af7226eed1a1683bf20982", "sha256": "9f7472c0a103c5b3800a500d775ceceefc448ad107f392b100526bf0a394a954" }, "downloads": -1, "filename": "ScanLHA-0.3.tar.gz", "has_sig": false, "md5_digest": "b300774481af7226eed1a1683bf20982", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 157382, "upload_time": "2018-12-31T13:45:47", "url": "https://files.pythonhosted.org/packages/bd/fa/610d1401899fafb5a8c607c9ac1e4648172b1e1c4700e083c11c00ad2e0b/ScanLHA-0.3.tar.gz" } ] }