Difference between revisions of "Contspacing.m"
(Normalise sequential blank lines) |
m (Rename Arguments section heading to Parameters) |
||
| Line 6: | Line 6: | ||
[all_conts,pos_conts,neg_conts]=contspacing(smax,smin,delta,k,signs,ncont) | [all_conts,pos_conts,neg_conts]=contspacing(smax,smin,delta,k,signs,ncont) | ||
| − | == | + | ==Parameters== |
smax - global maximum intensity in the spectrum | smax - global maximum intensity in the spectrum | ||
Revision as of 18:47, 5 June 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)
Parameters
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