https://github.com/pranabdas/suvtools

Python library for analyzing and visualizing SSLS SUV Beamline data.

https://github.com/pranabdas/suvtools

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.2%) to scientific vocabulary

Keywords

data-analysis data-visualisation python
Last synced: 5 months ago · JSON representation

Repository

Python library for analyzing and visualizing SSLS SUV Beamline data.

Basic Info
Statistics
  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • Open Issues: 1
  • Releases: 11
Topics
data-analysis data-visualisation python
Created about 5 years ago · Last pushed 6 months ago
Metadata Files
Readme License

README.md

SUV Tools

Python tests status Deploy gh-pages status Deploy gh-pages status Latest Release Supported Python versions

Visit the project homepage https://pranabdas.github.io/suvtools/

Quick start

Install latest stable release: console pip install --upgrade suvtools

Import suvtools into your project: python import suvtools as suv

Modules:

  • suv.load("datafile.txt", scan=None): It will return a two dimensional array with columns for various parameters. If the second argument, i.e., the scan number is not specified, the code will read the last scan from the file.

  • suv.fit_gauss(x, y, a=None, x0=None, sigma=None, xmin=None, xmax=None, num=1000): returns x, Gaussian fitted y values, and prints out relevant parameters. xmin and xmax determines the range to fit. If xmin and xmax are not provided, whole range is used. num determines the number of points returned in x_fit and y_fit.

  • suv.fit_lorentz(x, y, a=None, x0=None, gamma=None, xmin=None, xmax=None, num=1000): returns x, Lorentzian fitted y values, and prints out relevant parameters. xmin and xmax determines the range to fit. If xmin and xmax are not provided, whole range is used. num determines the number of points returned in x_fit and y_fit.

  • suv.save_csv("datafile.txt", csvname=None, scan=None): saves scan to a csv file. The file will be saved in the save directory as datafile with name datafile.csv unless csvname is specified. Like the load module, if the scan number is not specified, it will read the last scan from the file.

  • suv.norm_bg(energy, intensity, x1, x2, x_norm_loc=None): Removes linear background, and normalizes the data. x1, x2 are energy values that determines the slope of the background. By default the normalization done at the tail point of the spectra. It can be changed to other point, enter the corresponding energy value. The intention is to normalize at an energy value away from the peaks/features of interest.

  • suv.lock_peak(data, refdata, x1=None, x2=None, E_col=0, I_col=9, I0_col=4): Locks peak position with respect to the reference data. It locks the maximum of intensity to the same energy; the range of peak search can be specified by input x1 and x2. If no bounds are given, it will find the maximum in the whole data range.

  • suv.calc_area(y, x, x_start=None, x_end=None): Calculates area under the curve for given x and y values. x_start and x_end can be specified to set the limit of integration region, if not provided whole range is integrated.

See the notebook and documentation for example usage.

Python tests

console python3 -m unittest discover tests

Owner

  • Name: Pranab Das
  • Login: pranabdas
  • Kind: user
  • Location: Singapore

GitHub Events

Total
  • Release event: 3
  • Delete event: 1
  • Push event: 96
  • Pull request event: 3
  • Create event: 5
Last Year
  • Release event: 3
  • Delete event: 1
  • Push event: 96
  • Pull request event: 3
  • Create event: 5

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 2
  • Average time to close issues: about 13 hours
  • Average time to close pull requests: 14 minutes
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 25 minutes
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • pranabdas (1)
Pull Request Authors
  • pranabdas (4)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 24 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 6
  • Total maintainers: 1
pypi.org: suvtools

Python library for analyzing and visualizing SSLS SUV Beamline data.

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 24 Last month
Rankings
Dependent packages count: 10.2%
Average: 33.9%
Dependent repos count: 57.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

package-lock.json npm
  • 1127 dependencies
package.json npm
  • gh-pages ^3.2.3 development
  • @docusaurus/core 2.0.0-rc.1
  • @docusaurus/preset-classic 2.0.0-rc.1
  • @easyops-cn/docusaurus-search-local ^0.30.1
  • @mdx-js/react ^1.6.22
  • @svgr/webpack ^5.5.0
  • clsx ^1.2.1
  • file-loader ^6.2.0
  • prism-react-renderer ^1.3.5
  • react ^17.0.2
  • react-dom ^17.0.2
  • rehype-katex ^6.0.2
  • remark-math ^3.0.1
  • url-loader ^4.1.1
.github/workflows/deploy-gh-pages.yml actions
  • actions/checkout v4 composite
  • actions/setup-node v4 composite
  • peaceiris/actions-gh-pages v3 composite
.github/workflows/python-tests.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
Dockerfile docker
  • ubuntu jammy build
.github/workflows/publish.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • pypa/gh-action-pypi-publish release/v1 composite
poetry.lock pypi
  • 113 dependencies
pyproject.toml pypi
  • autopep8 ^2.3.1 develop
  • jupyterlab ^4.2.5 develop
  • matplotlib ^3.9.2
  • numpy ^2.0.2
  • pandas ^2.2.3
  • python ^3.9
  • scipy ^1.13.1
  • psutil ^6.0.0 tests