Difference between revisions of "Powder.m"
(Sync syntax/arguments/outputs with current Spinach source) |
(Restore pre-bulk-edit wiki content) |
||
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:powder.m}} __NOTOC__ | {{DISPLAYTITLE:powder.m}} __NOTOC__ | ||
| − | |||
Static powder interface to pulse sequences. Generates a Liouvillian superoperator, the initial state and the coil state, then passes them on to the pulse sequence function. | Static powder interface to pulse sequences. Generates a Liouvillian superoperator, the initial state and the coil state, then passes them on to the pulse sequence function. | ||
==Syntax== | ==Syntax== | ||
| − | + | answer=powder(spin_system,pulse_sequence,parameters,assumptions) | |
==Arguments== | ==Arguments== | ||
| − | pulse_sequence - pulse sequence function handle. See the | + | pulse_sequence - pulse sequence function handle. See the |
experiments directory for the list of | experiments directory for the list of | ||
pulse sequences that ship with Spinach. | pulse sequences that ship with Spinach. | ||
| Line 69: | Line 68: | ||
==Outputs== | ==Outputs== | ||
| − | + | This function returns a powder average of whatever it is that the pulse sequence returns. If a data structure is returned by the pulse sequence, data structures are powder averaged subfield-by-subfield. | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
==Notes== | ==Notes== | ||
| − | |||
# THIS IS FOR STATIC POWDERS - use [[singlerot.m]] for MAS simulations. | # THIS IS FOR STATIC POWDERS - use [[singlerot.m]] for MAS simulations. | ||
# Arbitrary order rotating frame transformation is supported, including infinite order. See the header of [[rotframe.m]] for further information. | # Arbitrary order rotating frame transformation is supported, including infinite order. See the header of [[rotframe.m]] for further information. | ||
| Line 98: | Line 76: | ||
==See also== | ==See also== | ||
| − | |||
[[Kernel contexts]] | [[Kernel contexts]] | ||
Revision as of 15:49, 5 April 2026
Static powder interface to pulse sequences. Generates a Liouvillian superoperator, the initial state and the coil state, then passes them on to the pulse sequence function.
Syntax
answer=powder(spin_system,pulse_sequence,parameters,assumptions)
Arguments
pulse_sequence - pulse sequence function handle. See the
experiments directory for the list of
pulse sequences that ship with Spinach.
parameters.spins - a cell array giving the spins that the
pulse sequence works on, in the order
of channels, e.g. {'1H','13C'}
parameters.offset - a cell array giving transmitter offsets
in Hz on each of the spins listed in
parameters.spins
parameters.grid - name of the spherical averaging grid
file (see the grids directory in the
kernel).
parameters.rframes - rotating frame specification, e.g.
{{'13C',2},{'14N,3}} requests second
order rotating frame transformation
with respect to carbon-13 and third
order rotating frame transformation
with respect to nitrogen-14. When
this option is used, the assumptions
on the respective spins should be
laboratory frame.
parameters.needs - a cell array of strings specifying ad-
ditional information required by the
sequence:
'zeeman_op' - Zeeman part of the Hami-
ltonian in the laboratory frame, to be
placed into parameters.hzeeman and sent
to the pulse sequence
'aniso_eq' - thermal equilibrium is re-
computed using the full anisotropic Ha-
miltonian at each orientation, and sent
to pulse sequence via parameters.rho0
parameters.rho0 - initial state; may be a function handle
that depends on the three Euler angles
in ZYZ active convention
parameters.serial - if set to true, disables automatic pa-
rallelisation
parameters.sum_up - if set to false, causes the pulse sequ-
ence output at each orientation to be
returned instead of the powder average
parameters.* - additional subfields may be required by
the pulse sequence - check its documen-
tation page
assumptions - context-specific assumptions ('nmr', 'epr',
'labframe', etc.) - see the pulse sequence
header for information on this setting.
Outputs
This function returns a powder average of whatever it is that the pulse sequence returns. If a data structure is returned by the pulse sequence, data structures are powder averaged subfield-by-subfield.
Notes
- THIS IS FOR STATIC POWDERS - use singlerot.m for MAS simulations.
- Arbitrary order rotating frame transformation is supported, including infinite order. See the header of rotframe.m for further information.
- The function supports parallel processing via Matlab's Distributed Computing Toolbox - different system orientations are evaluated on different labs.
See also
Version 2.8, authors: Ilya Kuprov, Luke Edwards