File:Airydisk linear.png

Summary

Description
English: Airy disk. Diffraction pattern of a point light-source seen through a round aperture.
The brightness of the color shows the intensity. Very faint rings appear around the central spot.
Date
Source Own work
Author Geek3
Other versions

Source Code

The image was generated by the following python script using scipy and PIL

#!/usr/bin/env python
# -*- coding: utf8 -*-

'''
Copyright (C) 2010 Wikimedia Foundation

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'''

from math import *
import scipy
import scipy.special
from PIL import Image

w = 600
h = 600
image = scipy.zeros((h, w))

scalex = scipy.special.jn_zeros(1, 3)[-1]
scaley = h * scalex / w

# linear color scale
color_func = lambda x: x

for y in range(h):
	for x in range(w):
		xx = ((x + .5) / w - .5) * 2. * scalex
		yy = ((y + .5) / h - .5) * 2. * scaley
		r = hypot(xx, yy)
		v = .5
		if r != 0.: v = (scipy.special.j1(r) / r) ** 2
		image[y, x] = color_func(v)

max_val = image.max()

# write image to file
image_file = Image.new('L', (w, h))
for y in range(h):
	for x in range(w):
		c = int(2**8 * image[y, x] / max_val)
		image_file.putpixel((x, y), c)
image_file.save('Airydisk_linear.png', 'PNG')

Licensing

I, the copyright holder of this work, hereby publish it under the following licenses:
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
Category:License migration redundant#Airydisk%20linear.pngCategory:GFDL#Airydisk%20linear.png
w:en:Creative Commons
attribution
This file is licensed under the Creative Commons Attribution 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
Category:CC-BY-3.0#Airydisk%20linear.png
You may select the license of your choice.
Category:Self-published work
Category:Airy disks Category:Images with Python source code Category:Photos by User:Geek3
Category:Airy disks Category:CC-BY-3.0 Category:GFDL Category:Images with Python source code Category:License migration redundant Category:Photos by User:Geek3 Category:Self-published work