Frequently asked questions

From Spinach Documentation Wiki
Jump to: navigation, search

Why is Octave not supported?

Because there are only 24 hours in a day - we don't have the manpower. Octave also has difficulty with parallelization and GPU support. Spinach relies on very recent Matlab features; it would be impractical to maintain compatibility with Octave.

Can you implement my favourite pulse sequence?

Yes, but only if there is some new science to be done in the process. Please send an email to Ilya Kuprov and we'll do our best.

My algorithm is better than what you are using.

Careful there. We have seen a lot of such claims. Spinach runs across half a dozen different spectroscopies: anything that's been swept under the rug in your published benchmarks will come out. There are very few things in numerical linear algebra that survive dissipative systems with thousands of spins and matrix dimensions that exceed a million.

The optimal control sequence is produced, but the fidelity is low.

Make the pulse longer, stronger and give it more points. Generally speaking, if the system doesn’t get where you send it, it simply cannot – but for reasons that have to do with physics, not programming: you might not be giving it enough time or control power, or the destination state might be unreachable from your initial condition.

I am seeing broken 3D graphics or graphics performance is bad.

This is a persistent problem in Matlab, there's nothing we can do. The following command usually fixes the appearance on Windows:

    opengl software

On Linux and Mac you need to launch Matlab with the following key:


As of Matlab 2016b, 3D graphics performance issues are still unresolved in Matlab as a whole.

Why does the stationary flow infrastructure only support periodic boundary conditions?

Because the boundary condition problem at the generator level has no general solution. If you would like to have an absorptive boundary, put rapid relaxation into boundary voxels. If you would like some specifiic non-absorptive boundary behaviour, adjust your velocity field accordingly.

Which rotation conventions does Spinach use?

Active ZYZ, described in detail here.

Matlab's parallel pool keeps getting stuck.

If you press Ctrl-C in the middle of a lengthy parallel calculation, the worker processes do not stop until they have completed their current chunks.

  1. In benign cases, this would mean that a new calculation cannot be started until all worker nodes complete their chunks and exit. To force parallel pool shutdown use smack.m function.
  2. In bad cases, Matlab's parallel pool becomes hopelessly confused. You will be getting the following error message:
    Error using Composite/subsref (line ###)
    An invalid indexing request was made.
The only solution is to restart Matlab.