SpinWright is a computer simulation of the Bloch equations. It is designed to teach the basic principles of nuclear magnetic resonance and magnetic resonance imaging in a fashion that gives the user the flavor of programming and running a real spectrometer or imager.
The user controls the simulation through specifications of the scanner, pulse sequence and subject. An experiment can then be run and the result displayed. The user may define scanner parameters, pulse sequences and subjects, or may select pre-defined ones. A subject consists of isochromatic spin groups whose gyromagnetic ratio, spin density, T1, T2, chemical shift, initial magnetization, and initial position, velocity, acceleration and jerk components are specified by the user. The currently supported pulse sequence elements include rectangular- and truncated sinc-shaped rf pulses, trapezoidal and spiral gradient waveforms, delay elements and data flags. Loops may be nested and trapezoidal gradient tables may be driven by any loop containing the gradient table. Subjects and pulse sequences may be entered as ASCII text files or through graphical user interfaces. Limited result analysis is provided within
SpinWright along with export in a tab-delimited ASCII format suitable for import into other analysis programs.
SpinWright is written in the platform-independent Java programming language. The Web-based version uses serialized objects for the pre-defined specifications to make it compatible with the Java security model. The fullfeatured version reads and writes files on the user's computer and thus runs as a stand-alone program requiring that the Java runtime environment be installed locally.