Image:Hermite-gaussian.png
From Wikipedia, the free encyclopedia
Size of this preview: 800 × 600 pixels
Full resolution (1,280 × 960 pixels, file size: 120 KB, MIME type: image/png)
Hermite-Gaussian transverse mode patterns.
Bigger and better version created with the help of this Python script:
#!/usr/bin/env python import sys import Image from math import * from scipy.special.orthogonal import hermite size = 320 I_0 = 1. w = size/4. m = int(sys.argv[1]) n = int(sys.argv[2]) def linear_to_sRGB(l): # Formula from http://www.w3.org/Graphics/Color/sRGB if l <= 0.00304: l = 12.92*l else: l = 1.055*pow(l,1.0/2.4) - 0.055 return 255.0*l # First, let's make a floating-point image of the raw intensities. raw = Image.new('F', (size,size)) high = 0 for x in range(1, size, 2): for y in range(1, size, 2): I = I_0 * (hermite(m)(sqrt(2)*x/w)*exp(-x**2/w**2))**2 \ * (hermite(n)(sqrt(2)*y/w)*exp(-y**2/w**2))**2 if I > high: high = I raw.putpixel((size/2+(x-1)/2,size/2+(y-1)/2), I) raw.putpixel((size/2+(x-1)/2,size/2-(y+1)/2), I) raw.putpixel((size/2-(x+1)/2,size/2+(y-1)/2), I) raw.putpixel((size/2-(x+1)/2,size/2-(y+1)/2), I) print 'row ' + str((x+1)/2) + ' of ' + str(size/2) + ' complete' # Now, let's normalize them and export them as sRGB. cooked = Image.new('L', (size,size)) for x in range(size): for y in range(size): l = raw.getpixel((x,y))/high cooked.putpixel((x,y), linear_to_sRGB(l)) print 'row ' + str(x+1) + ' of ' + str(size) + ' complete' cooked.save('plot-' + str(m) + '-' + str(n) + '.png')
|
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Dimensions | User | Comment | |
---|---|---|---|---|
current | 22:25, 8 July 2007 | 1,280×960 (120 KB) | Keenan Pepper (Talk | contribs) | (Hermite-Gaussian transverse mode patterns. Bigger & better version, created with this Python script: #!/usr/bin/env python import sys import Image from math import * from scipy.special.orthogonal import hermite size = 320 I_0 = 1. w = size/4) |
00:56, 9 October 2004 | 350×268 (29 KB) | DrBob (Talk | contribs) | (pngcrushed version) | |
00:45, 10 March 2004 | 350×268 (34 KB) | DrBob (Talk | contribs) | (bug fixed version) | |
22:46, 9 March 2004 | 350×268 (32 KB) | DrBob (Talk | contribs) | (Hermite-Gaussian transverse mode patterns, {{msg:GFDL}}) |
- Search for duplicate files
- Edit this file using an external application
See the setup instructions for more information.
File links
The following pages on the English Wikipedia link to this file (pages on other projects are not listed):