Difference between revisions of "Contspacing.m"
(Created page with "{{DISPLAYTITLE:contspacing.m}} __NOTOC__ Non-linear adaptive contour spacing. Useful for NMR data where small cross-peaks must be adequately contoured next to large diagonal p...") |
(Normalise sequential blank lines) |
||
| Line 35: | Line 35: | ||
neg_conts - negative contour levels, a row vector | neg_conts - negative contour levels, a row vector | ||
| − | |||
==Notes== | ==Notes== | ||
| Line 45: | Line 44: | ||
==See also== | ==See also== | ||
[[Kernel_utilities#Data_analysis_and_plotting|Data analysis and plotting]] | [[Kernel_utilities#Data_analysis_and_plotting|Data analysis and plotting]] | ||
| − | |||
''Version 2.9, authors: [[Ilya Kuprov]]'' | ''Version 2.9, authors: [[Ilya Kuprov]]'' | ||
Revision as of 12:24, 25 April 2026
Non-linear adaptive contour spacing. Useful for NMR data where small cross-peaks must be adequately contoured next to large diagonal peaks.
Syntax
[all_conts,pos_conts,neg_conts]=contspacing(smax,smin,delta,k,signs,ncont)
Arguments
smax - global maximum intensity in the spectrum
smin - global minimum intensity in the spectrum
delta - minimum and maximum elevation (as a fraction of the
total intensity) of the contours 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 conto-
urs and the second pair to the negative ones.
k - a coefficient that controls the curvature of the contour
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 contours to be returned.
ncont - the number of contours, a reasonable value is 20
Outputs
all_conts - all contour levels, a row vector
pos_conts - positive contour levels, a row vector
neg_conts - negative contour levels, a row vector
Notes
The following functions are used to get contour levels
pos_conts=delta(2)*smax*linspace(0,1,ncont).^k+smax*delta(1); neg_conts=delta(2)*smin*linspace(0,1,ncont).^k+smin*delta(1);
See also
Version 2.9, authors: Ilya Kuprov