the bessy raytrace program to calculate (not only ......the bessy raytrace program ray 2 f....

20
The BESSY RAYTRACE PROGRAM to calculate (not only) SYNCHROTRON RADIATION BEAMLINES Franz Schäfers (HZB-BESSY) ####### ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ####### ## ## #### ## ## ######### ## ## ## ## ## ## ## ## ## ## ##

Upload: others

Post on 06-Mar-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

The BESSY RAYTRACE PROGRAM

to calculate (not only)

SYNCHROTRON RADIATION BEAMLINES

Franz Schäfers (HZB-BESSY)

####### ### ## ## ## ## ## ## ## #### ## ## ## ## ######### ## ## ###### ## ######### #### ## ## ## #### ## ## ## ##

Page 2: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

2The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

Speicherring

Undulator

Vorspiegel

Refokussier-Spiegel

Monochromator

Spiegel Gitter

Eintritts-Spalt

Austritts-Spalt

ExperimentDetektor

e-

Experimentier- steuerung

Datenerfassung

Monochromator-steuerung

Probe

e

e

e-

e-

HISTORY1984 FORTRAN-VMS/PDP-111989 VMS / VAX1990 Surface profiles1993 Stokes formalism1994 Crystal optics1995 Helical Undulators1996 VMS / Alpha2000 Multilayers2002 PC-Windows / LINUX2003 Pathlength2005 Wavefront2006 Expert‘s Optics2008 Zoneplates2008 Spinger Vol. 137…

####### ### ## ## ## ## ## ## ## #### ## ## ## ## ######### ## ## ###### ## ######### #### ## ## ## #### ## ## ## ##

50 BESSY beamlinesfrom IR to hard x-rays

~100 copies worldwide

Page 3: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

3The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

• Imaging / focusing properties of optical systems• create rays within a source volume• trace them through optical elements• display geometric distribution at the focus

•Design tool for (SR-) beamlines• dipole radiation (bending magnets)• 3G Wiggler/Undulator beamlines, 4G FEL’s• general optical applications• predict performance under realistic conditions• specify requirements of optical elements before order

• RAY, REFLEC• user-friendly• easy to learn• easy accessible• every day use• minimum file handling• online graphic• quick response to new demands

Bendable cylindrical mirror

aperture

179.45 ° Crystal 1

Crystal 2

<0.5 mrad

Bendable cylindrical mirror

11.4 m 25.4 m 28 m

focus

Wiggler Source

0 m 39.5m

1606 mm

1533 mm

1400 mm

Side view

aperturesplane grating

sphericalmirror

exit II

( R=10.3m)

1200 l/mm3600 l/mm

13847

16452

18452

horizontalvertical

24258

± 150 mm

exit I

σ +

σ −

0

23681

5806

5229

distance to source [mm]

15 mrad

BESSY II

What is raytracing?Intro

Page 4: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

4The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

photon sourceWAVE / URGENT / SMUT

raytracingRAY

gratingsEFFI

FEMANSYS / ProE

optical elementsREFLEC

-0.05 0.00 0.05 0.10

-0.1

0.0

0.1

0 5000

-0.1

0.0

0.1

-0.05 0.00 0.05 0.100

2000

4000

y (m

m)

u41-162-0p7-40-ray1. image at : 755.00 mmN/s/0.1A/ 0.0mrad/ 0.1000%BW .1360D+16Transmission: 44.889 % 112222( 112222) out of 250000N

max/mm2: 0.6915D+18

S1: 1.000 S2: 0.000 S3: 0.000

x (mm)

Inte

nsity

Intensity

Width(x): 0.0472 mmCenter : 0.014 mm

Width(y): 0.0819 mmCenter : -0.002 mm

spot patternspatial distributiontemperature distribution

JOB 38 UE522003/09/29 08.25

Distribution in pinhole

hori. position (mm)

vert. position (mm)

phot

ons/

s/m

m2 /B

W

E = 396eV

-1.5-1

-0.50

0.51

1.5

-1-0.75

-0.5-0.250

0.250.5

0.751

200

400

600

800

1000

x 10 12

grating efficiency

0.2 0.4 0.6 0.80.2

0.4

0.6

0.8

1.0

cff

blaz

e an

gle

(°)

0.0

0.2

0.4

0.6

grat

ing

effic

ienc

y

BESSY optics software tools

talk M. Scheer

talk J. Bahrdt/ PHASE

Intro

Page 5: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

5The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

• A RAY is described by 12 parameters• geometric coordinates (x,y,z)• emission angle (l, m, n)• energy (hv)• polarisation (S0, S1, S2, S3)• time (pathlength) (t)

• The RAY starts in a SOURCE-volumewith defined emission characteristics

• The RAY is modified by OPTICAL ELEMENTSacc. to laws of geometry and optics

• transmitting - slits, foils (abs.)• reflecting - mirrors (refl.)• dispersing - gratings, zoneplates (eff.)• diffracting - crystals (refl.)

• All parameters of the RAY can be visualisedat the Source, Optics and Image Planes

αβ2Θ

1. OPTICAL ELEMENT

IMAGEPLANE

xs

ys

zsχψϕ xM

zM

yM

yI

xI

zI

SOURCE

What is a ray?

3 m

. .

Intro

Page 6: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

6The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

1E-3 0.01 0.1 1 10 100

Photon Energy (keV)

CROMER (Z=2-92) f1, f2

HENKE (Z=1-92) f1, f2

MOLECULES (Al2O3, SiC, SiO2…) n, k

PALIK (Al, Au, C, Cr, Cu, Ir, Ni, Os, Pt, Si,…) n, k

OPTICAL DATA TABLES

STRUCTURE FACTORS fo, fH, fHCZinkblendeHexagonalBeryl

Calculation of

• Reflectivity• Efficiency• Transmission• Rocking curves• Photon Flux• Resolving power• Polarisation

EUV VUV XUV soft X hard XVIS UV

Intro

Page 7: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

7The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

Basic law of RAY:§1: ALL RAYS HAVE EQUAL PROBABILITY = INTENSITY

• Probability distribution- start coordinates x, y, z- emission angles ϕ, ψ- energy, time…

• Advantages - easy- few rays enough for realistic simulation

(within given statistics)- no systematic errors (only statistical)

0.0

0.2

0.4

0.6

0.8

1.0

3σ2σ1σ0-1σ-2σ-3σ

+1 σ = 68.3 %FWHM = 76.0 %+2 σ = 95.4 %+3 σ = 99.7 %

Gaussiandistributionfunction

+1 σ

FWHM

(2.35 σ)

w(x)=exp(-x2/2σ2)

Prob

abilit

y w

(x)

x

1. get random number ran10 < ran1 < 1

2. scale variable, e.g. x x = (ran1 - 0.5) δx-δx/2 < x < δx/2

3. probability for this x value w(x) = exp(-x2/2σ2)

Applicable to ANY probability function

• Example: Gaussian intensity profile

• Systematic generation or…

• Statistical generation of rays within the source

4. get random number ran20 < ran2 > 1

5. ACCEPT x ONLY IF w(x) - ran2 > 0

6. if not, goto 1

+/- 3σx

Raytrace

Page 8: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

8The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

• Statistical treatment of an ensemble of raysCollective effects (Interference, diffraction…)

§2: ALL RAYS ARE INDEPENDENT, but…(Particles and Waves)

• Diffraction on slits (P~ (sin v/v)) • Zoneplate diffraction (A. Erko)

• Reflectity losses / angle / energy (Rocking curves)

-100 -80 -60 -40 -20 0 20 40 60 80 100-100

-80

-60

-40

-20

0

20

40

60

80

100

KRGF

µm

µm

40 80 120 160 200

100

RAY

40 80 120 160 200

40

80

120

160

200

µm

88 90 92 94 96 98 1000.0

0.2

0.4

0.6

0.8

1.0

102 rays 0.1 sec

Ray

s / c

hann

el (n

orm

.)

Photon energy (eV)

88 90 92 94 96 98 1000.0

0.2

0.4

0.6

0.8

1.0

103 rays 1 sec

Ray

s / c

hann

el (n

orm

.)

Photon energy (eV)88 90 92 94 96 98 100

0.0

0.2

0.4

0.6

0.8

1.0

104 rays 5 sec

Ray

s / c

hann

el (n

orm

.)

Photon energy (eV)

Mo/Si N=50d=6.75 nm

88 90 92 94 96 98 1000.0

0.2

0.4

0.6

0.8

1.0

105 rays 45 sec

Ray

s / c

hann

el (n

orm

.)

Photon energy (eV)

Mo/Si N=50d=6.75 nm

Raytrace

88 90 92 94 96 98 1000.0

0.2

0.4

0.6

0.8

1.0

106 rays 420 sec

Ray

s / c

hann

el (n

orm

.)

Photon energy (eV)

Mo/Si N=50d=6.75 nm

Page 9: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

9The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

SOURCES

DI_pole WI_ggler

PO_int PI_xel CI_rcle

2.

• Realistic simulation of source intensity, volume and emission• Input by file: create your own source ((helical) undulator…)• SR sources: polarisation included

electron beam emittance effectsdetuning effects (orbit change, misalignment)

SS txx αrrr

+=

⎟⎟⎟

⎜⎜⎜

⎛=

⎟⎟⎟

⎜⎜⎜

⎛=

ψϕψ

ψϕα

coscossin

cossin

S

S

S

S

nml

r

Page 10: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

10The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

0222222

),,(

44342414

231312

233

222

211

=++++++++

+++=

=

azayaxayzaxzaxya

zayaxazyxF

2nd, 3rd order surfaces

PM_plane m.

CY_linder (x,z)

SP_here

EL_lipsoid

PA_raboloid (circ., ell.)

TO_roid

ET_elliptical toroid

0232

223

231

213

221

212

=++

+++

+++

yzbzyb

xzbzxb

xybyxb

DI_aboloid

CO_ne

EO_expert‘s optic

Raytrace

Page 11: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

11The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

Textbook raytracing

)(13,2,1

zzml

nyx

yx

II

I −⎟⎟⎠

⎞⎜⎜⎝

⎛+⎟⎟

⎞⎜⎜⎝

⎛=⎟⎟

⎞⎜⎜⎝

Data Evaluation, Storage, Display

Start with a new ray in the source…

2.

nr

Find the intersection point xM, yM, zM

Find the local normal vector

Find the direction of outgoing ray

⎟⎟⎟

⎜⎜⎜

++=

⎟⎟⎟

⎜⎜⎜

=

z

y

x

zyxz

y

x

fff

fffnnn

n222

1r

nn rrorr )(2 112 ααα ⋅−=

Ff ∇=r

Attach next optical elementor find intersection with

Image Plane

)( 1αr

)( 2αr

(Include slope errors, surface profile)

12)()()(~ MqzzxM xzTDDx rr⋅= χθ

Raytrace

Page 12: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

12The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

Features of optical elements

• Miscellaneous: Misalignment

Spacer dB

Absorber dA

T

RIO

ES

EP

θ

XMi

ZMi

YMi

χ

ψφ

α

θ Θ−α

Increasing d

Lattice Planes

X-ray Source

• (Multilayer-) Coatings on Optics

• Special monochromator mounts:SX700 plane grating PGMSpherical grating SGM

Varied Line Spacing-(VLS-) gratingsLaterally graded crystals, -multilayers

• Rectangular, circular shape or rings (capillaries)

Measured, calc. surface profiles

βα

PM

PG (SG)

Raytrace

Page 13: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

13The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

0 20 40 60 80 100 120 140

-70

-60

-50

-40

-30

-20

-10

0

100 eV

135 eV

75 eV

3rd order

conical diffraction

3000 l/mm 75/100/135 eV 2θ=160o

2nd order

1st order

Y Po

sitio

n (m

m)

X Position (mm)

0 order

-10 0 10 20-40

-30

-20

-10

0

10

20

30

40

-4

-3

-2

-1

2

3

100 eV75 eV

135 eV

Y Po

sitio

n (m

m)

X Position (mm)

100 l/mm 75/100/135 eV 2θ=160o

100 eV75 eV

135 eV

0

1

4

Reflection Gratings (plane, spherical, toroidal)

kλ=d(sinα +sinβ)( )

⎟⎟⎟⎟

⎜⎜⎜⎜

−−+=⎟⎟⎟

⎜⎜⎜

11

211

21

21

1

2

2

2

anannm

l

nml

( )37

265

34

2320 4324321/1 xbxbxbzbzbzbnnd ++++++⋅==

VLS-Grating:

3 21

-2-1

0

m=

α β1-1 0

-2 2

3m=-3

=)( 2αr

dkl/1=α

Raytrace

Page 14: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

14The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

KMCKMC--1 1 beamlinebeamline performanceperformance

2 4 6 8 10 12 14108

109

1010

1011

1012

RAY

Pt LIII

Pt LII

Energy (keV)

Pho

ton

Flux

/ 10

0 m

A

Si (111)

Pt LI

Examples

11540 11800 12978 28098 35273distance to source (mm)

0

distance between elements (mm)15120 717512978

179.2 °

328

side view

crystal 1

crystal 2

<0.5 mrad

<0.2 mrad

2 4 6 8 10 12

0.1

1

10

Si (555)

Si (444)Si (333)

InSb (111)

Si (111)Si (311)

Si (422)

Res

olut

ion

(eV)

Energy (keV)2 4 6 8 10 12

0.1

1

10

Si (555)

Si (444)Si (333)

InSb (111)

Si (111)Si (311)

Si (422)

Res

olut

ion

(eV)

Energy (keV)

(HAX)PES better than calc.

Page 15: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

15The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

Stigmatic Imaging of an astigmatic sourceDiaboloid - optics

slope error (σ) 0.5 μm x 0.2 μrad

IDL-Animation(Thomas Zeschke, BESSY)

(Convert toroid to spherical wavefront)

5 times higherflux densit

y

Examples

Page 16: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

16The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

Diaboloid - opticsExamples

Page 17: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

17The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

Time Evolution of beams -controlling the pulse shape & broadening

zqzzyyxxpl oldoldold −−+−+−= ))()()(( 222

plλπϕ 2

=cplt =

Path length

Phase Travel time

Confining illuminated grating length: pulse length unchanged

-60 -40 -20 0 20 40 600

200

400

600

800

1000

1200

30 μm

Ray

s / c

hann

el

Time (fs)

100 fs

Source GratingFocus

Examples

Page 18: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

18The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

zqzzyyxxpl oldoldold −−+−+−= ))()()(( 222

plλπϕ 2

=cplt =

Path length

Phase Travel time

Wavefronts, Coherence

InterferencePhaseGeometric Intensity

2ji

jeI ϕ∑=

Coherent illumination of toroid, 10:1, θ=2.5o

=

• Similar to “real” wavefront codes: PHASE, SRW• Phasespace, time, energy, polarisation:

Identify sections of equal phase: Coherence

Outlook

Page 19: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

19The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

• The program has NO intelligence - even after 25 years of programming

YOU ARE THE EXPERT – NOT RAY !!!

LIMITATIONS / WARNINGSConclusions

• The program will NOT give any ideas for the kind of beamline you want to have

• Nor does it have any idea of good experiments at a beamline

• The program performs only what was programmed -The results are valid only within the mathematical or physical model implemented

• The program may still have errors (it has - definitely!!)

• The designer may have made typing errors in the input menue

• The designer may have misunderstand the program’s language or a result

Page 20: The BESSY RAYTRACE PROGRAM to calculate (not only ......The BESSY raytrace program RAY 2 F. Schaefers RAY @ SMEXOS Feb. 24.-25. 2009 S p e i c h e r r i n g U n d u l a t o r Vorspiegel

20The BESSY raytrace program RAYF. SchaefersRAY @ SMEXOS Feb. 24.-25. 2009

ProgrammingProgramming

Josef Josef FeldhausFeldhaus (Start)(Start)

Michael Michael KrumreyKrumrey (CR)(CR)

K.J.S. K.J.S. SawhneySawhney (EPU)(EPU)

Dirk Dirk AbramsohnAbramsohn (PC)(PC)

ShahinShahin SahraeiSahraei (RZP)(RZP)

AdvertisementAdvertisement

William William PeatmanPeatman((““Gratings, Mirrors and SlitsGratings, Mirrors and Slits””))

Alexei Alexei ErkoErko, , MouradMourad IdirIdir et et al.(edal.(ed.).)((““Modern DevelopmentsModern Developments…”…”))

UsersUsers

BESSY optics groupBESSY optics groupWorldwide usageWorldwide usage

Acknowledgements Acknowledgements

Special features Special features implementationimplementation

Alexei Alexei ErkoErko ((……))

Rolf Rolf FollathFollath (time)(time)

GerdGerd ReichardtReichardt (GR)(GR)

Fred Fred SenfSenf (CO)(CO)

Thomas Thomas ZeschkeZeschke ((IDL,Diab.,PhaseIDL,Diab.,Phase))