## Science software

### “tmm” multilayer thin film optics calculator: Click here

This is a Python (NumPy) program I wrote that uses the Fresnel equations and transfer-matrix method to calculate transmission and reflection of light from multilayer thin films. (Thick films are also OK.) It also calculates the Poynting vector and the absorbed energy density as a function of depth, as well as the parameters (ψ and Δ) measured in ellipsometry. Here is the manual with installation instructions. I explain the formulas in this paper on arxiv. (If this program doesn't have the features you like, here is my list of other programs with similar / overlapping functionality.)

### “numericalunits” units package for Python: Click here

This is a Python package I wrote to deal with units and dimensional analysis. It is designed to be compatible with all numerical calculation routines, even those using specialized non-Python code like FORTRAN libraries etc.

(I also made a similar thing for Mathematica—click here—but it’s been unmaintained for 15 years. I’d be surprised if it still works and is useful in the current version of Mathematica.)

### Python program to calculate equilibrium semiconductor band diagrams: Click here

This program solves the Poisson-Boltzmann Equation via finite differences, for planar multilayer semiconductor stacks.

### Javascript photon conversion calculator: Click here

This is a little javascript tool I made to convert between light frequency, wavelength, wavenumber, photon energy, etc.

### Python program to calculate surface plasmon polariton modes in planar multilayers: Click here

This program calculates SPP modes, or more generally any transverse-magnetic (TM) mode, at a planar interface, or in a stack of arbitrarily many layers, including magnetic and anisotropic materials.

### MATLAB FROG algorithm: Click here

This is a set of MATLAB programs for processing and analyzing “Frequency-Resolved Optical Gating” (“FROG”) measurements. FROG is a technique for measuring laser pulses. To analyze the data, you have to do a sort of multidimensional optimization. The algorithm is from the literature, although I invented some variations on the algorithm that I found worked better–at least, they worked better for my data.

### LAMMPS source-code modification for outputting electric fields: Click here

I needed to know the local electric fields in a LAMMPS molecular dynamics simulation. This requires some modification of the LAMMPS source code. I wrote up the procedure nicely in case anyone else needs to do this.

### Simple little Python program to calculate sides and angles of triangles: Click here

using the Law of Sines and Law of Cosines, as we all learned in grade school geometry.