Difference between revisions of "V2fplanck.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Sync syntax/arguments/outputs with current Spinach source)
(Update function See also links and function index membership)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:v2fplanck.m}} __NOTOC__
 
{{DISPLAYTITLE:v2fplanck.m}} __NOTOC__
 
+
Translates a stationary 3D velocity field and diffusion-tensor field into a Fokker-Planck evolution generator; see IK's review (http://dx.doi.org/10.1016/j.jmr.2016.07.005) for the construction of the generator, and this function builds the M matrix in Equation 7.
Translates a stationary 3D velocity field and a diffusion tensor field into a Fokker-Planck evolution generator.
 
  
 
==Syntax==
 
==Syntax==
  
F=v2fplanck(spin_system,parameters)
+
    F=v2fplanck(spin_system,parameters)
  
==Arguments==
+
==Parameters==
  
parameters.u      - X components of the velocity vectors
+
  parameters.u      - X components of the velocity vectors
 
                         for each voxel in the sample, m/s
 
                         for each voxel in the sample, m/s
 
   
 
   
Line 40: Line 39:
 
==Outputs==
 
==Outputs==
  
F - spatial dynamics generator
+
    F - spatial dynamics generator
 
 
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
 
  
 
==Examples==
 
==Examples==
 
 
See examples/imaging and examples/nmr_diffusion directories in the example set.
 
See examples/imaging and examples/nmr_diffusion directories in the example set.
  
 
==Notes==
 
==Notes==
 
 
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].
 
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 63: Line 50:
  
 
==See also==
 
==See also==
 
+
[[imaging.m]], [[hydrodynamics.m]], [[fourdif.m]], [[fdmat.m]], [[polyadic.m]], [[polyadic/inflate.m]], [[g2fplanck.m]], [[mri_2d_plot.m]], [[ngridpts.m]], [[phantoms.m]], [[Imaging_module]]
[[imaging.m]], [[hydrodynamics.m]], [[fourdif.m]], [[fdmat.m]], [[polyadic.m]]
 
 
 
  
 
''Version 2.1, authors: [[Ilya Kuprov]], [[Ahmed Allami]]''
 
''Version 2.1, authors: [[Ilya Kuprov]], [[Ahmed Allami]]''
 
==Description==
 
 
See IK's review of the subject (http://dx.doi.org/10.1016/j.jmr.2016.07.005) for a detailed description of how the Fokker-Planck spatial dynamics generator is built. This function builds the M matrix in Equation 7.
 

Latest revision as of 19:43, 6 June 2026

Translates a stationary 3D velocity field and diffusion-tensor field into a Fokker-Planck evolution generator; see IK's review (http://dx.doi.org/10.1016/j.jmr.2016.07.005) for the construction of the generator, and this function builds the M matrix in Equation 7.

Syntax

    F=v2fplanck(spin_system,parameters)

Parameters

  parameters.u       - X components of the velocity vectors
                       for each voxel in the sample, m/s

  parameters.v       - Y components of the velocity vectors
                       for each voxel in the sample, m/s

  parameters.w       - Z components of the velocity vectors
                       for each voxel in the sample, m/s

  parameters.diff    - diffusion coefficient or 3x3 tensor, m^2/s
                       for situations when this parameter is the 
                       same in every voxel

  parameters.dxx     - Cartesian components of the diffusion
  parameters.dxy       tensor for each voxel of the sample
       ...
  parameters.dzz

  parameters.dims    - dimensions of the 3D box, meters

  parameters.npts    - number of points in each dimension
                       of the 3D box

  parameters.deriv   - {'fourier'} uses Fourier diffe-
                       rentiation matrices; {'period',n}
                       requests n-point central finite-
                       difference matrices with periodic
                       boundary conditions

Outputs

    F - spatial dynamics generator

Examples

See examples/imaging and examples/nmr_diffusion directories in the example set.

Notes

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].

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

See also

imaging.m, hydrodynamics.m, fourdif.m, fdmat.m, polyadic.m, polyadic/inflate.m, g2fplanck.m, mri_2d_plot.m, ngridpts.m, phantoms.m, Imaging_module

Version 2.1, authors: Ilya Kuprov, Ahmed Allami