Share Email Print

### Spie Press Book

Optics Using MATLAB
Author(s): Scott W. Teare
Format Member Price Non-Member Price

Book Description

Optics Using MATLAB® provides a functional overview of the development of MATLAB code that can be used to enhance and increase one’s understanding of optics though the use of visualization tools. The book ties a variety of optical topics to MATLAB programming activities and can act as a supplement to other textbooks or can stand alone. Part I focuses on a wide range of basic programming fundamentals using MATLAB and includes such topics as curve fitting, image processing, and file storage. Part II provides a review of selected topics in optics and demonstrates how these can be explored using MATLAB scripts. Part III discusses how to use MATLAB to improve the usability of custom programs through graphical user interfaces and incorporation of other programming languages. Those who need flexibility and special calculations in their optical design or optical engineering work will find value in the book’s explanations and examples of user-programmable software.

Book Details

Date Published: 10 January 2017
Pages: 246
ISBN: 9781510608313
Volume: TT111

Preface
Acronyms and Abbreviations

I MATLAB® Overview

1 Introduction to MATLAB
1.1 Getting Started with MATLAB
1.2 Anatomy of a Program
1.3 MATLAB Basic Functions and Operators
1.4 Simple Calculations using MATLAB
1.5 Vectorization and Matrix Indexing
1.6 MATLAB Scripts
1.7 MATLAB Functions
1.8 Practice Problems
References

2 Plotting Mathematical Functions
2.1 Mathematical Functions
2.2 Visualization Functions: plot()
2.3 Visualization Functions: histogram()
2.4 Visualization Functions: 3D plotting
2.5 Visualization Functions: contour() and quiver()
2.6 Visualization Functions: imagesc
2.7 Practice Problems
References

3 Linear Amplifiers
3.1 Polynomial Synthesis and Curve Fitting
3.2 Polynomial Curve Fitting
3.3 Signal-to-Noise Ratio
3.4 Best Fit through the Data
3.5 Best Fit to the Data
3.6 Practice Problems
References

4 Data and Data Files
4.1 Text versus Binary
4.2 Writing Data Files
4.3 Generating Data to be Saved
4.4 Reading and Using Data Files
4.5 Binary MAT Files
4.6 Binary Image Files
4.7 Practice Problem
References

5 Images and Image Processing
5.1 Image Files
5.2 Image Commands
5.3 Image Size and Superpixels
5.4 Color Models and Conversions
5.5 Spatial Filtering
5.6 Practice Problems
References

II OPTICS APPLICATIONS

6 Ray Optics and Glass Equations
6.1 Lensmaker's Equation and Spot Size
6.2 Paraxial Region and Snell's Law
6.3 Matrix Approach to Ray Tracing
6.4 Ray Tracing through Multiple Elements
6.5 Glass Equations
6.6 Practice Problems
References

7 Spectrometers
7.1 Dispersion in a Material
7.2 Prisms
7.3 Gratings
7.4 Blazed Gratings
7.5 Grisms
7.6 Spectrometers and Monochrometers
7.7 Practice Problems
References

8 Modulation Transfer Function and Contrast
8.1 Image Quality
8.2 Spatial Frequency and Modulation Transfer Function
8.4 MTF Measurement
8.5 Effect of Annular Optics on MTF
8.6 Image Transformation
8.7 Practice Problems
References

9 Diffraction and Interference
9.1 Interference
9.2 Coherence
9.3 Diffraction
9.4 Young's Double-Slit Experiment
9.5 Michelson Stellar Interferometer
9.6 Mach–Zhender Interferometer
9.7 Practice Problems
References

10 Zernike Polynomials and Wavefronts
10.1 Wavefront Sensing in Adaptive Optics
10.2 Wavefront Aberrations
10.3 Zernike Polynomials
10.4 Wavefront Construction
10.5 Practice Problems
References

11 Polarizations
11.1 Polarized Light
11.2 Double Refraction
11.3 The Jones Calculus: Polarizers
11.4 The Jones Calculus: Phase Retarders
11.5 The Mueller Calculus
11.6 Jones-to-Mueller Transformation
11.7 Practice Problems
References

12 Optical Interference Filters
12.1 Transfer Matrix for Thin Films
12.2 Antireflection Systems
12.3 High-Reflectance Systems
12.4 Bandpass Filters
12.5 Composite Filters
12.6 Index of Refraction Calculation
12.7 Practice Problems
References

13 Metals and Complex Index of Refraction
13.1 Physical Vapor Deposition
13.2 Index of Refraction in Absorbing Media
13.3 Reflectivity of Metal Films
13.4 Absorption and Transmission in Metal Films
13.5 Impedance Matching
13.6 Practice Problems
References

III More with MATLAB

14 User Interfaces
14.1 Simple User Interfaces
14.2 Built-In Interfaces
14.3 Graphical User Interfaces: GUIDE
14.4 Applications: App Designer
14.5 Zernike GUI Project
14.6 Practice Problems
References

15 Completing and Packaging Programs
15.1 P-Code
15.2 Publishing
15.3 Version Control
15.4 Interfacing with other Programming Languages
15.5 Object-Oriented Programming and More
References

Bibliography
Index

## Preface

Optical engineers make use of a wide variety of commercial software tools in the design, development and testing of optical systems. These tools, no matter how excellent in their own right, can fall short of providing needed calculations. This need for flexibility and special calculations is the domain of user-programmable software.

Optics Using MATLAB® was written to tie a number of optical topics into programming activities with MATLAB and can act as a supplement to other textbooks or stand alone. The book is divided into three parts: Part I has five chapters focused on a wide range of basic programming fundamentals using MATLAB and includes topics such as curve fitting, image processing, and file storage. The eight chapters of Part II provide a review of a number of selected topics in optics and demonstrate how these can be explored using MATLAB scripts. Part III discusses how to use MATLAB to improve the usability of custom programs through graphical user interfaces and incorporating other programming languages.

The book was designed such that you can get started on any chapter that catches your attention and seek more specialized information from the earlier chapters as needed. Some examples of the topics in Part II are thin film filters, spectrometers, polarization, complex index of refraction, and wavefront sensing.

Optics Using MATLAB provides a functional overview of developing code using MATLAB that can be used to enhance and increase the understanding of optics topics though the use of visualization tools. This book is not meant to be a fundamental treatment of optics, but rather a complement to the many excellent books on optics, while providing an example-based approach to understanding the underlying optical questions.

I greatly appreciate all of the colleagues and friends who have both directly and indirectly helped me in preparing and writing this book, and I am grateful for their unswerving and unselfish support. I also appreciate the feedback from the many students who over the years have helped me refine my optics and electronics lectures and laboratories.

While I have benefited from the support of many individuals in preparing this work, any errors that remain in the text are mine to fix. I would appreciate receiving any assistance in the form of comments and corrections. Please direct any correspondence to the author at scott.teare@nmt.edu.

I am most grateful for the support of SPIE for their interest in publishing this work as part of the Tutorial Text series and particularly the efforts of Senior Editor Dara Burrows, for putting this work into its final form.

Scott W. Teare
Professor of Electrical Engineering
New Mexico Institute of Mining and Technology
Socorro, New Mexico
December 2016