eqtools: Modular, extensible, open-source, cross-machine Python tools for working with magnetic equilibria

eqtools: Modular, extensible, open-source, cross-machine Python tools for working with magnetic equilibria
复制标题

eqtools:用于处理磁平衡的模块化、可扩展、开源、跨机器 Python 工具

DOI:
10.1016/j.cpc.2016.09.011
复制
发表时间:
2017
期刊:
Comput. Phys. Commun.
影响因子:
--
通讯作者:
J. Walk
J. Walk
中科院分区:
--
文献类型:
--
作者:
M. Chilenski;I. Faust;J. Walk

文献摘要

被引文献

相似文献

随着聚变能的等离子体物理研究越来越强调跨机器协作和数值模拟,开发便携式工具以使来自不同来源的数据能够以一致的方式进行分析变得越来越重要。本文介绍了用Python编程语言实现的模块化、可扩展、开源工具包,用于处理托卡马克磁平衡和相关数据。eqtools为处理磁平衡数据提供了一个单一的接口,既可以处理导出的数量,也可以在坐标系之间进行映射,可以扩展到不同实验、数据格式和磁重建代码的数据,取代目前使用的各种不可移植的解决方案。此外,虽然开源Python编程语言作为一种用于研究目的的脚本语言提供了许多优势,但缺乏基本的托卡马克特定功能阻碍了该语言的常规使用。在Python中实现平衡映射工具消除了在Python中进行新开发和将遗留代码移植到Python中的实质性障碍。在本文中,我们介绍了工具箱的设计,并详细说明了使用和扩展到附加设备的工作流程。实现一种新的三维样条解(在两个空间维度和时间)也详细。最后,详细介绍了针对现有工具的准确性和速度的验证和基准测试。这些工具的广泛部署将使机构和机器之间有效地共享数据和软件,并对共享数据进行自一致的分析。程序摘要程序标题:eqtoolsCatalogue标识符:afbk_v1_0程序摘要URL:http://cpc.cs.qub.ac.uk/summaries/AFBK_v1_0。html程序可从:CPC程序库,女王大学,贝尔法斯特,N.爱尔兰许可条款:GNU GPL v3No。分布式程序的行数,包括测试数据等:27204分布式程序中包含测试数据等的字节数:1217844分发格式:tar。编程语言:Python、c。计算机:pc。操作系统:Linux, Macintosh OS X, Microsoft Windows。RAM:几兆字节,取决于数据的分辨率。外部例程:F2PY [1], matplotlib [2], MDSplus [3], NumPy [4], SciPy[5]问题性质:访问磁平衡重建代码的结果,与磁平衡绑定的各种坐标系之间的转换。解决方法:数据存储在具有人类可读的getter方法的面向对象数据结构中。坐标使用二元或三元样条进行转换。运行时间:66x66点空间网格上的坐标转换每个时间片需要1到5毫秒,具体取决于所使用的转换和存储了多少中间结果。刘志强,刘志强。基于Python和Fortran语言的并行编程,计算机工程学报,第4期(2009):362 - 362 .[J]。张建军,张建军,张建军,等。基于matlab的二维图形处理系统,计算机工程,9 (3)(2007):90-95 .[J]陈晓明,陈晓明,陈晓明,陈晓明,数据采集系统,仪器仪表学报,32(1)(1997):939-942。范德华,陈志强,陈志强,一种高效数值计算的NumPy数组结构,计算机科学与工程,13 (2)(2011):22-30 .[j]。Jones, T. Oliphant, P . Peterson等,SciPy: Python的开源科学工具(2001-)。
As plasma physics research for fusion energy transitions to an increasing emphasis on cross-machine collaboration and numerical simulation, it becomes increasingly important that portable tools be developed to enable data from diverse sources to be analyzed in a consistent manner. This paper presentseqtools, a modular, extensible, open-source toolkit implemented in the Python programming language for handling magnetic equilibria and associated data from tokamaks.eqtoolsprovides a single interface for working with magnetic equilibrium data, both for handling derived quantities and mapping between coordinate systems, extensible to function with data from different experiments, data formats, and magnetic reconstruction codes, replacing the diverse, non-portable solutions currently in use. Moreover, while the open-source Python programming language offers a number of advantages as a scripting language for research purposes, the lack of basic tokamak-specific functionality has impeded the adoption of the language for regular use. Implementing equilibrium-mapping tools in Python removes a substantial barrier to new development in and porting legacy code into Python. In this paper, we introduce the design of theeqtoolspackage and detail the workflow for usage and expansion to additional devices. The implementation of a novel three-dimensional spline solution (in two spatial dimensions and in time) is also detailed. Finally, verification and benchmarking for accuracy and speed against existing tools are detailed. Wider deployment of these tools will enable efficient sharing of data and software between institutions and machines as well as self-consistent analysis of the shared data.Program summaryProgram title:eqtoolsCatalogue identifier:AFBK_v1_0Program summary URL:http://cpc.cs.qub.ac.uk/summaries/AFBK_v1_0.htmlProgram obtainable from:CPC Program Library, Queen’s University, Belfast, N. IrelandLicensing provisions:GNU GPL v3No. of lines in distributed program, including test data, etc.:27204No. of bytes in distributed program, including test data, etc.:1217844Distribution format:tar.gzProgramming language:Python, C.Computer:PCs.Operating system:Linux, Macintosh OS X, Microsoft Windows.RAM:Several megabytes, depends on resolution of dataClassification:19.4.External routines:F2PY [1], matplotlib [2], MDSplus [3], NumPy [4], SciPy [5]Nature of problem:Access to results from magnetic equilibrium reconstruction code, conversion between various coordinate systems tied to the magnetic equilibrium.Solution method:Data are stored in an object-oriented data structure with human-readable getter methods. Coordinates are converted using bivariate or trivariate splines.Running time:Coordinate transformations on a 66x66 point spatial grid take between 1 and 5 ms per time slice, depending on the transformation used and how many intermediate results have been stored.References:[1]P. Peterson, F2PY: a tool for connecting Fortran and Python programs, International Journal of Computational Science and Engineering 4 (4) (2009) 296–305.[2]J. D. Hunter, Matplotlib: A 2D graphics environment, Computing in Science and Engineering, 9 (3) (2007) 90–95.[3]J. A. Stillerman, T. W. Fredian, K. A. Klare, G. Manduchi, MDSplus data acquisition system, Review of Scientific Instruments 68 (1) (1997) 939–942.[4]S. van der Walt, S. C. Colbert and G. Varoquaux, The NumPy array: a structure for efficient numerical computation, Computing in Science and Engineering 13 (2) (2011) 22–30.[5]E. Jones, T. Oliphant, P Peterson, et al., SciPy: Open source scientific tools for Python (2001-).