<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Let us consider the point spread function of a telescope with a diameter of 0.5 m at 630 nm, both with and without seeing. First, let us build the aperture
Step1:  Now we compute the wavefront in both cases. The case with seeing is obtained by a linear combination of Zernike polynomials with normal random coefficients.
Step2:  The PSF is computed from the aperture and wavefront as the absolute value of the Fourier transform of the following function
$$
h(x,y) = A(x,y) e^{i\phi(x,y)}
$$
<ASSISTANT_TASK:>
Python Code:
npix = 64
aperture = wf.aperture(npix = npix, cent_obs = 0.2, spider=2)
Explanation: Let us consider the point spread function of a telescope with a diameter of 0.5 m at 630 nm, both with and without seeing. First, let us build the aperture:
End of explanation
D = 0.5  # m
r0 = 10  # cm
pixSize = 0.03      # arcsec
lambda0 = 6301.0    # A
wavefront = wf.seeing(D * 100.0 / r0, npix = npix, nterms = 0, quiet=True)
wavefrontSeeing = wf.seeing(D * 100.0 / r0, npix = npix, nterms = 40, quiet=True)
f, ax = pl.subplots(ncols=3, nrows=1, figsize=(15,8))
ax[0].imshow(aperture)
ax[1].imshow(wavefront)
ax[2].imshow(wavefrontSeeing)
Explanation: Now we compute the wavefront in both cases. The case with seeing is obtained by a linear combination of Zernike polynomials with normal random coefficients.
End of explanation
psf = wf.psf(aperture, wavefront, overfill = wf.psfScale(D, lambda0, pixSize))
psfSeeing = wf.psf(aperture, wavefrontSeeing, overfill = wf.psfScale(D, lambda0, pixSize))
f, ax = pl.subplots(ncols=2, nrows=2, figsize=(12,12))
ax[0,0].imshow(psf)
ax[0,1].imshow(np.log(psf))
ax[1,0].imshow(psfSeeing)
ax[1,1].imshow(np.log(psfSeeing))
Explanation: The PSF is computed from the aperture and wavefront as the absolute value of the Fourier transform of the following function
$$
h(x,y) = A(x,y) e^{i\phi(x,y)}
$$
End of explanation
<END_TASK>