0% found this document useful (0 votes)
25 views7 pages

Understanding: Optics Python

Uploaded by

lionelfonderson3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views7 pages

Understanding: Optics Python

Uploaded by

lionelfonderson3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Understanding

Optics with Python

Vasudevan Lakshminarayanan
Hassen Ghalila
Ahmed Ammar
L. Srinivasa Varadharajan

CRC Press
Taylor &. Francis Group
Boca Raton London New York

CRC Press is an imprint of the


Taylor & Francis Group, an informa business
Contents

Preface xiii

Chapter 1 Introduction to Python 1

1.1 Why Python? 1

1.2 Python Setup 2

1.2.1 Which Distribution Do We Need? 2

1.2.2 Installing Anaconda 3

1.2.3 The Anaconda Navigator 3

1.2.3.1 How to Start Anaconda


Navigator 4

1.2.3.2Jupyter/IPython QtConsole 4

1.2.3.3 Spyder 5

1.3 Coding with Jupyter/IPython QtConsole 6

1.3.1 Comments 6

1.3.2 Hello World! 7

1.3.3 Use Python As a Calculator 7

1.3.3.1 Numbers 7

1.3.3.2 Values and


Types 8

1.3.4 Variables and Reserved Keywords 9

1.3.4.1 Variables 9

1.3.4.2 Keywords 10

1.3.5 Container Types 10

1.3.5.1 Strings 11

1.3.5.2 Lists 15

1.3.5.3 Tuples 17
1.3.5.4 Dictionaries 18

1.3.6 Control Structures 19

1.3.6.1 Condition Checking 19

1.3.6.2 The if/elif/else Construction 20

1.3.6.3 The for/range Loop 20


1.3.6.4 The while Loop 21

1.3.6.5 Continue and Break 21

1.4 Modules and Scripts 22

1.4.1 Modules 22

1.4.2 Write and Run Python Scripts with Spyder 23

1.4.3 Defining Functions 23

1.4.4 Classes 25

1.5 Widely Used Python Libraries for Science and

Engineering 26
viii Contents

1.5.1 Numerical Python Library: NumPy 26

1.5.1.1 Creating Numpy Arrays 26

1.5.1.2 Using Array-Generating Functions ....27


1.5.1.3 Index Slicing 29

1.5.1.4 Read/Write Data 30

1.5.2 Data Visualization Python


Library: matplotlib 31

1.5.2.1 Getting Started 31

1.5.2.2 Multiple Axes 32

1.5.2.3 Basic Text Commands 33

1.5.2.4 Line and Marker Styles 33

1.5.3 Scientific Python Library: scipy 35

1.5.3.1 Special Functions 36

1.5.3.2 Bessel Functions 36

1.5.3.3 Fresnel Integrals 37

1.5.3.4 Interpolation 39

1.6 Conclusion 40

Chapter 2 GUI Programming with Python and Qt 41

2.1 First Steps in GUI Application using PyQt5 41

2.1.1 Importing PyQt5 and Creating a PyQt5


Window 41

2.1.2 PyQt Classes 43

2.1.2.1 PyQT Application Structure 43

2.1.2.2 Widgets, Events, and Signals 44

2.1.2.3 QLabel 44

2.1.2.4 QPushButton 46

2.1.2.5 QSpinBox 48

2.1.2.6 QSlider 51

2.2 The Qt Designer 54


2.2.1 The Qt Designer Window 55

2.2.2 The Property Editor 55

2.2.3 Layout 56

2.2.4 Qt Designer Preview 56

2.2.5 QtUiFile 57

2.2.6 Matplotlib Widget 58

2.2.7 An Example: Fraunhoffer Diffraction 59

2.2.8 Conversion from UI file to Python Code 61

2.2.8.1 Using Line Command 62

2.2.8.2 Using a Python Code 63

2.2.9 The Application: Fraunhofer Diffraction 69

2.3 Coding GUI Elements 73

2.4 Conclusion 73
Contents ix

Chapter 3 Electromagnetic Waves 75

3.1 Introduction 75

3.2 Maxwell's Equations and Electromagnetic Waves 75

3.3 Wave Equation 76


3.4 Poynting Vector 82

3.5 Phase Velocity and Group Velocity 83

3.6 Harmonic Waves 85

3.7 Python Code for Drawing a Wave 86

Chapter 4 Radiometry and Photometry 93

4.1 Radiometry 93

4.2 Photometry 96

Fermat's Principle, Reflection, and Refraction 103


Chapter 5

5.1 Introduction 103

5.2 Fermat's Principle 103


5.3 Reflection 104

5.3.1 Plane Mirrors 105

5.4 Fresnel Reflection 106

5.5 Refraction and Snell's Law 107

5.5.1 Apparent Depth Ill

5.5.2 Glass Slab 113

5.6 The Ray Equation 114

Chapter 6 Lenses and Mirrors 119

