Spin`Algebra

Spin`Algebra — Magnetic Resonance with Mathematica
 

Welcome

Welcome to Spin`Algebra. You can find here interactive tools aimed to simplify the work in Mathematica (Wolfram Research Inc.), the package Spin`Algebra` designed for symbolic computation of problems in magnetic resonance spectroscopy and the lectures about Mathematica.

Spin`Algebra

The package Spin`Algebra` consist of elements and operators of algebra used to model the experiments in magnetic resonance spectroscopy. It supports general formalism of non-commutative products of spin operators and bra- and ket-vectors, the common tasks of operator transformation into different representations, conversions between symbolic and matrix forms etc.

The following interactive tools are currently available:

ViewPoint Selector

The realization of three-dimensional graphics in Mathematica doesn't support free rotation and high quality rendering the picture simultaneously. One has to change either manually the option ViewPoint and repeat rendering the graphics or to use the package RealTime3D` which supports library OpenGL and has some limitations. The package ViewPointSelect` combines these two alternatives. It provides an easy way to choose interactively view point of 3D graphics in Mathematica and redraw the result by standard Mathematica functions. The package supports graphical objects SurfaceGraphics and Graphics3D and functions Plot3D and ListPlot3D, ParametricPlot3D, etc.

Options Explorer

Mathematica has too many functions and it is not easy to remember all of their properties. OptionsExplorer provides an interactive tool to simplify the work with options of the functions. It opens a dialog window designed for getting information about functions, selecting their values and inserting the activated options into the editing expression. In addition to the Mathematica default set of options the package introduces alternative and preset options. Alternative options may include several values for a particular option thus any possible combination of alternatives can be selected. Preset options allow choosing extra sets of options.

Selection Browser

SelectionBrowser provides a referring tool to work with one or several notebooks simultaneously. One can add reference to any part of the cell and later can return by its reference button. The package uses the undocumented function of Mathematica CellInformation and does not need to add any changes into the editing notebook! All reference information is stored with reference buttons in the palette SelectionBrowser. To launch the palette execute SelectionBrowser[].

Help Builder

Mathematica provides the package AuthorTools` designated for building of different kind of documentation. HelpBuilder simplifies the part of this job, a conversion of files into Help Browser format. The creation of help documentation by HelpBuilder includes the following steps:
1. Creating a project file. It has the same structure as AuthorTools` project file so one can use an interactive dialog window MakeProject. There is one optional change. If the project file is placed in the same directory as files with documentation which is usually the case then it better to use option Directory"→ ". In this case the project directory will be determined from the directory of the project file so one doesn't need to edit the project file if its directory is changed.
2. Evaluating HelpBuilder["projectfile"] to execute the following tasks:
- Creating a new directory Documentation\English. If the directory Documentation exists it appends a number to the name of directory to make it unique.
- Copying all project files and all StyleSheets into created directory
- Converting CellTags from cells of selected style to TaggingRules. TaggingRules are used by AuthorTools`MakeIndex to make links to cells from the BrowserIndex.
The conversion is optional because the package AuthorTools` provides a tool for direct editing of TaggingRules. I prefer to use CellTags in original files for further indexing because of convenience of editing and clearer structure of notebooks.
- Paginating
- Making BrowserCategories
- Adding links to Contents and Index into BrowserCategories (optional).
- Generating a palette to make browser index and contents and set delimiters to browser categories.
3. Using HelpBuilder palette for the following tasks:
- Making Index file. I have changed the procedure of sorting because the Mathematica function Sort seems to have problems with non-ANSI characters, for example, it doesn't sort properly words written in Cyrillic alphabet.
- Generating a table of contents of a project. For some reason direct execution of this task from the HelpBuilder occasionally generates errors due to problems with Notebook cache.
- Launching SetDelimiters dialog window for visual editing of BrowserCategories delimiters.
4. Editing delimiters of BrowserCategories.
5. Copying the directory Documentation\English into directory Applications\ProjectName of $UserBaseDirectory
6. Rebuilding Help Index by menu command Help > Rebuild Help Index.

This is personal project by Yuri E. Kandrashkin.
It relates to Mathematica and research in Magnetic Resonance
The site opened June 27, 2006.



   Last modified: February 1, 2007