<jupyter_start><jupyter_text>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:<jupyter_code>npix = 64
aperture = wf.aperture(npix = npix, cent_obs = 0.2, spider=2)<jupyter_output><empty_output><jupyter_text>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.<jupyter_code>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)<jupyter_output><empty_output><jupyter_text>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)}$$<jupyter_code>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))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1357592722183345, 'fraction_numerical': 0.042687193841847444, 'mean_word_length': 5.745283018867925, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '240697', 'license': 'MIT', 'n_tokens_mistral': 614, 'n_tokens_neox': 566, 'n_words': 142, 'path': 'notebooks/.ipynb_checkpoints/Stray-light-checkpoint.ipynb', 'repo_name': 'aasensio/SolarnetGranada', 'size': '1429'}