thesis ...
"Phase-Only Optical Information Processing"
University of Edinburgh, Duncansapien, 1992.
Index Chapter 1 2 3 4 5 6 7 8 9 (Edinburgh Research Archive version)
Appendix F: Scaling of Image Data
With reference to chapter three,
it is required to compare the shape of the object phase, stored as
OBJ(K), with the shape of the image intensity, stored as IMAGE(K). The
mean of the OBJ(K) is zero, the function being a superposition of
cosines each of mean zero, but the image intensity has a dc bias signal.
Thus this signal is subtracted from IMAGE(K) so that both functions have
zero mean. Assuming no shift of one function relative to the other has
occured, the only difference between OBJ(K) and IMAGE(K) allowed is a
difference of scale. A scaling parameter is found from a least squares
analysis assuming the relation
| (1) |
Elimination of Phase Errors
The relation between wavelength in the object plane and the pixel to which the associated frequency of that wave is mapped to in the frequency plane is as follows. If one complete cycle of the object lies on P+1 pixels maximum to maximum, then the wavelength of the object is actually P pixels long. For the case of a 256 point Fourier Transform, such a wavelength is mapped to pixels Pix(P) where
| (2) |
| (3) |
It is necessary to perform this operation in order to recover the phase information Fn unaltered in the frequency plane. If this precaution is not taken no comparison can be made between the phase Fn of the Fourier component and the measured phase of the spectrum as determined from the real and imaginary parts of the Fourier Transform.
Accurate Recovery of Phase
Given that the precautions above have been taken, there remains one further slight problem with phase recovery. The phase of the spectrum at each frequency position is expected to be i eiFn . Thus before a comparison can be made between ideal phase and measured phase the amount [(p)/2] must be subtracted from the measured phase. Complications arise because the measured phase, as determined by the FORTRAN intrinsic function ATAN2, lies in the range -p < q < +p. Consider the case where the object phase Fn=0.49p. The measured phase in the spectrum would ideally be this value plus [(p)/2], which is still less than +p and so should present no problem to the ATAN2 function.
Chapter three shows that phase errors always occur however, so that the
measured phase q is more likely to be
| (4) |

Figure F.1: Numerical Recovery of Phase in light of phase errors
It is thus neccessary to include an extensive series of tests to check
whether such an event has occurred, comparing recovered phase with the
quadrant of Fn etc. before the difference between the two values
can be made. The tests made in the actual simulation are detailed below.
'K' denotes which of the 50 random spectrums is being used and
'J' denotes which freq. in that spectrum we are on.
DO 200 K=1,50 !....................!Select spectrum:
PHIDEV(K)=0.0 !....................!Phase deviation for K'th
!spectrum as a whole.
DO 100 J=1,NC !....................!Cycles through frequencies.
BUGG=PHI(J)/PI !................! Actual phase of coefficient.
RUGG=(NEWPHA(J)/PI) !...........! Measured phase via ATAN2.
T1=0
T2=0
IF (BUGG.GE.0.AND.BUGG.LT.(0.5)) THEN
T1=1 !......!Phase in 1st quadrant
ELSE IF (BUGG.GE.(0.5)) THEN
T1=2 !......!Phase in 2nd quadrant
ENDIF
IF (T1.EQ.1.AND.RUGG.GT.0) THEN!...!DRUGG is actual difference
DRUGG=RUGG-0.5 !of phase after ATAN2 effects
ELSE IF (T1.EQ.1.AND.RUGG.LT.0) THEN !are accounted for.
DRUGG=RUGG+1.5
ELSE IF (T1.EQ.2.AND.RUGG.LT.0) THEN
DRUGG=RUGG+1.5
ELSE IF (T1.EQ.2.AND.RUGG.GT.0) THEN
DRUGG=RUGG-0.5
ELSE IF (BUGG.LT.0) THEN
DRUGG=RUGG-0.5
ENDIF
Y=ABS(DRUGG-BUGG) !..........! Take modulus of phase error.
IF (Y.GE.1) THEN
Y=ABS(Y-2) !..............!A catch-all, never occured in
ENDIF !any simulation once.
PHIDEV(K)=PHIDEV(K)+Y !......!Increment phase error for this
!spectrum.
100 CONTINUE
PHIDEV(K)=PHIDEV(K)/(1.0*NC)
200 CONTINUE
File translated from
TEX
by
TTH,
version 3.02.
On 27 Oct 2001, 23:42.

