Open Access. Powered by Scholars. Published by Universities.®

Physics Commons

Open Access. Powered by Scholars. Published by Universities.®

Articles 1 - 3 of 3

Full-Text Articles in Physics

Linear Least Squares Curve Fitting, R. Steven Turley Sep 2018

Linear Least Squares Curve Fitting, R. Steven Turley

Faculty Publications

This article is a review of the theory and practice behind linear least squares curve fitting. It outlines how to find the optimal parameters to match experimental data with theory and how to estimate the uncertainty in those parameters. The article demonstrates and validates these calculations in Excel, MATLAB, Mathematica, Python, and Julia.


Cubic Interpolation With Irregularly-Spaced Points In Julia 1.4, R. Steven Turley Aug 2018

Cubic Interpolation With Irregularly-Spaced Points In Julia 1.4, R. Steven Turley

Faculty Publications

This article shows how to interpolate between regularly- or irregularly-spaced points in Julia 1.4. It has derivations of the theory behind cubic splines, and piece-wise cubic hermite polynomial interpolation. The spline interpolants are continuous and have continuous first and second derivatives. The hermite polynomial interpolants are continuous and have continuous first derivatives. Three techniques are implemented to determine the slope at the data points for the interpolation (knots). One uses the average slope of the neighboring segments. Another use the quadratic polynomial passing through the point and its two neighbors. The third, PCHIP, is similar to the first method, but …


Fitting Als Reflectance Data Using Python, R. Steven Turley Apr 2018

Fitting Als Reflectance Data Using Python, R. Steven Turley

Faculty Publications

This article describes how to use the python refl library in https://bitbucket.org/steve_turley/reflectance-fitting to fit thin film reflectance data from the Advanced Light Source (ALS) at Lawrence Berkeley National Labs. It uses data taken for a thin film of aluminum capped by a thin film of aluminum fluoride on a silicon nitride substrate. The single fit in the example shown here shows the importance of taking into account the oxidation of the aluminum layer as part of the fit.