(原子物理学)计算碱金属蒸气的弱探针磁化率
ElecSus的Python项目详细描述
计算原子系综的磁化率的程序。 该程序设计用于模拟d线上的弱探针激光光谱 热碱金属蒸气电池。程序还包括安装 允许从中提取实验参数的例程 实验光谱数据。
2.0.0版中的新功能
Significantly improved user-friendliness in the form of a GUI to aid in calculating theory spectra and fitting experimental data.
Works on Windows and Linux, tested on Windows 7, 8.1, 10 and Ubuntu 14.04. Currently not tested on Mac.
Rewritten fitting routines MLFittingRouine.py, RRFittingRoutine.py and SAFittingRoutine.py to support keyword arguments, passed to scipy.curve_fit / leastsq methods
Added new support modules: - elecsus_methods.py - libs/data_proc.py
elecsus_new.py contains two simplified methods for either calculating spectra or fitting data, and should be easier to interface with external code for, e.g., batch processing / fitting of data or generating 2D plots.
data_proc.py contains methods for binning (reducing the number of data points by local averaging) and moving-average smoothing data traces
both of these new modules are used by the GUI program
Renamed the old elecsus.py module for added clarity
elecsus.py –> elecsus_runcard.py
This is the old method of calling elecsus with <runcard>.py files as system arguments. This way is now obsolete, being replaced by either the GUI or the methods contained in elecsus_methods.py. For backwards compatibility, the elecsus_runcard.py module allows the runcards to be used in the same way as before.
The example runcards and example data have been moved to sub-directories, /runcard and /sample_data, respectively.
Added a new module, spectra_Efield.py
This module allows calcualtion of spectra with the output of electric field vectors, rather than spectroscopic quantities. This should allow calculation of spectra in cells with non-uniform magnetic fields, by splitting the cell into sufficiently small parts that the field variation across any one part is negligible. Spectroscopic quantities can be calculated from the electric field vector by using Jones matrices.
<< add example for magnetic field calculation? >>
先决条件
必须安装以下python编程语言 套餐:
- Scipy version 0.12.0 or later
- Numpy
- Matplotlib
- wxPython 2.8 (for GUI)
安装
解压缩elecsus.zip文件<;<;以使用pip install info更新>;>;
用法
- For GUI operation:
After package installation, from the python interpreter type:
from elecsus import elecsus_gui
elecsus_gui.start()
在Windows中,双击elecsus目录中的run_gui.bat文件
或者,打开终端或命令行窗口并导航到elecsus目录。类型:
python elecsus_gui.py
- 对于RunCard操作:
打开一个终端窗口并移动到文件被解压到的目录。
要运行从runcard.py获取参数的程序,请键入:
python elecsus_runcard.py
使用特定RunCard类型的参数运行
python elecsus_runcard.py <run card file name>
因此,要运行第一个d1示例,请键入
python elecsus.py runcard_D1sample.py
要运行第二个示例,请键入
python elecsus.py runcard_D2sample.py
- 用于集成到外部代码:
- elecsus_methods.py模块包含两个方法:calculate()和fit_data(), 这样可以很容易地集成到外部代码中。请参阅elecsus_methods.py源 有关详细信息
手动
有关gui文档,请参见docs/elecsus_gui_userguide.pdf
对于elecsus文件,请转到http://dx.doi.org/10.1016/j.cpc.2014.11.023 然后下载报纸。它是公开发布的,因此是免费的。
许可证
随此程序分发的所有文件都是根据 apache许可证,2.0版。提供许可证副本。