craig

A self-contained Fortran linear equation solver

I’ve just released a self-contained Fortran module that solves a system of linear equations using the LU decomposition. Download the Fortran linear solver from github This module is based on code that was implemented and released on the Web by Jean-Pierre Moreau.  His implementation was based on one of the Numerical Recipes books.  I updated

A self-contained Fortran linear equation solver Read More »

Constrained least-squares fitting with Python

Scipy contains a good least-squares fitting routine, leastsq(), which implements a modified Levenberg-Marquardt algorithm.  I just learned that it also has a constrained least-squared routine called fmin_slsqp().   I am using simple upper and lower bound constraints, but it’s also possible to specify more complex functional constraints. What I did not realize, at first, is that

Constrained least-squares fitting with Python Read More »