6.1 Introduction 119

6.2 Sign Convention 119

6.3 Paraxial Approximation 120

6.4 Refractive Power of a Spherical Surface 120

6.5 Focal Lengths 122

6.6 Ray Diagrams 123


6.7 Magnification 123

6.8 Lensmaker's Formula 130


6.9 Image Formation by Lenses 131

6.10 Newton's Formula 133

6.11 Spherical Mirrors 134

Chapter 7 Thick Lenses and Lens Systems 137

7.1 Cardinal Points 137

7.1.1 Focal Points 138

7.1.2 Principal Points 141

7.1.3 Nodal Planes 145

7.2 Multiple Refracting Surfaces 146


X Contents

Chapter 8 Polarization 151

8.1 Linear Polarization 151

8.2 Circular Polarization 155

8.3 Elliptical Polarization 157

8.4 Malus's Law 168

8.5 Jones Vector 169

8.5.1 Linear Polarization 170

8.5.2 Circular Polarization 170

8.5.3 Elliptical Polarization 172

8.6 Jones Matrices 173

8.6.1 Linear Polarizer 173

8.6.2 Half-Wave and Quarter-Wave Plates 174

8.6.3 Circular Polarization 176

8.6.4 Elliptical Polarization 177

8.7 Optical Rotation 178

9 Interference 179
Chapter
9.1 Generalities 179

9.1.1 Necessary Conditions 179

9.1.1.1 Polarization 183

9.1.1.2 Waves Identically Polarized 185

9.1.1.3 Asynchronous Waves with


Constant Initial Phase Shift 185

9.1.1.4 Synchronous Waves with Constant


Initial Phase Shift 186

9.1.1.5 Synchronous Waves with Random


Initial Phase Shift 187

9.1.1.6 Synchronous Waves with Constant

Initial Phase Shift and Arbitrary


Polarization 188

9.1.1.7 Fringe Width 189

9.1.2 Beat and Propagation Velocity 190

9.1.2.1 Group Velocity and Phase


Velocity 194

9.2 Wavefront Division 196

9.2.1 Young Double Slits 196

9.2.1.1 Optical Path Difference and Phase


Shift 197

9.2.1.2 Slits of Arbitrary Width 198

9.2.1.3 Infinitely Thin Slits and Fringe


Width 200

9.2.1.4 Contrast or Visibility 201

9.2.1.5 Fringe Orientation 203

9.2.2 Lloyd Mirror 203


Contents xi

9.2.2.1 OPD and Phase Shift 205

9.2.3 Fresnel Mirrors 207

9.2.3.1 OPD and Phase Shift 208

9.2.4 Fresnel Biprism 211

9.2.4.1 OPD and Phase Shift 213

9.2.5 Billet Bilens 216

9.2.5.1 OPD and Phase Shift 217

9.2.6 Meslin Lenses 221

9.3 Amplitude Division 221

9.3.1 Parallel-Faced Plates 222

9.3.1.1 General Considerations 222

9.3.1.2 Glass Plates 224

9.3.2 Corners 230

9.3.2.1 Newton's Rings 230

9.3.2.2 Prismatic Plates 235

9.3.3 Michelson Interferometer 241

9.3.3.1 Fringes of Equal Inclination 242

9.3.3.2 Fringes of Equal Thickness 244

9.3.4 Mach-Zehnder Interferometer 249

9.3.5 Fabry-Perot Interferometer 256

9.3.5.1 Interferometer Efficiency 264

Chapter 10 Coherence 271

10.1 Spatial Coherence 272

10.1.1 Double Mirrors 272

10.1.2 Broad Slit 276

10.2 Temporal Coherence 279

10.2.1 White Light 280

10.2.2 Finite Number ofWavelengths 280

10.2.3 Rectangular Continuum Spectra 283

10.2.4 Gaussian Profile 285

Chapter 11 Diffraction 291

11.1 Fraunhofer Diffraction 291

11.1.1 Rectangular Aperture 291

11.1.2 Single Slit 298

11.1.3 Double Slit 299

11.1.3.1 Two Slits of Different Widths 299

11.1.3.2 Two Identical Slits: Young Double

Slits 303

11.1.4 Diffraction Grating 304

11.1.5 Circular Aperture 309

11.1.5.1 Point Source 310

11.1.5.2 Rayleigh Criteria 311


xii Contents

11.2 Fresnel Diffraction 317


11.2.1 Fresnel Integrals 317
11.2.1.1 Diffracted Intensity 317
11.2.1.2 Fresnel Integrals Properties 320
11.2.2 Clothoid 323
11.2.2.1 Clothoid Properties 323
11.2.2.2 Diffraction by a
Single Slit 327
11.2.2.3 Diffraction by an Edge 333
11.2.3 Diffraction by a Single Slit 337
11.2.4 Diffraction by an
Edge 340

Appendix A Fresnel Integrals 347

Index 353

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy