Difference between revisions of "Powder.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Created page with "Powder interface to pulse sequences. Generates a Liouvillian super- operator, the initial state and the coil state, then passes them on to the pulse sequence function. This f...")
 
Line 1: Line 1:
Powder interface to pulse sequences. Generates a Liouvillian super-
+
{{DISPLAYTITLE:powder.m}}
operator, the initial state and the coil state, then passes them on
+
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.
to the pulse sequence function.
 
  
This function supports parallel processing via Matlab's Distributed
+
==Syntax==
Computing Toolbox - different crystal orientations are evaluated on
 
different labs. Arguments:
 
  
    pulse_sequence -  pulse sequence function handle. See the
+
    answer=powder(spin_system,pulse_sequence,parameters,assumptions)
                      experiments directory for the list of
+
 
                      pulse sequences that ship with Spinach.
+
==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     -  a structure containing sequence-specific
+
  parameters.offset    -  a cell array giving transmitter offsets
                      parameters. See the pulse sequence header
+
                          in Hz on each of the spins listed in
                      for the list of parameters each sequence
+
                          parameters.spins
                      requires. The parameters that this inter-
+
                      face itself requires are:
+
  parameters.grid      - name of the spherical averaging grid
                     
+
                          file (see the grids directory in the
                      parameters.spins - a cell array giving the
+
                          kernel).
                      spins that the pulse sequence works on, in
+
                      the order of channels, e.g. {'1H','13C'}
+
  parameters.rframes  - rotating frame specification, e.g.
 
+
                        {{'13C',2},{'14N,3}} requests second
                      parameters.offset - a cell array giving
+
                        order rotating frame transformation
                       transmitter offsets on each of the spins
+
                        with respect to carbon-13 and third
                       listed in parameters.spins.
+
                        order rotating frame transformation
 
+
                        with respect to nitrogen-14. When
                       parameters.grid - name of the spherical
+
                        this option is used, the assumptions
                       averaging grid file (see the grids direc-
+
                        on the respective spins should be
                      tory in the kernel).
+
                        laboratory frame.
 +
 +
  parameters.needs  - a cell array of strings specifying additional
 +
                      information required by the sequence:
 +
 +
                       'zeeman_op' - Zeeman part of the Hamiltonian
 +
                       in the laboratory frame, to be placed into
 +
                      parameters.hseeman and sent to pulse sequence
 +
 +
                       'aniso_eq' - thermal equilibrium is recomputed
 +
                      using the full anisotropic Hamiltonian at the
 +
                      current orientation, and sent to the pulse
 +
                       sequence in parameters.aniso_eq subfield
 +
 +
  parameters.sum_up  - when set to 1 (default), returns the
 +
                        powder average. When set to 0, returns
 +
                        individual answers for each point in  
 +
                        the powder as a cell array.
  
 +
  parameters.*      - additional subfields may be required by your
 +
                        pulse sequence - check its documentation page
 +
 
     assumptions    -  context-specific assumptions ('nmr', 'epr',
 
     assumptions    -  context-specific assumptions ('nmr', 'epr',
 
                       'labframe', etc.) - see the pulse sequence
 
                       'labframe', etc.) - see the pulse sequence
 
                       header for information on this setting.
 
                       header for information on this setting.
 +
==Outputs==
 +
This function returns a powder average of whatever it is that the pulse sequence returns. If a structure is returned by the pulse sequence, the structures are powder averaged field-by-field.
 +
 +
==Examples==
 +
There are over 100 examples using this context in the example set. The following cases are representative:
 +
 +
'''dnp_solids/crosspol_powder_static_1.m''' - electron-nuclear cross-polarisation DNP
 +
 +
'''esr_solids/hyscore_nitroxide_powder.m''' - HYSCORE spectrum of a nitroxide radical
 +
 +
'''giant_spin/triple_dy_eqmag_temp.m''' - temperature dependence of equilibrium magnetisation in a dysprosium cluster
 +
 +
'''nmr_solids/cp_powder_match_3.m''' - Hartmann-Hahn matching condition under MAS
 +
 +
==Notes==
 +
# 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==
 +
[[crystal.m]], [[liquid.m]], [[roadmap.m]], [[singlerot.m]], [[doublerot.m]], [[imaging.m]], [[gridfree.m]], [[floquet.m]]
 +
  
This function returns a powder average of whatever it is that the pul-
+
''Version 2.2, authors: [[Ilya Kuprov]], [[Luke Edwards]]''
se sequence returns. If a structure is returned by the pulse sequence,
 
the structures are powder averaged field-by-field.
 

Revision as of 13:51, 9 July 2018

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 additional
                      information required by the sequence:

                      'zeeman_op' - Zeeman part of the Hamiltonian
                      in the laboratory frame, to be placed into
                      parameters.hseeman and sent to pulse sequence

                      'aniso_eq' - thermal equilibrium is recomputed 
                      using the full anisotropic Hamiltonian at the
                      current orientation, and sent to the pulse 
                      sequence in parameters.aniso_eq subfield

  parameters.sum_up   - when set to 1 (default), returns the
                        powder average. When set to 0, returns
                        individual answers for each point in 
                        the powder as a cell array.
  parameters.*       - additional subfields may be required by your
                       pulse sequence - check its documentation 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 structure is returned by the pulse sequence, the structures are powder averaged field-by-field.

Examples

There are over 100 examples using this context in the example set. The following cases are representative:

dnp_solids/crosspol_powder_static_1.m - electron-nuclear cross-polarisation DNP

esr_solids/hyscore_nitroxide_powder.m - HYSCORE spectrum of a nitroxide radical

giant_spin/triple_dy_eqmag_temp.m - temperature dependence of equilibrium magnetisation in a dysprosium cluster

nmr_solids/cp_powder_match_3.m - Hartmann-Hahn matching condition under MAS

Notes

  1. Arbitrary order rotating frame transformation is supported, including infinite order. See the header of rotframe.m for further information.
  2. The function supports parallel processing via Matlab's Distributed Computing Toolbox - different system orientations are evaluated on different labs.

See also

crystal.m, liquid.m, roadmap.m, singlerot.m, doublerot.m, imaging.m, gridfree.m, floquet.m


Version 2.2, authors: Ilya Kuprov, Luke Edwards