# Copyright (c) 2002 Peter Guntert. All rights reserved. ## 7MACROS: phase - apply constant and linear phase correction ## ## Usage: phase [] ## ## "phase" is a standard macro that applies a constant phase correction ## and, if present, a linear phase correction to the complex ## data, i.e. the data point k (k = 1,...,n) will be multiplied by ## exp(-i*(p0+p1/(n-1)*(k-1)). The values of and are in ## degrees. It is also possible (and in general more efficient) to ## include the phase correction in the Fourier transformation. ## ## See also: autophase, ft, multiply if (nparam.lt.1 .or. nparam.gt.2) \ error "*** Error: Illegal number of parameters." eval p1=p1*pi/180.0 if (nparam.eq.1) then multiply exp(-cmplx(0.0,p1)) else if (nparam.eq.2) then eval p2=p2*pi/180.0/n multiply exp(-cmplx(0.0,p1+p2*(k-1))) end if