Difference between revisions of "G2fplanck.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Sync syntax/arguments/outputs with current Spinach source)
Line 1: Line 1:
{{DISPLAYTITLE:g2fplanck.m}}
+
{{DISPLAYTITLE:g2fplanck.m}} __NOTOC__
 +
 
 
Returns magnetic field gradient operators within the Fokker-Planck formalism used in the imaging module of ''Spinach''.
 
Returns magnetic field gradient operators within the Fokker-Planck formalism used in the imaging module of ''Spinach''.
  
 
==Syntax==
 
==Syntax==
  
    G=g2fplanck(spin_system,parameters)
+
G=g2fplanck(spin_system,parameters)
 
 
==Description==
 
The cell array contains {Gx,Gy,Gz}, which should simply be added to the Hamiltonian with appropriate coefficients. Gradients are assumed to be linear and centered on the middle of the sample.
 
  
 
==Arguments==
 
==Arguments==
  
  parameters.dims    - a vector with one, two or three  
+
parameters.dims    - a vector with one, two or three  
 
                         elements giving the dimensions
 
                         elements giving the dimensions
 
                         of the box, metres
 
                         of the box, metres
Line 21: Line 19:
 
==Outputs==
 
==Outputs==
  
  G - a cell array with the three gradient operators  
+
G - a cell array with the three gradient operators
 
       ordered as {Gx,Gy,Gz}, normalised to 1 T/m, empty
 
       ordered as {Gx,Gy,Gz}, normalised to 1 T/m, empty
 
       matrices for non-exitent dimensions
 
       matrices for non-exitent dimensions
 +
 +
Note: gradients are assumed to be linear and centered on the
 +
      middle of the sample.
 +
 +
Note: the direct product order is Z(x)Y(x)X(x)Spin, this cor-
 +
      responds to a column-wise vectorization of a 3D array
 +
      with dimensions ordered as [X Y Z].
 +
 +
Note: polyadic objects are returned, use inflate() to get the
 +
      corresponding sparse matrix.
 +
 +
a.j.allami@soton.ac.uk
 +
ilya.kuprov@weizmann.ac.il
 +
mariagrazia.concilio@sjtu.edu.cn
  
 
==Notes==
 
==Notes==
 +
 
1. The direct product order is Z(x)Y(x)X(x)Spin, this corresponds to a column-wise vectorization of a 3D array with dimensions ordered as [X Y Z].
 
1. The direct product order is Z(x)Y(x)X(x)Spin, this corresponds to a column-wise vectorization of a 3D array with dimensions ordered as [X Y Z].
  
Line 31: Line 44:
  
 
==See also==
 
==See also==
 +
 
[[v2fplanck.m]], [[hydrodynamics.m]], [[imaging.m]]
 
[[v2fplanck.m]], [[hydrodynamics.m]], [[imaging.m]]
  
  
 
''Version 2.1, authors: [[Ilya Kuprov]], [[Ahmed Allami]]''
 
''Version 2.1, authors: [[Ilya Kuprov]], [[Ahmed Allami]]''
 +
 +
==Description==
 +
 +
The cell array contains {Gx,Gy,Gz}, which should simply be added to the Hamiltonian with appropriate coefficients. Gradients are assumed to be linear and centered on the middle of the sample.

Revision as of 15:05, 5 April 2026


Returns magnetic field gradient operators within the Fokker-Planck formalism used in the imaging module of Spinach.

Syntax

G=g2fplanck(spin_system,parameters)

Arguments

parameters.dims - a vector with one, two or three

                       elements giving the dimensions
                       of the box, metres

  parameters.npts    - a vector with one, two or three
                       elements giving number of points
                       in each dimension of the box

Outputs

G - a cell array with the three gradient operators

      ordered as {Gx,Gy,Gz}, normalised to 1 T/m, empty
      matrices for non-exitent dimensions
Note: gradients are assumed to be linear and centered on the
      middle of the sample.
Note: the direct product order is Z(x)Y(x)X(x)Spin, this cor-
      responds to a column-wise vectorization of a 3D array
      with dimensions ordered as [X Y Z].
Note: polyadic objects are returned, use inflate() to get the
      corresponding sparse matrix.
a.j.allami@soton.ac.uk
ilya.kuprov@weizmann.ac.il
mariagrazia.concilio@sjtu.edu.cn

Notes

1. The direct product order is Z(x)Y(x)X(x)Spin, this corresponds to a column-wise vectorization of a 3D array with dimensions ordered as [X Y Z].

2. Polyadic objects are returned, use polyadic/inflate.m to get the corresponding sparse matrix.

See also

v2fplanck.m, hydrodynamics.m, imaging.m


Version 2.1, authors: Ilya Kuprov, Ahmed Allami

Description

The cell array contains {Gx,Gy,Gz}, which should simply be added to the Hamiltonian with appropriate coefficients. Gradients are assumed to be linear and centered on the middle of the sample.