{ "info": { "author": "Shane Breeze", "author_email": "sdb15@ic.ac.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "[![CircleCI](https://circleci.com/gh/shane-breeze/zinv-analysis.svg?style=shield)](https://circleci.com/gh/shane-breeze/zinv-analysis)\n\n[![codecov](https://codecov.io/gh/shane-breeze/zinv-analysis/branch/master/graph/badge.svg)](https://codecov.io/gh/shane-breeze/zinv-analysis)\n\n# Z invisible analysis\n\nThis code processes CMS event-based data and simulation stored in a flat `ROOT.TTree` format (i.e. branches correspond to simple data types such as `bool`, `int`, `float`, ... or an `std::vector` of these data types). Typically, this is done on [nanoAOD](https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookNanoAOD). The output is a dataframe(s) of similar data types (with the exclusion of vectors) either directly taken from the nanoAOD files or derived from these variables to create an analysis-level dataframe.\n\nThis is achieved by reading in nanoAOD files with [uproot](https://github.com/scikit-hep/uproot) applying a set of modules to generate derived variables and storing these in a dataframe saved to disk. Yaml config files are passed to define the input data, modules and output.\n\n## Usage\n\nInstall with pip:\n\n```bash\npip install zinv-analysis\n```\n\nor in editable mode to alter the code:\n\n```bash\ngit clone git@github.com:shane-breeze/zinv-analysis.git\ncd zinv-analysis\npip install -e .\n```\n\nEither run with the CLI\n\n```bash\nzinv_analysis.py --help\n```\n\nor the python API\n\n```python\nimport zinv\nhelp(zinv.modules.analyse)\n```\n\n## Layout\n\n### Interfaces\n\nInterfaces to the underlying code is located in [analyse.py](https://github.com/shane-breeze/zinv-analysis/blob/master/zinv/modules/analyse.py) and [resume.py](https://github.com/shane-breeze/zinv-analysis/blob/master/zinv/modules/resume.py).\n\nScripts using these functions are found in [zinv/scripts/](https://github.com/shane-breeze/zinv-analysis/tree/master/zinv/scripts).\n\n### Modules\n\nA set of modules which create derived variables are found in [zinv/modules/readers](https://github.com/shane-breeze/zinv-analysis/tree/master/zinv/modules/readers). These modules are applied to the data with the (alphatwirl)[https://github.com/alphatwirl/alphatwirl] package and contain a class (possibly) with the `begin`, `event` and `end` methods.\n\nThe `begin` method is run at the start of processing the data to initialise some required parameters. The [EventTools](https://github.com/shane-breeze/zinv-analysis/blob/master/zinv/modules/readers/EventTools.py) module adds a `register_function` method to the `event` to allows functions to be cached for lazy-evaluation (e.g. the JEC variations function is not run if the JEC variations are not saved in the output).\n\nThe `event` method is applied to each iteration over the input data. This corresponds to a chunk of events which are loaded into numpy arrays with [uproot](https://github.com/scikit-hep/uproot). Here the derived variables are evaluated. However, because of thee lazy-evaluation this is typically blank for most modules.\n\nThe `end` method ia applied at the end of processing to clear up anything that needs to be cleared. If this is run in multiprocessing or batch processing mode then modules are serialised. Lambda functions are not serialisable and hence must be created with the `begin` method and cleared in the `end` method.\n\n### Output\n\nA special module defines the output. Currently this is [HDF5.py](https://github.com/shane-breeze/zinv-analysis/blob/master/zinv/modules/collectors/HDF5.py). Instead of creating derived variables, this module will evaluate the previously defined functions and store them into a `.h5` file using pandas. The actual output is defined by yaml config.\n\n### Config\n\nThe yaml config is defined externally by the user and controls where the datasets are found, which modules are applied and the output into the dataframes. However, with this flexibility extra care must be taken so modules which depend on each other are defined and in the correct order. For example, if the JEC variations are saved by the `HDF5` module, then the `JECVariation` module must be included in the sequence before the output module.\n\n\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/shane-breeze/zinv-analysis", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "zinv-analysis", "package_url": "https://pypi.org/project/zinv-analysis/", "platform": "", "project_url": "https://pypi.org/project/zinv-analysis/", "project_urls": { "Homepage": "https://github.com/shane-breeze/zinv-analysis" }, "release_url": "https://pypi.org/project/zinv-analysis/0.3.2/", "requires_dist": [ "alphatwirl (>=0.23.2)", "atuproot (>=0.1.13)", "awkward (>=0.8.11)", "awkward-numba (>=0.8.11)", "cachetools (>=3.1.0)", "icc-rt (>=2019.0)", "intel-openmp (>=2019.0)", "numba (>=0.42.1)", "numpy (>=1.16.2)", "oyaml (>=0.8)", "pandas (>=0.24.1)", "pysge (>=0.1.3)", "scipy (>=1.3.1)", "six (>=1.12.0)", "subprocess32 (>=3.5.3)", "tabulate (>=0.8.3)", "tqdm (>=4.31.1)", "uproot (>=3.4.9)", "uproot-methods (>=0.4.3)" ], "requires_python": "", "summary": "AlphaTwirl + uproot for the Z inv. width analysis", "version": "0.3.2", "yanked": false, "yanked_reason": null }, "last_serial": 6581688, "releases": { "0.2.2": [ { "comment_text": "", "digests": { "md5": "f2eb9db749be0051912c10d6d4b667ba", "sha256": "408360b9b01efb5e54134797c392dd667571aaa79a7c7ca29158806f214f775a" }, "downloads": -1, "filename": "zinv_analysis-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "f2eb9db749be0051912c10d6d4b667ba", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 51492, "upload_time": "2019-08-10T15:14:28", "upload_time_iso_8601": "2019-08-10T15:14:28.815266Z", "url": "https://files.pythonhosted.org/packages/a6/ee/4d0c2e1834eb2f5760ae57645f4bebd6f4b8c455e391d92b07e0b2ede298/zinv_analysis-0.2.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "dbf947bd5ec8d26f216a3d075dd53412", "sha256": "a9c7907d0c560d4a3e3ac6f93861c098c32604f98842ec88f2b8374a41b6f5bf" }, "downloads": -1, "filename": "zinv-analysis-0.2.2.tar.gz", "has_sig": false, "md5_digest": "dbf947bd5ec8d26f216a3d075dd53412", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31298, "upload_time": "2019-08-10T15:14:31", "upload_time_iso_8601": "2019-08-10T15:14:31.336898Z", "url": "https://files.pythonhosted.org/packages/55/8d/fd77f6651b54f9f4d49e2f7331cb65a6643bed1aebc613eafafc719242bf/zinv-analysis-0.2.2.tar.gz", "yanked": false, "yanked_reason": null } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "8fa2de80ee1a27b20a9da5b38e8dc955", "sha256": "0adbc37fb3707f16397a6e7447f10df886dc69a14f64d16fab2ee20f5813094f" }, "downloads": -1, "filename": "zinv_analysis-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "8fa2de80ee1a27b20a9da5b38e8dc955", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 42823, "upload_time": "2019-08-14T09:21:58", "upload_time_iso_8601": "2019-08-14T09:21:58.153313Z", "url": "https://files.pythonhosted.org/packages/e6/79/856d81b857b1811fca78ff5812ae74f08f7c2089a3215349f651794e9787/zinv_analysis-0.3.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "842ead80298f75b55a52ae7874f22089", "sha256": "ef8b8c8e1eb8bb2f01db10824102b5fae711ecb2a9223aa2cf19884ec610a503" }, "downloads": -1, "filename": "zinv-analysis-0.3.0.tar.gz", "has_sig": false, "md5_digest": "842ead80298f75b55a52ae7874f22089", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29051, "upload_time": "2019-08-14T09:22:09", "upload_time_iso_8601": "2019-08-14T09:22:09.417946Z", "url": "https://files.pythonhosted.org/packages/0c/e6/fc732d66b847fffb7036ca313e4af434e51b6eb7d5d4df7436e7bf1094fd/zinv-analysis-0.3.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "f2886e79d2f34903019656cec8f4aa63", "sha256": "23f22898a326ce467c0ba8b8359f6864c3f04b94cf82defbc210567b32f97c34" }, "downloads": -1, "filename": "zinv_analysis-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f2886e79d2f34903019656cec8f4aa63", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 45107, "upload_time": "2019-10-22T13:56:35", "upload_time_iso_8601": "2019-10-22T13:56:35.047182Z", "url": "https://files.pythonhosted.org/packages/97/d9/1cf589b0d237027d1bb891d6a7974cf9c34484b67ea94fbab3fa8cff60e4/zinv_analysis-0.3.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "d9c0c11b74b470677520fa35cdc28e2e", "sha256": "78458c43f16768cc524f61d747751232d075ef38ef4844d8310a40497e4745d7" }, "downloads": -1, "filename": "zinv-analysis-0.3.1.tar.gz", "has_sig": false, "md5_digest": "d9c0c11b74b470677520fa35cdc28e2e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31374, "upload_time": "2019-10-22T13:56:36", "upload_time_iso_8601": "2019-10-22T13:56:36.653918Z", "url": "https://files.pythonhosted.org/packages/de/ec/30a3c1e28c1ea80159e47572b606fb966c07321c45735793d9e88fe21e3a/zinv-analysis-0.3.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "467f63f9d13d11b321fa78a684c08013", "sha256": "23620887a24b91c4d2a27decd196b917a1773f7fe9e1fa2ad2240853a700764c" }, "downloads": -1, "filename": "zinv_analysis-0.3.2-py3-none-any.whl", "has_sig": false, "md5_digest": "467f63f9d13d11b321fa78a684c08013", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 45145, "upload_time": "2020-02-06T12:11:47", "upload_time_iso_8601": "2020-02-06T12:11:47.819993Z", "url": "https://files.pythonhosted.org/packages/a6/5e/72c16f48f644eff458e035e0ba80d92e1d25ab17a9e9a0a3ca8b49da9b2f/zinv_analysis-0.3.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "12951c5269d72ee5316bd7d34e7678b4", "sha256": "3baf17b0266864469a61dab97e77d9788d29128c79bbe8b07b8795350b4a11d1" }, "downloads": -1, "filename": "zinv-analysis-0.3.2.tar.gz", "has_sig": false, "md5_digest": "12951c5269d72ee5316bd7d34e7678b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32699, "upload_time": "2020-02-06T12:11:49", "upload_time_iso_8601": "2020-02-06T12:11:49.568902Z", "url": "https://files.pythonhosted.org/packages/81/bc/11657790ca53274390ba59b43d6def437745e6ad74d9efb3a7e3fcdef4f9/zinv-analysis-0.3.2.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "467f63f9d13d11b321fa78a684c08013", "sha256": "23620887a24b91c4d2a27decd196b917a1773f7fe9e1fa2ad2240853a700764c" }, "downloads": -1, "filename": "zinv_analysis-0.3.2-py3-none-any.whl", "has_sig": false, "md5_digest": "467f63f9d13d11b321fa78a684c08013", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 45145, "upload_time": "2020-02-06T12:11:47", "upload_time_iso_8601": "2020-02-06T12:11:47.819993Z", "url": "https://files.pythonhosted.org/packages/a6/5e/72c16f48f644eff458e035e0ba80d92e1d25ab17a9e9a0a3ca8b49da9b2f/zinv_analysis-0.3.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "12951c5269d72ee5316bd7d34e7678b4", "sha256": "3baf17b0266864469a61dab97e77d9788d29128c79bbe8b07b8795350b4a11d1" }, "downloads": -1, "filename": "zinv-analysis-0.3.2.tar.gz", "has_sig": false, "md5_digest": "12951c5269d72ee5316bd7d34e7678b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32699, "upload_time": "2020-02-06T12:11:49", "upload_time_iso_8601": "2020-02-06T12:11:49.568902Z", "url": "https://files.pythonhosted.org/packages/81/bc/11657790ca53274390ba59b43d6def437745e6ad74d9efb3a7e3fcdef4f9/zinv-analysis-0.3.2.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }