Difference between revisions of "Kernel contexts"
(Created page with "A context is an intermediate layer between the kernel (which runs the mathematics) and the experiment (which is programmed as it would be on a spectrometer). Context functions...") |
|||
| Line 11: | Line 11: | ||
# [[singlerot.m]] - single rotation simulations using Fokker-Planck formalism for the rotation part and a spherical grid for the powder average operation. | # [[singlerot.m]] - single rotation simulations using Fokker-Planck formalism for the rotation part and a spherical grid for the powder average operation. | ||
| − | All context functions have the same call syntax, e.g.: | + | All context functions, ectept for [[imaging.m]] have the same call syntax, e.g.: |
| − | answer=doublerot(spin_system,pulse_sequence,parameters,assumptions) | + | answer=doublerot(spin_system,pulse_sequence,parameters,assumptions); |
and call experiment functions using the same syntax: | and call experiment functions using the same syntax: | ||
| Line 19: | Line 19: | ||
answer=pulse_sequence(spin_system,parameters,H,R,K); | answer=pulse_sequence(spin_system,parameters,H,R,K); | ||
| − | + | where H is the Hamiltonian commutation superoperator, R is the relaxation superoperator, and K is the kinetics superoperator. The parameter lists of different pulse sequences are broadly similar. This allows rapid switching of the simulation context by simply calling the same experiment from a different context. | |
| + | |||
| + | The imaging context has a similar call: | ||
| + | |||
| + | answer=imaging(spin_system,pulse_sequence,parameters) | ||
| + | |||
| + | but the assumptions are set internally to 'nmr' and the pulse sequence must have the following syntax: | ||
| + | |||
| + | answer=pulse_sequence(spin_system,parameters,H,R,K,G,F); | ||
| + | |||
| + | where H is the Hamiltonian commutation superoperator, R is the relaxation superoperator, K is the kinetics superoperator, G is a cell array of three gradient operators normalized to 1 Tesla/m, and F is the diffusion and flow superoperator. | ||
Revision as of 14:13, 3 January 2017
A context is an intermediate layer between the kernel (which runs the mathematics) and the experiment (which is programmed as it would be on a spectrometer). Context functions are responsible for setting up rotating frame transformations, transmitter offsets, powder averages, magic angle spinning and other such matters. The following contexts are available:
- crystal.m - single static orientation simulations.
- doublerot.m - double rotation simulations using Fokker-Planck formalism for the rotation part and a spherical grid for the powder average operation.
- floquet.m - single rotation simulations using Floquet formalism for the rotation part and a spherical grid for the powder average operation.
- gridfree.m - single rotation simulations using Fokker-Planck formalism for both the rotation part and the powder average operation. This module also supports stochastic Liouville equation formalism for spin relaxation theory.
- imaging.m - experimental module that provides infrastructure operators for MRI and other spatially distributed spin dynamics simulations.
- liquid.m - liquid state simulations.
- powder.m - static powder simulations using a spherical grid for the powder average operation.
- roadmap.m - static powder simulations using a spherical grid. Simulation results are returned as an array with an answer reported at each orientation found in the spherical grid.
- singlerot.m - single rotation simulations using Fokker-Planck formalism for the rotation part and a spherical grid for the powder average operation.
All context functions, ectept for imaging.m have the same call syntax, e.g.:
answer=doublerot(spin_system,pulse_sequence,parameters,assumptions);
and call experiment functions using the same syntax:
answer=pulse_sequence(spin_system,parameters,H,R,K);
where H is the Hamiltonian commutation superoperator, R is the relaxation superoperator, and K is the kinetics superoperator. The parameter lists of different pulse sequences are broadly similar. This allows rapid switching of the simulation context by simply calling the same experiment from a different context.
The imaging context has a similar call:
answer=imaging(spin_system,pulse_sequence,parameters)
but the assumptions are set internally to 'nmr' and the pulse sequence must have the following syntax:
answer=pulse_sequence(spin_system,parameters,H,R,K,G,F);
where H is the Hamiltonian commutation superoperator, R is the relaxation superoperator, K is the kinetics superoperator, G is a cell array of three gradient operators normalized to 1 Tesla/m, and F is the diffusion and flow superoperator.