SPECTRA User Interface to Python
Project description
spectra-ui
spectra-ui is a Python library to interface the synchrotron radiation calculation code SPECTRA.
Details
For details, visit the spectra-ui homepage
Installation
Use the package manager to install spectra-ui.
pip install spectra-ui (--user)
Usage
import spectra
# launch SPECTRA: interactive mode, HTML source in CDN
spectra.Start(mode="i")
# open a parameter file "/path/to/parameter_file"
spectra.Open("/path/to/parameter_file")
# select calculation: Far Field & Ideal Condition::Energy Dependence::Angular Flux Density
spectra.SelectCalculation("far", "energy", "fdensa")
# start calculation: output file will be /path/to/data_dir/sample.json
spectra.StartCalculation(folder="/path/to/data_dir", prefix="sample", serial=-1)
# plot Gaussian-Approximated Brilliance in the Post-Processor
spectra.PostProcess.Plot("GA. Brilliance")
# quit SPECTRA
spectra.Exit()
Requirement
You need to install a web browser (Chrome, Edge, or Firefox; Safari is not upported) to show parameter lists, graphical plots, and calculation progress.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spectra-ui-12.0.0.2.zip
(5.3 MB
view hashes)
Built Distributions
Close
Hashes for spectra_ui-12.0.0.2-py3-none-win_amd64.whl
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | d393d2d691561e3b1670a07ba9cfc3b36071184064c63adf7a88fb9d581513ce |
|
| MD5 | 4eee832e6c439bc952e5bf1a5b089757 |
|
| BLAKE2b-256 | 8678ba8dbdc4d0113380228bb0056b9b6d78184fabdfdb340d4b1b9940e451bf |
Close
Hashes for spectra_ui-12.0.0.2-py3-none-macosx_14_0_x86_64.whl
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | c215eb641910883d909ea1c568faaaac016d198282e11b73235c558065ba9e3b |
|
| MD5 | 647023a85996b154c8e7f661d1b58736 |
|
| BLAKE2b-256 | c337e452545a11fbda82b949b32456d6dafa0608ed4bc9f3a35f8022e373776b |
Close
Hashes for spectra_ui-12.0.0.2-py3-none-macosx_14_0_arm64.whl
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | 6f491b3a01c79cb9524fad05cd5a76e58b6b23b843c52e180148712fdef00f49 |
|
| MD5 | 88c5e0b232e0a11754a872506ec59156 |
|
| BLAKE2b-256 | a9c5d522c7fc14169c85cf3f9ed35bb8217d6235d1bdbbdb937fc4d257ec08e8 |