Difference between revisions of "Dnp field scan.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Created page with "Magnetic field scan DNP experiment. Returns the equilibrium magnetization of all spins as a function of magnetic field. Syntax: answer=dnp_field_scan(spin_system,paramet...")
 
Line 1: Line 1:
−
Magnetic field scan DNP experiment. Returns the equilibrium
+
Magnetic field scan DNP experiment.  
−
magnetization of all spins as a function of magnetic field.
+
 
−
Syntax:
+
==Description==
 +
Returns the equilibrium population of the user-specified state as a function of magnetic field.
 +
 
 +
==Syntax==
  
 
     answer=dnp_field_scan(spin_system,parameters,H,R,K)
 
     answer=dnp_field_scan(spin_system,parameters,H,R,K)
  
−
where H is the Hamiltonian commutation superoperator, R is
+
This function should normally be called via [[powder.m]] or [[crystal.m]] wrapper.
−
the relaxation superoperator and K is the chemical kinetics
+
 
−
superoperator. The following parameters are required:
+
==Arguments==
 +
 
 +
    parameters.mw_pwr      -  microwave power, Hz
 +
 +
    parameters.mw_frq      -  microwave frequency, Hz
 +
 +
    parameters.fields      -  a vector of B0 field values, T
 +
 +
    parameters.rho_eq      -  thermal equilibrium state
 +
 +
    parameters.coil        -  detection state vector or a horizon-
 +
                                tal stack thereof
 +
 +
    parameters.mw_oper    -  microwave irradiation operator
 +
 +
    parameters.ez_oper    -  Lz operator on the electrons
 +
 +
    parameters.method      -  'backslash' to use Matlab's
 +
                                linear equation solver, 'gmres'
 +
                                to use ILU preconditioned GMRES
 +
 
 +
    H                      -  Hamiltonian commutation superoperator
  
−
  parameters.mw_pwr     -  microwave power, Hz
+
     R                      -  relaxation superoperator
 +
 +
    K                      -  chemical kinetics superoperator
  
−
  parameters.mw_frq      -  microwave frequency, Hz
+
==Returns==
  
−
  parameters.fields     -  a vector of magnetic field off-
+
     answer                -  the projection of the equilibrium density matrix
−
                              sets from the B0 field, T
+
                                on the user-specified state as a function of the
 +
                                applied magnetic field
  
−
  parameters.rho_eq      -  equilibrium state at B0
+
==Examples==
 +
The following figure is returned by cross_effect_field_scan_1.m example file in examples/dnp_solids directory:
  
−
  parameters.coil        -  coil state vector or a horizon-
+
[[File:dnp_example_1.png]]
−
                              tal stack thereof
 
  
−
  parameters.mw_oper    -  microwave irradiation operator
+
==Notes==
 +
# The relaxation superoperator supplied to this function should NOT be thermalized.
 +
# Thermal equilibrium state is assumed to be the same at all fields in the sweep. Do not use this function for broad magnetic field sweep experiments.
 +
# Backslash method is recommended for small spin systems and GMRES method for large ones.
 +
# This function can be made to run on GPUs. If you would like that functionality added, send an email to [[Ilya Kuprov]].
  
−
  parameters.ez_oper    -  Lz operator on the electrons
+
==See also==
 +
[[dnp_freq_scan.m]],[[masdnp.m]],[[solid_effect.m]]
  
−
  parameters.method      -  'backslash' to use Matlab's
 
−
                              linear equation solver, 'gmres'
 
−
                              to use ILU preconditioned GMRES
 
−
 
−
Note: the relaxation superoperator should NOT be thermalized
 
−
for this type of calculation.
 
  
−
Note: thermal equilibrium state is assumed to be the same at
+
''Revision 3284, authors: [[Ilya Kuprov]]''
−
all fields in the sweep - do not use with broad magnetic field sweep experiments.
 

Revision as of 15:16, 15 August 2016

Magnetic field scan DNP experiment.

Description

Returns the equilibrium population of the user-specified state as a function of magnetic field.

Syntax

    answer=dnp_field_scan(spin_system,parameters,H,R,K)

This function should normally be called via powder.m or crystal.m wrapper.

Arguments

    parameters.mw_pwr      -   microwave power, Hz

    parameters.mw_frq      -   microwave frequency, Hz

    parameters.fields      -   a vector of B0 field values, T

    parameters.rho_eq      -   thermal equilibrium state

    parameters.coil        -   detection state vector or a horizon-
                               tal stack thereof

    parameters.mw_oper     -   microwave irradiation operator

    parameters.ez_oper     -   Lz operator on the electrons

    parameters.method      -   'backslash' to use Matlab's
                               linear equation solver, 'gmres'
                               to use ILU preconditioned GMRES
    H                      -   Hamiltonian commutation superoperator
    R                      -   relaxation superoperator 

    K                      -   chemical kinetics superoperator

Returns

    answer                 -   the projection of the equilibrium density matrix 
                               on the user-specified state as a function of the
                               applied magnetic field

Examples

The following figure is returned by cross_effect_field_scan_1.m example file in examples/dnp_solids directory:

Dnp example 1.png

Notes

  1. The relaxation superoperator supplied to this function should NOT be thermalized.
  2. Thermal equilibrium state is assumed to be the same at all fields in the sweep. Do not use this function for broad magnetic field sweep experiments.
  3. Backslash method is recommended for small spin systems and GMRES method for large ones.
  4. This function can be made to run on GPUs. If you would like that functionality added, send an email to Ilya Kuprov.

See also

dnp_freq_scan.m,masdnp.m,solid_effect.m


Revision 3284, authors: Ilya Kuprov