File:Intensity profiles of Laguerre-Gaussian modes.pdf

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file(2,027 × 1,529 pixels, file size: 200 KB, MIME type: application/pdf)

Summary

Description
English: Intensity profiles of the first 12 Laguerre-Gaussian modes.

Each profile is generated form the following script: - the script is and adapter version for python3 of the original found for Hemite-Gaussian modes: https://en.wikipedia.org/wiki/File:Hermite-gaussian.png

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

size = 320 I_0 = 1. w = size/4.

l = int(sys.argv[1]) m = 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
  1. 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 *  (genlaguerre(m,l)(2*(x**2+y**2)/w**2) \
           *  (sqrt(2*(x**2+y**2))/w)**l \
           *  exp(-x**2/w**2) *exp(-y**2/w**2))**2
   if I > high: high = I
   raw.putpixel((int(size//2+(x-1)//2),int(size/2+(y-1)//2)), I)
   raw.putpixel((int(size//2+(x-1)//2),int(size/2-(y+1)//2)), I)
   raw.putpixel((int(size//2-(x+1)//2),int(size/2+(y-1)//2)), I)
   raw.putpixel((int(size//2-(x+1)//2),int(size/2-(y+1)//2)), I)
 #print('row ' + str((x+1)/2) + ' of ' + str(size/2) + ' complete')
  1. Now, let's normalize them and export them as sRGB.
  2. im_rgb_raw = raw.convert('RGB')
  3. im_rgb_raw.save("raw.png")

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), int(linear_to_sRGB(l)))
 print( 'row ' + str(x+1) + ' of ' + str(size) + ' complete')

im_rgb_cooked = cooked.convert('RGB')

im_rgb_cooked.save("hg"+sys.argv[1]+sys.argv[2]+".png")
Date
Source Own work
Author Christian Tomás Schmiegelow

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International 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.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

Captions

Intensity profiles of the first 12 Laguerre-Gaussian modes.

Items portrayed in this file

depicts

4 April 2023

application/pdf

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current21:55, 4 April 2023Thumbnail for version as of 21:55, 4 April 20232,027 × 1,529 (200 KB)EuclidezUploaded own work with UploadWizard
The following pages on the English Wikipedia use this file (pages on other projects are not listed):

Metadata