{"id":27942134,"url":"https://github.com/pranabdas/suvtools","last_synced_at":"2025-05-07T11:26:31.930Z","repository":{"id":48275647,"uuid":"315027312","full_name":"pranabdas/suvtools","owner":"pranabdas","description":"Python library for analyzing and visualizing SSLS SUV Beamline data. ","archived":false,"fork":false,"pushed_at":"2025-04-13T02:23:16.000Z","size":5675,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-13T03:27:29.421Z","etag":null,"topics":["data-analysis","data-visualisation","python"],"latest_commit_sha":null,"homepage":"https://pranabdas.github.io/suvtools/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pranabdas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-22T12:02:22.000Z","updated_at":"2025-04-13T02:22:49.000Z","dependencies_parsed_at":"2025-04-13T03:24:05.187Z","dependency_job_id":"2ff4afb2-5285-4413-87cb-e0714cdbd169","html_url":"https://github.com/pranabdas/suvtools","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pranabdas%2Fsuvtools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pranabdas%2Fsuvtools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pranabdas%2Fsuvtools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pranabdas%2Fsuvtools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pranabdas","download_url":"https://codeload.github.com/pranabdas/suvtools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252867564,"owners_count":21816702,"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":["data-analysis","data-visualisation","python"],"created_at":"2025-05-07T11:26:31.272Z","updated_at":"2025-05-07T11:26:31.914Z","avatar_url":"https://github.com/pranabdas.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eSUV Tools\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/pranabdas/suvtools/actions/workflows/python-tests.yml\"\u003e\u003cimg src=\"https://github.com/pranabdas/suvtools/actions/workflows/python-tests.yml/badge.svg\" alt=\"Python tests status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/pranabdas/suvtools/actions/workflows/deploy-gh-pages.yml\"\u003e\u003cimg src=\"https://github.com/pranabdas/suvtools/actions/workflows/deploy-gh-pages.yml/badge.svg\" alt=\"Deploy gh-pages status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/pranabdas/suvtools/actions/workflows/publish.yml\"\u003e\u003cimg src=\"https://github.com/pranabdas/suvtools/actions/workflows/publish.yml/badge.svg\" alt=\"Deploy gh-pages status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/pranabdas/suvtools/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/sourcerer-io/hall-of-fame.svg?colorB=A31F34\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/suvtools/#history\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/pranabdas/suvtools.svg\" alt=\"Latest Release\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/suvtools/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/suvtools\" alt=\"Supported Python versions\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\nVisit the project homepage \u003chttps://pranabdas.github.io/suvtools/\u003e\n\n## Quick start\n\nInstall latest stable release:\n```console\npip install --upgrade suvtools\n```\n\nImport suvtools into your project:\n```python\nimport suvtools as suv\n```\n\n**Modules:**\n\n- `suv.load(\"datafile.txt\", scan=None)`: It will return a two dimensional array\nwith columns for various parameters. If the second argument, i.e., the scan\nnumber is not specified, the code will read the last scan from the file.\n\n- `suv.fit_gauss(x, y, a=None, x0=None, sigma=None, xmin=None, xmax=None, num=1000)`:\nreturns x, Gaussian fitted y values, and prints out relevant parameters. `xmin`\nand `xmax` determines the range to fit. If `xmin` and `xmax` are not provided,\nwhole range is used. `num` determines the number of points returned in `x_fit`\nand `y_fit`.\n\n- `suv.fit_lorentz(x, y, a=None, x0=None, gamma=None, xmin=None, xmax=None, num=1000)`:\nreturns x, Lorentzian fitted y values, and prints out relevant parameters.\n`xmin` and `xmax` determines the range to fit. If `xmin` and `xmax` are not\nprovided, whole range is used. `num` determines the number of points returned in\n`x_fit` and `y_fit`.\n\n- `suv.save_csv(\"datafile.txt\", csvname=None, scan=None)`: saves scan to a csv\nfile. The file will be saved in the save directory as `datafile` with name\n`datafile.csv` unless  `csvname` is specified. Like the `load` module, if the\nscan number is not specified, it will read the last scan from the file.\n\n- `suv.norm_bg(energy, intensity, x1, x2, x_norm_loc=None)`:\nRemoves linear background, and normalizes the data. x1, x2 are energy values\nthat determines the slope of the background. By default the normalization done\nat the tail point of the spectra. It can be changed to other point, enter the\ncorresponding energy value. The intention is to normalize at an energy value\naway from the peaks/features of interest.\n\n- `suv.lock_peak(data, refdata, x1=None, x2=None, E_col=0, I_col=9, I0_col=4)`:\nLocks peak position with respect to the reference data. It locks the maximum of\nintensity to the same energy; the range of peak search can be specified by input\n`x1` and `x2`. If no bounds are given, it will find the maximum in the whole\ndata range.\n\n- `suv.calc_area(y, x, x_start=None, x_end=None)`:\nCalculates area under the curve for given `x` and `y` values. `x_start` and\n`x_end` can be specified to set the limit of integration region, if not provided\nwhole range is integrated.\n\nSee the notebook and documentation for example usage.\n\n### Python tests\n\n```console\npython3 -m unittest discover tests\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpranabdas%2Fsuvtools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpranabdas%2Fsuvtools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpranabdas%2Fsuvtools/lists"}