Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

simLIBS provides Python class to simulate LIBS spectra with NIST LIBS Database interface.

License

NotificationsYou must be signed in to change notification settings

MKastek/simLIBS

Repository files navigation

PyPI versionLicenseTestsZENADO DOI

SimulatedLIBS provides Python class to simulate LIBS spectra with NIST LIBS Database interface.
SimulatedLIBS also allows the creation of simulated data sets that can be used to train ML models.
SimulatedLIBS was mentioned isFOSS For Spectroscopy by Prof. Bryan A. Hanson, DePauw University.

Project created forB.Eng. thesis:
Computer methods of the identification of the elements in optical spectra obtained by Laser Induced Breakdown Spectroscopy.

Thesis supervisor: Paweł Gąsior PhD
e-mail:pawel.gasior@ifpilm.pl
Institute of Plasma Physics and Laser Microfusion - IPPLM

Installation

pipinstallsimLIBS

Import

fromsimLIBSimportSimulatedLIBS

Example

Parameters:

  • Te - electron temperature [eV]
  • Ne - electron density [cm^-3]
  • elements - list of elements
  • percentages - list of elements concentrations
  • resoulution
  • wavelength range: low_w, upper_w
  • maximal ion charge: max_ion_charge
  • websraping: 'static' or 'dynamic'

Static websraping

libs=SimulatedLIBS(Te=1.0,Ne=10**17,elements=['W','Fe','Mo'],percentages=[50,25,25],resolution=1000,low_w=200,upper_w=1000,max_ion_charge=3,webscraping='static')

Plot

libs.plot(color='blue',title='W Fe Mo composition')

Save to file

libs.save_to_csv('filename.csv')

Interpolated spectrum

SimulatedLIBS interpolates retrieved data from NIST with cubic splines.

libs.get_interpolated_spectrum()

Raw spectrum

Raw retrieved data from NIST

libs.get_raw_spectrum()

Dynamic webscraping

libs=SimulatedLIBS(Te=1.0,Ne=10**17,elements=['W','Fe','Mo'],percentages=[50,25,25],resolution=1000,low_w=200,upper_w=1000,max_ion_charge=3,webscraping='dynamic')

Plot

libs.plot(color='blue',title='W Fe Mo composition')

Ion spectra

After simulation with parameter websraping = dynamic, ion spectra are stored in ion_spectra (pd.DataFrame) and can be plotted.

libs.plot_ion_spectra()

Random dataset of samples

Based on .csv file with chemical composition of samples, one can generate dataset of simulated LIBS measurementswith different Te and Ne values.

Example of input_composition_df pd.DataFrame:

WHHename
502525A
306010B
404020C
SimulatedLIBS.create_dataset(input_composition_df,size=100,Te_min=1.0,Te_max=2.0,Ne_min=10**17,Ne_max=10**18)

Example of output .csv file:

200.0200.1200.2200.3200.4...HWTeNe
000000...2501.431.08e+17
100000...001.061.08e+17
200.10.10.10.1...0681.821.18e+17
3054.556.754.448.4...031.251.06e+17
40121.7143.1140.5115.3...0841.089.23e+17

Animations

SimulatedLIBS can be helpful in creating LIBS animations mostly for educational purpose.

Resolution animation

Changes in resolution in range: 500-10000.

Electron temperature animation

Changes in electron temperature Te in range: 0.5-5 eV.

Electron density animation

Changes in electron density Ne in range: 0.7-1.3 e+17 [cm^-3].

References

  • M. Kastek,et al.,Analysis of hydrogen isotopes retention in thermonuclear reactors with LIBS supported by machine learning. Spectrochimica Acta Part B Atomic Spectroscopy 199: 106576. DOI:10.1016/j.sab.2022.106576.

Used in Research

  • Chen Z, Chen Z, Jiang W, Guo L, Zhang Y.Line intensity calculation of laser-induced breakdown spectroscopy during plasma expansion in nonlocal thermodynamic equilibrium. Opt Lett. 2023 Jun 15;48(12):3227-3230. DOI:10.1364/OL.488250.

About

simLIBS provides Python class to simulate LIBS spectra with NIST LIBS Database interface.

Topics

Resources

License

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp