Difference between revisions of "Plot 3d.m"

From Spinach Documentation Wiki
Jump to: navigation, search
 
Line 1: Line 1:
−
Volume isosurface plotting utility with non-linear adaptive isosurface
+
{{DISPLAYTITLE:plot_3d.m}} __NOTOC__
−
spacing.The function is useful for NMR data where small cross-peaks
+
Volume isosurface plotting utility with non-linear adaptive surface spacing. The function plots the 3D volume and the three projections onto the coordinate planes.
−
must be adequately contoured next to large diagonal peaks. Syntax:
 
  
−
    plot_3d(spin_system,spectrum,parameters,ncont,delta,k,signs)
+
==Syntax==
  
−
The following functions are used to compute contour levels:
+
    plot_3d(spin_system,spectrum,parameters,nsurf,delta,k,signs)
  
−
  cont_levs_pos=delta(2)*xmax*linspace(0,1,ncont).^k+xmax*delta(1);
+
==Arguments==
−
  cont_levs_neg=delta(2)*xmin*linspace(0,1,ncont).^k+xmin*delta(1);
 
  
−
where:
+
    spectrum    - a real cube containing the 3D NMR spectrum
 +
 +
    parameters.sweep      -  three sweep widths, Hz
 +
 +
    parameters.spins      -  cell array with three character
 +
                              strings specifying the working
 +
                              spins.
 +
 +
    parameters.offset      -  three transmitter offsets, Hz
 +
 +
    parameters.axis_units  -  axis units ('ppm','Hz','Gauss')
 +
 +
    nsurf    - the number of surfaces, a reasonable value is 20
 +
 +
    delta    - minimum and maximum elevation (as a fraction of the
 +
                total intensity) of the surfaces above the baseline.
 +
                A good starting value is [0.02 0.2 0.02 0.2]. The
 +
                first pair of numbers refers to the positive surfa-
 +
                ces and the second pair to the negative ones.
 +
 +
    k    - a coefficient that controls the curvature of the surface
 +
            spacing function: k=1 corresponds to linear spacing and
 +
            k>1 bends the spacing curve to increase the sampling den-
 +
            sity near the baseline. A reasonable value is 2.
 +
 +
    signs  - can be set to 'positive', 'negative' or 'both' - this
 +
              will cause the corresponding surfaces to be plotted.
  
−
    * xmax and xmin are calculated from the spectrum;
 
  
−
    * delta is the minimum and maximum elevation (as a fraction of total
+
==Outputs==
−
      intensity) of the contours above the baseline. A reasonable value
 
−
      for most 3D spectra is [0.02 0.2];
 
  
−
    * ncont is the number of contours, a reasonable value is 20.
+
    this function creates a figure
  
−
    * k controls the curvature of the contour spacing function: k=1
+
==Notes==
−
      corresponds to linear spacing and k>1 bends the spacing curve to
+
The following functions are used to compute surface levels:
−
      increase the sampling density near the baseline. A reasonable
 
−
      value is 2;
 
  
−
    * signs can be set to 'positive', 'negative' or 'both' - this will
+
  cont_levs_pos=delta(2)*smax*linspace(0,1,ncont).^k+smax*delta(1);
−
      cause the corresponding contours to be plotted.
+
  cont_levs_neg=delta(2)*smin*linspace(0,1,ncont).^k+smin*delta(1);
  
−
The following subfields are required inthe parameters structure:
+
where smin and smax are computed from the spectrum cube.
  
−
    parameters.sweep              three widths, Hz
+
==See also==
 +
[[plot_1d.m]], [[plot_2d.m]], [[volplot.m]], [[molplot.m]], [[mri_2d_plot.m]], [[slice_2d.m]]
  
−
    parameters.spins              cell array with three character
 
−
                                  strings specifying the working
 
−
                                  spins.
 
  
−
    parameters.offset            three transmitter offsets, Hz
+
''Version 2.3, authors: [[Ilya Kuprov]]''
−
 
 
−
    parameters.axis_units        axis units ('ppm','Hz','Gauss')
 

Revision as of 20:24, 28 December 2018

Volume isosurface plotting utility with non-linear adaptive surface spacing. The function plots the 3D volume and the three projections onto the coordinate planes.

Syntax

    plot_3d(spin_system,spectrum,parameters,nsurf,delta,k,signs)

Arguments

    spectrum     - a real cube containing the 3D NMR spectrum

    parameters.sweep       -  three sweep widths, Hz

    parameters.spins       -  cell array with three character
                              strings specifying the working 
                              spins.

    parameters.offset      -  three transmitter offsets, Hz

    parameters.axis_units  -  axis units ('ppm','Hz','Gauss')

    nsurf     - the number of surfaces, a reasonable value is 20

    delta     - minimum and maximum elevation (as a fraction of the
                total intensity) of the surfaces above the baseline.
                A good starting value is [0.02 0.2 0.02 0.2]. The
                first pair of numbers refers to the positive surfa-
                ces and the second pair to the negative ones.

    k    - a coefficient that controls the curvature of the surface
           spacing function: k=1 corresponds to linear spacing and
           k>1 bends the spacing curve to increase the sampling den-
           sity near the baseline. A reasonable value is 2.

    signs   - can be set to 'positive', 'negative' or 'both' - this
              will cause the corresponding surfaces to be plotted.


Outputs

    this function creates a figure

Notes

The following functions are used to compute surface levels:

 cont_levs_pos=delta(2)*smax*linspace(0,1,ncont).^k+smax*delta(1);
 cont_levs_neg=delta(2)*smin*linspace(0,1,ncont).^k+smin*delta(1);

where smin and smax are computed from the spectrum cube.

See also

plot_1d.m, plot_2d.m, volplot.m, molplot.m, mri_2d_plot.m, slice_2d.m


Version 2.3, authors: Ilya Kuprov