Skip to main content

'high-throughput spectrum peak modeling tools by using Spectrum adapted EM algorithms'

Project description

EMPeaks

This package is for high-throughput peak analysis by using Spectrum Adapted EM algorithm. Please refer the following paper when using this package: Sci. Tech. Adv. Mater. 20, 733-735 (2019).; STAM-method, in press

version 2.0.x

In version 2.0.x, Gaussian Mixture Model (GMM), Lorentzian Mixture Model (LMM), Pseudo Voigt Mixture model (PVMM), and Doniach-Sunijic Miture model (DSMM). In principle, these combination models are also available but not implemented yet.

From this version, each model has the same functions but differ from version 1, though functions and classes in version 1 still work. Sample codes to import these models are followings for instance:

from EMPeaks import GaussianMixture
gmm = GaussianMixture.GaussianMixtureModel(K=3)
from EMPeaks import LorentzianMixture
lmm = LorentzianMixture.LorentzianMixtureModel(K=2)

Mixture model object includes a single model object. These packages also have a class for single Gaussian, Lorentizan, pseudo Voigt, and DS models. For example,

from EMPeaks import GaussianMixture
gm = GaussianMixture.Gaussian(x_min=-100, x_max=100, sigma_min=0.1, sigma_max=10)

In version 2, we do not implement the class for optimization. Instead,all model classes has functions to optimize the parameters to fit the target data.

from EMPeaks import GaussianMixture
import numpy as np

x = np.load("energy.dat")
y = np.load("intensity.dat")

gmm = GaussianMixture.GaussianMixtureModel(K=3)
gmm.fit(x, y)
# if you want to sample some initial guess and choose the highest likelihood model,
gmm.sampling(x, y, trial=10)

After fitting, you can plot both raw data and fitted model as follows:

gmm.plot(x, y)

© 2020-2021 National Institute of Advanced Industrial Science and Technology (AIST)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

EMPeaks-2.0.2.tar.gz (30.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

EMPeaks-2.0.2-py3-none-any.whl (41.7 kB view details)

Uploaded Python 3

File details

Details for the file EMPeaks-2.0.2.tar.gz.

File metadata

  • Download URL: EMPeaks-2.0.2.tar.gz
  • Upload date:
  • Size: 30.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.0

File hashes

Hashes for EMPeaks-2.0.2.tar.gz
Algorithm Hash digest
SHA256 597cea1839a8d03137bc1dd7c03d8d4bc874bfbdb8b37dc063032507d68e3706
MD5 aace4b6e2e460a745b7622370de4de0f
BLAKE2b-256 6eace4b43b5a2f36ed5cd0e672f0728c35fa21de5097986fabcc86b4b77c96c1

See more details on using hashes here.

File details

Details for the file EMPeaks-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: EMPeaks-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 41.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.0

File hashes

Hashes for EMPeaks-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0ddc3415b91b34cffa897bf1e40b71dfaeb4c39e01a1dcfede4a48f698dd4500
MD5 7eae4ed0803864db4c8126667f1c4800
BLAKE2b-256 ee041031439edab5c5d95a829e4d098c6da220be33973fb05c4273b4ac44d711

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page