{"id":19686150,"url":"https://github.com/loiccoyle/pylossmap","last_synced_at":"2025-02-27T07:42:09.785Z","repository":{"id":46052294,"uuid":"218010086","full_name":"loiccoyle/pylossmap","owner":"loiccoyle","description":"Python package to help with the handling of the LHC's BLM measurements.","archived":false,"fork":false,"pushed_at":"2021-11-17T15:10:18.000Z","size":138694,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-10T07:11:59.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loiccoyle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-28T09:26:05.000Z","updated_at":"2023-08-26T13:11:06.000Z","dependencies_parsed_at":"2022-09-15T01:20:21.340Z","dependency_job_id":null,"html_url":"https://github.com/loiccoyle/pylossmap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loiccoyle%2Fpylossmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loiccoyle%2Fpylossmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loiccoyle%2Fpylossmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loiccoyle%2Fpylossmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loiccoyle","download_url":"https://codeload.github.com/loiccoyle/pylossmap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240993950,"owners_count":19890419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T18:26:26.329Z","updated_at":"2025-02-27T07:42:09.766Z","avatar_url":"https://github.com/loiccoyle.png","language":"Jupyter Notebook","readme":"[![Documentation Status](https://readthedocs.org/projects/pylossmap/badge/?version=latest)](https://pylossmap.readthedocs.io/en/latest/?badge=latest)\n\n# pylossmap\n\nThis library facilitates the fetching and handling of the LHC's BLM measurements.\n\n# Installation\n\n```sh\ngit clone https://github.com/loiccoyle/pylossmap\ncd pylossmap\npip install .\n```\n\n# Requirements\n\n* [pytimber](https://www.github.com/rdemaria/pytimber)\n* pandas\n* numpy\n* matplotlib\n\nOptional:\n* tqdm\n\n# Usage\n\n**See examples in the** `notebooks` **folder.**\n\nThere are 3 main classes:\n\n## The BLMDataFetcher class\n\nThis class will handle the fetching of BLM data and assigning the correct header information.\n\nIt has 2 main methods of fetching data:\n\n* `from_datetime`: which takes 2 datetime objects or epoch/unix time `int`s/`float`s.\n* `from_fill`: which takes a fill number along with the requeted beam modes.\n\nIt also has a helper method to fetch data surrounding triggers of the ADT blowup:\n\n* `iter_from_adt`: iteratively yield BLMData instances of data surrounding the trigger of the ADT blowup within the requested time range.\n\nA helper method to facilitate the fetching of BLM background for data following an ADT trigger:\n\n* `bg_from_ADT_trigger`: takes datetime of the ADT trigger, it will figure out a time interval where no ADT blowup triggers occurred and fetches the background data.\n\nThe fetcher class returns the data in the shape of a BLMData instance.\n\n## The BLMData class\n\nThis class handles the BLM data, the main methods are:\n\n* `plot`: creates a waterfall plot of the BLM data.\n* `iter_max`: iterates on index of the max values of the desired BLMS, defaults to the primary IR 7 BLMs.\n* `fetch_intensity`,`fetch_filling_scheme`,`fetch_number_bunches`,`fetch_energy`: fetches some additional beam information for the current time range.\n\nYou can access the raw data through the `data` attribute.\n\nIn order to create a loss map of a given time, use the `loss_map` method, and provide the desired datetime. This outputs a `LossMap` instance.\n\n## The LossMap class\n\nThis class handles the loss map processing. It provides a pandas/numpy style interface for filtering and selecting BLMs.\nSome main methods are:\n\n* `plot`: to create a loss map plot.\n* `set_background`: to set another LossMap instance as the background signal.\n* `clean_background`: to substract the background.\n* `normalize`: to normalize the data to the max value, or the signal of the provided BLM.\n* `fetch_intensity`,`fetch_filling_scheme`,`fetch_number_bunches`,`fetch_energy`: fetches some additional beam information for the current timestamp.\n* various methods for filtering based on `cell`, `IR`, `side`, collimator `type`, `beam`, ...\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floiccoyle%2Fpylossmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floiccoyle%2Fpylossmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floiccoyle%2Fpylossmap/lists"}