Difference between revisions of "Apodisation.m"
(Normalise sequential blank lines) |
m (Normalise preformatted blank lines in function documentation blocks) |
||
| Line 17: | Line 17: | ||
a 2D FID, a 3D matrix with the time origin located at | a 2D FID, a 3D matrix with the time origin located at | ||
the (1,1,1) corner point in the case of a 3D FID, etc. | the (1,1,1) corner point in the case of a 3D FID, etc. | ||
| − | + | ||
winfuns - a cell array of window function specifications for each | winfuns - a cell array of window function specifications for each | ||
dimension of the FID in the format {{spec},{spec},...}, | dimension of the FID in the format {{spec},{spec},...}, | ||
omitting singleton dimensions. The following specifica- | omitting singleton dimensions. The following specifica- | ||
tions are supported: | tions are supported: | ||
| − | + | ||
{} - do nothing in this dimension | {} - do nothing in this dimension | ||
| − | + | ||
{'none'} - no window function, but divide the first | {'none'} - no window function, but divide the first | ||
point by 2 to satisfy the Fourier trans- | point by 2 to satisfy the Fourier trans- | ||
form symmetry requirement | form symmetry requirement | ||
| − | + | ||
{'crisp'} - multiplied by cos(x)^8 half-bell. First | {'crisp'} - multiplied by cos(x)^8 half-bell. First | ||
point has x=0, last point has x=pi/2. | point has x=0, last point has x=pi/2. | ||
| − | + | ||
{'exp',k} - multiplied by exp(-k*x). First point has | {'exp',k} - multiplied by exp(-k*x). First point has | ||
x=0, last point has x=1. | x=0, last point has x=1. | ||
| − | + | ||
{'gauss',k} - multiplied by exp(-k*(x.^2)). First point | {'gauss',k} - multiplied by exp(-k*(x.^2)). First point | ||
has x=0, last point has x=1. | has x=0, last point has x=1. | ||
| − | + | ||
{'cos'} - multiplied by cos(x) half-bell. First po- | {'cos'} - multiplied by cos(x) half-bell. First po- | ||
int has x=0, last point has x=pi/2. | int has x=0, last point has x=pi/2. | ||
| − | + | ||
{'sin'} - multiplied by sin(x) full bell. First po- | {'sin'} - multiplied by sin(x) full bell. First po- | ||
int has x=0, last point has x=pi. | int has x=0, last point has x=pi. | ||
| − | + | ||
{'sqcos'} - multiplied by cos(x).^2 half-bell. First | {'sqcos'} - multiplied by cos(x).^2 half-bell. First | ||
point has x=0, last point has x=pi/2. | point has x=0, last point has x=pi/2. | ||
| − | + | ||
{'sqsin'} - multiplied by sin(x).^2 full bell. First | {'sqsin'} - multiplied by sin(x).^2 full bell. First | ||
point has x=0, last point has x=pi. | point has x=0, last point has x=pi. | ||
| − | + | ||
{'kaiser',k} - multiplied by a Kaiser function with the | {'kaiser',k} - multiplied by a Kaiser function with the | ||
side lobe attenuation factor k. The peak | side lobe attenuation factor k. The peak | ||
of the Kaiser function is in the middle | of the Kaiser function is in the middle | ||
of the FID. | of the FID. | ||
| − | + | ||
{'bad-z1',k} - emulation of a misset Z1 shim, k is a di- | {'bad-z1',k} - emulation of a misset Z1 shim, k is a di- | ||
mensionless constant proportional to the | mensionless constant proportional to the | ||
shim current, a good guess for 1H NMR at | shim current, a good guess for 1H NMR at | ||
600 MHz is 10. | 600 MHz is 10. | ||
| − | + | ||
{'bad-z2',k} - emulation of a misset Z2 shim, k is a di- | {'bad-z2',k} - emulation of a misset Z2 shim, k is a di- | ||
mensionless constant proportional to the | mensionless constant proportional to the | ||
shim current, a good guess for 1H NMR at | shim current, a good guess for 1H NMR at | ||
600 MHz is 40. | 600 MHz is 40. | ||
| − | + | ||
fp_half - set to false() to disable dividing of the first points | fp_half - set to false() to disable dividing of the first points | ||
by 2, this is needed when multiple window functions are | by 2, this is needed when multiple window functions are | ||
Revision as of 17:40, 5 June 2026
Performs free induction decay apodisation. Supports free induction decays
of any dimension. To satisfy Fourier transform symmetry requirements, the
first elements of the FID in each dimension are divided by 2, except for
singleton dimensions and those the user designates inactive.
Syntax
fid=apodisation(spin_system,fid,winfuns,fp_half)
Arguments
fid - the free induction decay. The function expects a column
vector in the case of 1D FID, a 2D matrix with the time
origin located at the (1,1) corner point in the case of
a 2D FID, a 3D matrix with the time origin located at
the (1,1,1) corner point in the case of a 3D FID, etc.
winfuns - a cell array of window function specifications for each
dimension of the FID in the format {{spec},{spec},...},
omitting singleton dimensions. The following specifica-
tions are supported:
{} - do nothing in this dimension
{'none'} - no window function, but divide the first
point by 2 to satisfy the Fourier trans-
form symmetry requirement
{'crisp'} - multiplied by cos(x)^8 half-bell. First
point has x=0, last point has x=pi/2.
{'exp',k} - multiplied by exp(-k*x). First point has
x=0, last point has x=1.
{'gauss',k} - multiplied by exp(-k*(x.^2)). First point
has x=0, last point has x=1.
{'cos'} - multiplied by cos(x) half-bell. First po-
int has x=0, last point has x=pi/2.
{'sin'} - multiplied by sin(x) full bell. First po-
int has x=0, last point has x=pi.
{'sqcos'} - multiplied by cos(x).^2 half-bell. First
point has x=0, last point has x=pi/2.
{'sqsin'} - multiplied by sin(x).^2 full bell. First
point has x=0, last point has x=pi.
{'kaiser',k} - multiplied by a Kaiser function with the
side lobe attenuation factor k. The peak
of the Kaiser function is in the middle
of the FID.
{'bad-z1',k} - emulation of a misset Z1 shim, k is a di-
mensionless constant proportional to the
shim current, a good guess for 1H NMR at
600 MHz is 10.
{'bad-z2',k} - emulation of a misset Z2 shim, k is a di-
mensionless constant proportional to the
shim current, a good guess for 1H NMR at
600 MHz is 40.
fp_half - set to false() to disable dividing of the first points
by 2, this is needed when multiple window functions are
applied to the same dimension one after another
Outputs
fid - apodised free induction decay
See also
Version 2.11, authors: Ilya Kuprov