0

I have the resulting interference field (the intensity at each point in the field is known) from several radiation sources. How can I find the wavelengths of the sources? The coordinates of the sources are also known. The wavelength can be from 1 to 256. The field size is 256 by 256.

The full code can be found here.

    x = [(i % width) + separation / 2 for i in range(width ** 2)]
    r = [0. for _ in range(width ** 2)]
    for i in range(width):
        for j in range(width):
            r[j * width + i] = \
                sqrt((i - x[j * width + i]) ** 2 + (j - x[j * width + i]) ** 2)
    ...
    for chunk in range(len(values)):
        img = Image.new(mode="L", size=(width, width), color=255)
        xi = empty([width, width], float)
        for i in range(width):
            for j in range(width):
                wavelength = values[chunk][i][j] + 1
                k = 2 * pi / wavelength
                xi[i, j] = sum(list(map(lambda z: xi0 * sin(k * z), r)))
                img.putpixel((i, j), value=int(xi[i, j]))
                print(i * width + j)
xayam
  • 1
  • 2
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 27 '24 at 14:16
  • I have the resulting file of intensities in the picture (img variable). How to restore all wavelenghts of sources using this data? – xayam Jan 27 '24 at 17:21
  • it is unlikely that people would read your code here, you should "translate" it to mathjax equations. – hyportnex Jan 27 '24 at 18:40
  • If all you know are the time averaged intensities of incoherent sources, then you can't find out the wavelengths. Useful interference patterns only form for coherent light fields. – FlatterMann Jan 27 '24 at 18:59

0 Answers0