Metadata-Version: 2.4
Name: qspec
Version: 0.4.2
Summary: Physics toolbox for laser spectroscopy
Author-email: Patrick Müller <pmueller@physics.ucla.edu>
License: MIT License
        
        Copyright (c) 2022 - 2025 Patrick Müller
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: homepage, https://patmlr.github.io/qspec/
Project-URL: documentation, https://patmlr.github.io/qspec/doc/doc.html
Project-URL: download, https://pypi.org/project/qspec/#files
Project-URL: source, https://github.com/patmlr/qspec
Project-URL: tracker, https://github.com/patmlr/qspec/issues
Keywords: physics,simulation,data analysis,atomic structure,laser spectroscopy,laser cooling,coherent interaction,quantum computing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib
Requires-Dist: numpy>=2.0.2
Requires-Dist: scipy>=1.13.1
Requires-Dist: sympy
Dynamic: license-file

<h1>
<img src="https://raw.githubusercontent.com/patmlr/qspec/refs/heads/dev-jekyll/docs/assets/img/logo.svg" width="300">
</h1><hr>

[![Static Badge](https://img.shields.io/badge/OS-Windows-yellow)](https://www.microsoft.com)
[![Static Badge](https://img.shields.io/badge/Python-3.9%2B-blue?logo=python&logoColor=white)](https://www.python.org/)
[![Static Badge](https://img.shields.io/badge/License-MIT-slateblue)](https://github.com/patmlr/qspec/blob/main/LICENSE)

[![Static Badge](https://img.shields.io/badge/DOI-10.1016/j.cpc.2025.109550-orange)](https://doi.org/10.1016/j.cpc.2025.109550)
[![Static Badge](https://img.shields.io/badge/arXiv-2409.01417-red)](https://arxiv.org/abs/2409.01417)

The [_qspec_](https://pypi.org/project/qspec/) Python package provides mathematical and physical functions
frequently used in laser spectroscopy but also more general methods for data processing. 
Most functions are compatible with numpy arrays and are able to process *n*-dimensional arrays.
This enables fast calculations with large samples of data, e.g., facilitating Monte-Carlo simulations.
Tutorials and the API documentation are available on the [_Homepage_](https://patmlr.github.io/qspec/).
Additional example scripts can be found in the example folder on [_GitHub_](https://github.com/patmlr/qspec).

### Dependencies

- [_Matplotlib_](http://matplotlib.org/)
- [_NumPy_](http://www.numpy.org/)
- [_SciPy_](http://www.scipy.org/)
- [_SymPy_](http://www.sympy.org/)

### Modules

- _algebra_: Contains functions to calculate dipole coefficients and Wigner-*j* symbols.
- _analyze_: Contains optimization functions and a class for King-plots.
- _models_: Framework to generate modular fit models.
- _physics_: Library of physical functions.
- _simulate_: Intuitive framework to simulate coherent laser-atom interactions.
- _stats_: Contains functions for the statistical analysis of data.
- _tools_: General helper, print, data shaping and mathematical functions.

### Exemplary use cases
- Calculate frequently used physical observables such as kinetic energies, velocities, Doppler shifts, 
hyperfine structure splittings, etc.
- Coherently evolve atomic state population in a classical laser field, including rank-*k* multipole interactions. 
In contrast to powerful packages such as [_qutip_](https://qutip.org/),
the quantum mechanical system is set up automatically by providing atomic state and laser information.
- Generate modular lineshape models for fitting. The modular system can be used
to sum, convolve, link models and share parameters, fit hyperfine structure spectra, etc. This module is similar to the [_satlas2_](https://iks-nm.github.io/satlas2/) Python package.
- Perform multidimensional King-plot analyses.
