Difference between revisions of "Meshflow.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Sync syntax/arguments/outputs with current Spinach source)
(Restore pre-bulk-edit wiki content)
Line 1: Line 1:
 
{{DISPLAYTITLE:meshflow.m}} __NOTOC__
 
{{DISPLAYTITLE:meshflow.m}} __NOTOC__
 
 
First draft of the magnetohydrodynamics context for microfluidic simulations. Generates evolution generators and passes them on to the pulse sequence function, which should be supplied as a handle.
 
First draft of the magnetohydrodynamics context for microfluidic simulations. Generates evolution generators and passes them on to the pulse sequence function, which should be supplied as a handle.
  
 
==Syntax==
 
==Syntax==
  
answer=meshflow(spin_system,pulse_sequence,parameters)
+
    answer=meshflow(spin_system,pulse_sequence,parameters)
  
 
==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.
 +
 +
The following phantoms must be specified: hamiltonian, relaxation, kinetics, initial condition, detection state. Operator phantoms must be specified in the following way:
  
The following phantoms must be specified: hamiltonian, relaxation, ki-
+
                parameters.R_ph={Ph1,Ph2,...,PhN}
netics, initial condition, detection state. Operator phantoms must be
+
                parameters.R_op={R1,R2,...,RN}
specified in the following way:
 
  
                  parameters.R_ph={Ph1,Ph2,...,PhN}
+
where PhN have the same dimension as the sample voxel grid and RN are relaxation superoperators. Likewise for the following:
                  parameters.R_op={R1,R2,...,RN}
 
  
where PhN have the same dimension as the sample voxel grid and RN are
+
                parameters.K_ph, parameters.K_op
relaxation superoperators. Likewise for the following:
+
                parameters.H_ph, parameters.H_op
  
                  parameters.K_ph, parameters.K_op
+
The initial condition phantom reflects the fact that different voxels might start off in a different spin state. It must be specified in the following way:
                  parameters.H_ph, parameters.H_op
 
 
 
The initial condition phantom reflects the fact that different voxels
 
might start off in a different spin state. It must be specified in the
 
following way:
 
  
 
                 parameters.rho0_ph={Ph1,Ph2,...,PhN}
 
                 parameters.rho0_ph={Ph1,Ph2,...,PhN}
 
                 parameters.rho0_op={rho1,rho2,...,rhoN}
 
                 parameters.rho0_op={rho1,rho2,...,rhoN}
  
where PhN have the same dimension as the sample voxel grid and rhoN are
+
where PhN have the same dimension as the sample voxel grid and rhoN are spin states obtained from state() function.
spin states obtained from state() function.
 
  
The detection state phantom reflects the fact that different voxels mi-
+
The detection state phantom reflects the fact that different voxels might be detected at different angles and with different sensitivity. It must be specified in the following way:
ght be detected at different angles and with different sensitivity. It
 
must be specified in the following way:
 
  
 
                 parameters.coil_ph={Ph1,Ph2,...,PhN}
 
                 parameters.coil_ph={Ph1,Ph2,...,PhN}
 
                 parameters.coil_op={rho1,rho2,...,rhoN}
 
                 parameters.coil_op={rho1,rho2,...,rhoN}
  
where PhN have the same dimension as the sample voxel grid and rhoN are
+
where PhN have the same dimension as the sample voxel grid and rhoN are spin states obtained from state() function.
spin states obtained from state() function.
 
  
 
   parameters.*      - additional subfields may be required by your
 
   parameters.*      - additional subfields may be required by your
Line 54: Line 44:
  
 
==See also==
 
==See also==
 
 
[[Kernel contexts]]
 
[[Kernel contexts]]
  
  
 
''Version 2.8, authors: [[Anupama Acharya]], [[Ilya Kuprov]]''
 
''Version 2.8, authors: [[Anupama Acharya]], [[Ilya Kuprov]]''

Revision as of 15:49, 5 April 2026

First draft of the magnetohydrodynamics context for microfluidic simulations. Generates evolution generators and passes them on to the pulse sequence function, which should be supplied as a handle.

Syntax

    answer=meshflow(spin_system,pulse_sequence,parameters)

Arguments

 pulse_sequence     - pulse sequence function handle. See the
                      experiments directory for the list of
                      pulse sequences that ship with Spinach.

The following phantoms must be specified: hamiltonian, relaxation, kinetics, initial condition, detection state. Operator phantoms must be specified in the following way:

                parameters.R_ph={Ph1,Ph2,...,PhN}
                parameters.R_op={R1,R2,...,RN}

where PhN have the same dimension as the sample voxel grid and RN are relaxation superoperators. Likewise for the following:

                parameters.K_ph, parameters.K_op
                parameters.H_ph, parameters.H_op

The initial condition phantom reflects the fact that different voxels might start off in a different spin state. It must be specified in the following way:

                parameters.rho0_ph={Ph1,Ph2,...,PhN}
                parameters.rho0_op={rho1,rho2,...,rhoN}

where PhN have the same dimension as the sample voxel grid and rhoN are spin states obtained from state() function.

The detection state phantom reflects the fact that different voxels might be detected at different angles and with different sensitivity. It must be specified in the following way:

                parameters.coil_ph={Ph1,Ph2,...,PhN}
                parameters.coil_op={rho1,rho2,...,rhoN}

where PhN have the same dimension as the sample voxel grid and rhoN are spin states obtained from state() function.

 parameters.*       - additional subfields may be required by your
                      pulse sequence - check its documentation page

Outputs

This function returns whatever the pulse sequence returns.

See also

Kernel contexts


Version 2.8, authors: Anupama Acharya, Ilya Kuprov