Spin-Scenario: A flexible scripting environment for realistic MR simulations

J Magn Reson. 2019 Apr:301:1-9. doi: 10.1016/j.jmr.2019.01.016. Epub 2019 Feb 13.

Abstract

In this paper we present a new open source package, Spin-Scenario, aimed at developing an intuitive, flexible and unique scripting framework able to cover many aspects of simulations in both MR imaging and MR spectroscopy. For this purpose, we adopted the Liouville space model as the standard computing engine and let the consequent computational burden be afforded by parallel computing techniques. Benefitting from the powerful Lua scripting language, the pulse sequence programming syntax was specially designed to offer an extremely concise way of scripting. Moreover, the built-in dataflow graph based optimal control scheme enables an efficient optimization of shaped pulses or multiple cooperative pulses for real-life experiment evaluations. As the name states, the users are expected to be able to realize their creative ideas like a scenarist that creates a scenario script and looks at the spin actors acting accordingly. The validation of the framework was demonstrated with several examples within MR imaging and MR spectroscopy. Spin-Scenario is available for download at https://github.com/spin-scenario.

Keywords: Optimal control; Pulse sequence programming; Spin dynamics; TensorFlow; Time-frequency spectrogram.

Publication types

  • Research Support, Non-U.S. Gov't